LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
iocon_17xx_40xx.h File Reference

Go to the source code of this file.

Data Structures

struct  LPC_IOCON_T
 IOCON register block. More...
 

Macros

#define IOCON_FUNC0   0x0
 
#define IOCON_FUNC1   0x1
 
#define IOCON_FUNC2   0x2
 
#define IOCON_FUNC3   0x3
 
#define IOCON_FUNC4   0x4
 
#define IOCON_FUNC5   0x5
 
#define IOCON_FUNC6   0x6
 
#define IOCON_FUNC7   0x7
 
#define IOCON_MODE_INACT   (0x0 << 3)
 
#define IOCON_MODE_PULLDOWN   (0x1 << 3)
 
#define IOCON_MODE_PULLUP   (0x2 << 3)
 
#define IOCON_MODE_REPEATER   (0x3 << 3)
 
#define IOCON_HYS_EN   (0x1 << 5)
 
#define IOCON_INV_EN   (0x1 << 6)
 
#define IOCON_ADMODE_EN   (0x0 << 7)
 
#define IOCON_DIGMODE_EN   (0x1 << 7)
 
#define IOCON_FILT_DIS   (0x1 << 8)
 
#define IOCON_HS_DIS   (0x1 << 8)
 
#define IOCON_HIDRIVE_EN   (0x1 << 9)
 
#define IOCON_FASTSLEW_EN   (0x1 << 9)
 
#define IOCON_OPENDRAIN_EN   (0x1 << 10)
 
#define IOCON_DAC_EN   (0x1 << 16)
 
#define FUNC0   0x0 /** Function 0 */
 
#define FUNC1   0x1 /** Function 1 */
 
#define FUNC2   0x2 /** Function 2 */
 
#define FUNC3   0x3 /** Function 3 */
 
#define MD_PLN   (0x0 << 3)
 
#define MD_PDN   (0x1 << 3)
 
#define MD_PUP   (0x2 << 3)
 
#define MD_RPT   (0x3 << 3)
 
#define MD_HYS_ENA   (0x1 << 5)
 
#define MD_HYS_DIS   (0x0 << 5)
 
#define MD_IINV_ENA   (0x1 << 6)
 
#define MD_IINV_DIS   (0x0 << 6)
 
#define MD_OD_ENA   (0x1 << 10)
 
#define MD_OD_DIS   (0x0 << 10)
 
#define MD_HS_ENA   (0x0 << 8)
 
#define MD_HS_DIS   (0x1 << 8)
 
#define MD_ANA_ENA   (0x0 << 7)
 
#define MD_ANA_DIS   (0x1 << 7)
 
#define MD_FILT_ENA   (0x0 << 8)
 
#define MD_FILT_DIS   (0x1 << 8)
 
#define MD_DAC_ENA   (0x1 << 16)
 
#define MD_DAC_DIS   (0x0 << 16)
 
#define MD_STD_SLEW_RATE   (0x0 << 9)
 
#define MD_FAST_SLEW_RATE   (0x1 << 9)
 
#define MD_HD_ENA   (0x1 << 9)
 
#define MD_HD_DIS   (0x0 << 9)
 
#define FUNC4   0x4 /** Function 4 */
 
#define FUNC5   0x5 /** Function 5 */
 
#define FUNC6   0x6 /** Function 6 */
 
#define FUNC7   0x7 /** Function 7 */
 

Functions

STATIC INLINE void Chip_IOCON_Init (LPC_IOCON_T *pIOCON)
 Initialize the IOCON peripheral.
 
STATIC INLINE void Chip_IOCON_PinMuxSet (LPC_IOCON_T *pIOCON, uint8_t port, uint8_t pin, uint32_t modefunc)
 Sets I/O Control pin mux.
 
STATIC INLINE void Chip_IOCON_PinMux (LPC_IOCON_T *pIOCON, uint8_t port, uint8_t pin, uint32_t mode, uint8_t func)
 Setup pin modes and function.