Skip to content

Commit 4ba4c0d

Browse files
committed
Merge pull request #1091 from stevew817/master
Silicon Labs - Set the default status for an input pin to PullUp instead of PullDown
2 parents d50b62d + 3561490 commit 4ba4c0d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32LG_STK3600/device_peripherals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#define HFRCO_FREQUENCY CMU_HFRCOCTRL_BAND_14MHZ
6565

6666
#define LFXO_FREQUENCY 32768
67-
#define HFXO_FREQUENCY 32000000
67+
#define HFXO_FREQUENCY 48000000
6868

6969
#if (LOW_ENERGY_CLOCK_SOURCE == LFXO)
7070
#define LOW_ENERGY_CLOCK_FREQUENCY LFXO_FREQUENCY

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32WG_STK3800/device_peripherals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#define HFRCO_FREQUENCY CMU_HFRCOCTRL_BAND_14MHZ
6565

6666
#define LFXO_FREQUENCY 32768
67-
#define HFXO_FREQUENCY 32000000
67+
#define HFXO_FREQUENCY 48000000
6868

6969
#if (LOW_ENERGY_CLOCK_SOURCE == LFXO)
7070
#define LOW_ENERGY_CLOCK_FREQUENCY LFXO_FREQUENCY

libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/gpio_api.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ void gpio_mode(gpio_t *obj, PinMode mode)
5959
{
6060
obj->mode = mode; // Update object
6161
pin_mode(obj->pin, mode); // Update register
62+
63+
//Handle pullup for input
64+
if(mode == InputPullUp) {
65+
//Set DOUT
66+
GPIO->P[obj->port & 0xF].DOUTSET = 1 << (obj->pin & 0xF);
67+
}
6268
}
6369

6470
// Used by DigitalInOut to set correct mode when direction is set

0 commit comments

Comments
 (0)