Pin Config functions redirection for LPC17xx.
More...
Go to the source code of this file.
|
#define | PIN_DEF(port, pin, func, dir) ( (port << 24) | (pin << 16) | (func << 8) | dir ) |
| Sets I/O Control pin mux.
|
|
#define | PIN_PORT(pin_def) ((pin_def & 0xFF000000) >> 24) |
|
#define | PIN_NUMBER(pin_def) ((pin_def & 0x00FF0000) >> 16) |
|
#define | PIN_FUNC(pin_def) ((pin_def & 0x0000FF00) >> 8) |
|
#define | PIN_DIR(pin_def) ((pin_def & 0x000000FF) >> 0) |
|
#define | PORT0 0 |
|
#define | PORT1 1 |
|
#define | PORT2 2 |
|
#define | PORT3 3 |
|
#define | PORT4 4 |
|
#define | NON_GPIO 0xFF |
|
Pin Config functions redirection for LPC17xx.
- Author
- Henrique Silva henri.nosp@m.que..nosp@m.silva.nosp@m.@lnl.nosp@m.s.br, LNLS
◆ NON_GPIO
◆ PIN_DEF
#define PIN_DEF |
( |
| port, |
|
|
| pin, |
|
|
| func, |
|
|
| dir ) ( (port << 24) | (pin << 16) | (func << 8) | dir ) |
Sets I/O Control pin mux.
- Parameters
-
port | : GPIO port to mux |
pin | : GPIO pin to mux |
cfg | : Configuration bits to select pin mode/function |
- See also
- IOCON_17XX_40XX_MODE_FUNC
◆ PIN_DIR
#define PIN_DIR |
( |
| pin_def | ) |
((pin_def & 0x000000FF) >> 0) |
◆ PIN_FUNC
#define PIN_FUNC |
( |
| pin_def | ) |
((pin_def & 0x0000FF00) >> 8) |
◆ PIN_NUMBER
#define PIN_NUMBER |
( |
| pin_def | ) |
((pin_def & 0x00FF0000) >> 16) |
◆ PIN_PORT
#define PIN_PORT |
( |
| pin_def | ) |
((pin_def & 0xFF000000) >> 24) |
◆ PORT0
◆ PORT1
◆ PORT2
◆ PORT3
◆ PORT4