openMMC
Open Source Modular MMC for AMCs
Loading...
Searching...
No Matches
lpc17_pincfg.h File Reference

Pin Config functions redirection for LPC17xx. More...

#include "port.h"
Include dependency graph for lpc17_pincfg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#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
 

Detailed Description

Pin Config functions redirection for LPC17xx.

Author
Henrique Silva henri.nosp@m.que..nosp@m.silva.nosp@m.@lnl.nosp@m.s.br, LNLS

Macro Definition Documentation

◆ NON_GPIO

#define NON_GPIO   0xFF

◆ 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

#define PORT0   0

◆ PORT1

#define PORT1   1

◆ PORT2

#define PORT2   2

◆ PORT3

#define PORT3   3

◆ PORT4

#define PORT4   4