diff options
| author | danicampora <danicampora@gmail.com> | 2015-03-16 13:46:11 +0100 |
|---|---|---|
| committer | danicampora <danicampora@gmail.com> | 2015-03-17 13:26:05 +0100 |
| commit | 98b8568362fc125cfb0bcd092fae925c1a5437f1 (patch) | |
| tree | 9412839d2c055f20eba2c37d4401f1af0353c50d /cc3200/mods/pybpin.c | |
| parent | ea43fa104e811418417d4f41c2569de47d35c982 (diff) | |
cc3200: Assign GPIO10 and GPIO11 to the GPIO peripheral on start-up.
Diffstat (limited to 'cc3200/mods/pybpin.c')
| -rw-r--r-- | cc3200/mods/pybpin.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cc3200/mods/pybpin.c b/cc3200/mods/pybpin.c index 50727154e..71799643c 100644 --- a/cc3200/mods/pybpin.c +++ b/cc3200/mods/pybpin.c @@ -45,6 +45,7 @@ #include "gpio.h" #include "interrupt.h" #include "pybpin.h" +#include "pins.h" #include "pybsleep.h" #include "mpcallback.h" #include "mpexception.h" @@ -154,6 +155,11 @@ STATIC pybpin_wake_pin_t pybpin_wake_pin[PYBPIN_NUM_WAKE_PINS] = DEFINE PUBLIC FUNCTIONS ******************************************************************************/ void pin_init0(void) { + // assign GPIO10 and GPIO11 to the GPIO peripheral (the default is I2C), so that the I2C bus can + // be assigned safely to any other pins (as recomended by the SDK release notes). Make them + // inputs with pull-downs enabled to ensure they are not floating during LDPS and hibernate. + pin_config ((pin_obj_t *)&pin_GPIO10, PIN_MODE_0, GPIO_DIR_MODE_IN, PIN_TYPE_STD_PD, PIN_STRENGTH_2MA); + pin_config ((pin_obj_t *)&pin_GPIO11, PIN_MODE_0, GPIO_DIR_MODE_IN, PIN_TYPE_STD_PD, PIN_STRENGTH_2MA); } // C API used to convert a user-supplied pin name into an ordinal pin number. |
