mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/PinNames.h
- Revision:
- 76:aeb1df146756
- Parent:
- 70:c1fbde68b492
- Child:
- 105:e200768883d5
diff -r 99bf659e4489 -r aeb1df146756 targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/PinNames.h --- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/PinNames.h Mon Jan 27 13:30:06 2014 +0000 +++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/PinNames.h Mon Jan 27 14:30:07 2014 +0000 @@ -42,15 +42,17 @@ #define STM_PIN_MODE(X) ((X) >> 8) #define STM_PIN_AFNUM(X) ((X) & 0xFF) +// High nibble = port number (0=A, 1=B, 2=C, 3=D, 4=E, 5=F, 6=G, 7=H) +// Low nibble = pin number +#define STM_PORT(X) (((uint32_t)(X) >> 4) & 0xF) +#define STM_PIN(X) ((uint32_t)(X) & 0xF) + typedef enum { PIN_INPUT, PIN_OUTPUT } PinDirection; typedef enum { - - // high nibble = port number (0=A, 1=B, 2=C, 3=D, 4=E, 5=F) - // low nibble = pin number PA_0 = 0x00, PA_1 = 0x01, PA_2 = 0x02, @@ -102,8 +104,9 @@ PC_14 = 0x2E, PC_15 = 0x2F, + PD_0 = 0x30, + PD_1 = 0x31, PD_2 = 0x32, - PD_8 = 0x38, // Arduino connector namings A0 = PA_0,