Merge pull request #1091 from stevew817/master

Silicon Labs - Set the default status for an input pin to PullUp instead of PullDown
pull/1093/head
Martin Kojtal 2015-05-05 07:45:05 +01:00
commit 4ba4c0d5b9
3 changed files with 8 additions and 2 deletions

View File

@ -64,7 +64,7 @@
#define HFRCO_FREQUENCY CMU_HFRCOCTRL_BAND_14MHZ
#define LFXO_FREQUENCY 32768
#define HFXO_FREQUENCY 32000000
#define HFXO_FREQUENCY 48000000
#if (LOW_ENERGY_CLOCK_SOURCE == LFXO)
#define LOW_ENERGY_CLOCK_FREQUENCY LFXO_FREQUENCY

View File

@ -64,7 +64,7 @@
#define HFRCO_FREQUENCY CMU_HFRCOCTRL_BAND_14MHZ
#define LFXO_FREQUENCY 32768
#define HFXO_FREQUENCY 32000000
#define HFXO_FREQUENCY 48000000
#if (LOW_ENERGY_CLOCK_SOURCE == LFXO)
#define LOW_ENERGY_CLOCK_FREQUENCY LFXO_FREQUENCY

View File

@ -59,6 +59,12 @@ void gpio_mode(gpio_t *obj, PinMode mode)
{
obj->mode = mode; // Update object
pin_mode(obj->pin, mode); // Update register
//Handle pullup for input
if(mode == InputPullUp) {
//Set DOUT
GPIO->P[obj->port & 0xF].DOUTSET = 1 << (obj->pin & 0xF);
}
}
// Used by DigitalInOut to set correct mode when direction is set