diff options
| author | danicampora | 2015-02-20 16:31:30 +0100 |
|---|---|---|
| committer | danicampora | 2015-02-20 16:41:55 +0100 |
| commit | 6b21c3fdd6aaee3266b1ac69017e6c1ffaa2c99b (patch) | |
| tree | 2e0e410b5f4a38cf6071a30e8a2c48fbb5e2a944 /cc3200/mptask.c | |
| parent | 7807da20ab1e5f91d26d93553545235d3b443044 (diff) | |
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.
Diffstat (limited to 'cc3200/mptask.c')
| -rw-r--r-- | cc3200/mptask.c | 3 |
1 files changed, 1 insertions, 2 deletions
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(); |
