Commit 98b85683 authored by danicampora's avatar danicampora
Browse files

cc3200: Assign GPIO10 and GPIO11 to the GPIO peripheral on start-up.

parent ea43fa10
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "gpio.h" #include "gpio.h"
#include "interrupt.h" #include "interrupt.h"
#include "pybpin.h" #include "pybpin.h"
#include "pins.h"
#include "pybsleep.h" #include "pybsleep.h"
#include "mpcallback.h" #include "mpcallback.h"
#include "mpexception.h" #include "mpexception.h"
...@@ -154,6 +155,11 @@ STATIC pybpin_wake_pin_t pybpin_wake_pin[PYBPIN_NUM_WAKE_PINS] = ...@@ -154,6 +155,11 @@ STATIC pybpin_wake_pin_t pybpin_wake_pin[PYBPIN_NUM_WAKE_PINS] =
DEFINE PUBLIC FUNCTIONS DEFINE PUBLIC FUNCTIONS
******************************************************************************/ ******************************************************************************/
void pin_init0(void) { 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. // C API used to convert a user-supplied pin name into an ordinal pin number.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment