@@ -35,20 +35,20 @@ extern const am_hal_gpio_pincfg_t g_AM_HAL_GPIO_OPEN_DRAIN_WITH_READ_12;
35
35
extern const am_hal_gpio_pincfg_t g_AM_HAL_GPIO_INPUT_PULLDOWN ;
36
36
37
37
// macros pointing to internal apollo3 GPIO pincfg structures
38
- #define AP3_PINCFG_INPUT (g_AM_HAL_GPIO_INPUT)
39
- #define AP3_PINCFG_OUTPUT (g_AM_HAL_GPIO_OUTPUT_WITH_READ_12)
40
- #define AP3_PINCFG_INPUT_PULLUP (g_AM_HAL_GPIO_INPUT_PULLUP)
41
- #define AP3_PINCFG_INPUT_PULLDOWN (g_AM_HAL_GPIO_INPUT_PULLDOWN)
42
- #define AP3_PINCFG_OPEN_DRAIN (g_AM_HAL_GPIO_OPEN_DRAIN_WITH_READ_12)
43
- #define AP3_PINCFG_TRISTATE (g_AM_HAL_GPIO_TRISTATE)
38
+ #define AP3_PINCFG_INPUT (g_AM_HAL_GPIO_INPUT)
39
+ #define AP3_PINCFG_OUTPUT (g_AM_HAL_GPIO_OUTPUT_WITH_READ_12)
40
+ #define AP3_PINCFG_INPUT_PULLUP (g_AM_HAL_GPIO_INPUT_PULLUP)
41
+ #define AP3_PINCFG_INPUT_PULLDOWN (g_AM_HAL_GPIO_INPUT_PULLDOWN)
42
+ #define AP3_PINCFG_OPEN_DRAIN (g_AM_HAL_GPIO_OPEN_DRAIN_WITH_READ_12)
43
+ #define AP3_PINCFG_TRISTATE (g_AM_HAL_GPIO_TRISTATE)
44
44
45
45
// constants for Arduino pin modes
46
- #define INPUT (0x00)
47
- #define OUTPUT (0x01)
48
- #define INPUT_PULLUP (0x02)
49
- #define INPUT_PULLDOWN (0x03)
50
- #define OPEN_DRAIN (0x04)
51
- #define TRISTATE (0x05)
46
+ #define INPUT (0x00)
47
+ #define OUTPUT (0x01)
48
+ #define INPUT_PULLUP (0x02)
49
+ #define INPUT_PULLDOWN (0x03)
50
+ #define OPEN_DRAIN (0x04)
51
+ #define TRISTATE (0x05)
52
52
53
53
#define AP3_GPIO_MAX_PADS (50)
54
54
#define AP3_GPIO_IS_VALID (pad ) ((pad >= 0) && (pad < AP3_GPIO_MAX_PADS))
0 commit comments