mbed library sources
Fork of mbed-src by
Diff: targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/objects.h
- Revision:
- 593:78ee8643776a
- Parent:
- 556:a217bc785985
- Child:
- 627:4fa1328d9c60
--- a/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/objects.h Fri Jul 17 09:15:10 2015 +0100 +++ b/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/objects.h Mon Jul 20 09:00:09 2015 +0100 @@ -28,6 +28,12 @@ extern "C" { #endif +typedef struct { + PinName pin:8; + PinMode mode:6; + PinDirection dir:2; +} gpio_t; + #if DEVICE_ANALOGIN struct analogin_s { ADC_TypeDef *adc; @@ -79,10 +85,9 @@ #if DEVICE_INTERRUPTIN struct gpio_irq_s { - uint32_t port; - PinName pin; - uint32_t risingEdge; - uint32_t fallingEdge; + PinName pin:8; // Pin number 4 least significant bits, port number 4 most significant bits + uint32_t risingEdge:1; + uint32_t fallingEdge:1; }; #endif @@ -137,7 +142,6 @@ } sleepstate_enum; #endif -#include "gpio_object.h" #ifdef __cplusplus }