From 6b21c3fdd6aaee3266b1ac69017e6c1ffaa2c99b Mon Sep 17 00:00:00 2001 From: danicampora Date: Fri, 20 Feb 2015 16:31:30 +0100 Subject: cc3200: Refactor UART and I2C object creation. I2C objects can be freed by the GC and a __del__ method is provided in order to de-init the peripheral prior to being garbage collected. UART objects are now added to a local list and this list is now part of the VM_STATE. --- cc3200/mptask.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cc3200/mptask.c') diff --git a/cc3200/mptask.c b/cc3200/mptask.c index 77b45859f..3dd123122 100644 --- a/cc3200/mptask.c +++ b/cc3200/mptask.c @@ -147,7 +147,6 @@ soft_reset: mpexception_init0(); uart_init0(); pin_init0(); - i2c_init0(); // configure stdio uart pins with the correct af // param 3 ("mode") is DON'T CARE" for AFs others than GPIO @@ -158,7 +157,7 @@ soft_reset: mp_obj_new_int(MICROPY_STDIO_UART), mp_obj_new_int(MICROPY_STDIO_UART_BAUD), }; - MP_STATE_PORT(pyb_stdio_uart) = pyb_uart_type.make_new((mp_obj_t)&pyb_uart_type, MP_ARRAY_SIZE(args), 0, args); + pyb_stdio_uart = pyb_uart_type.make_new((mp_obj_t)&pyb_uart_type, MP_ARRAY_SIZE(args), 0, args); readline_init0(); extint_init0(); -- cgit v1.2.3