| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Enumerations | Functions
CHIP: LPC8xx IOCON register block and driver
LPC8xx chip specific drivers

## Detailed Description

## Data Structures
struct | LPC_IOCON_T
| IOCON register block. More...

## Enumerations
enum | CHIP_PINx_T { PIO0 = 0, PIO1 = 1, PIO2 = 2, PIO3 = 3, PIO4 = 4, PIO5 = 5, PIO6 = 6, PIO7 = 7, PIO8 = 8, PIO9 = 9, PIO10 = 10, PIO11 = 11, PIO12 = 12, PIO13 = 13, PIO14 = 14, PIO15 = 15, PIO16 = 16, PIO17 = 17, PIO_NUL = 0xFF }
| IOCON Pin Numbers enum. More...
enum | CHIP_PIN_MODE_T { PIN_MODE_INACTIVE = 0, PIN_MODE_PULLDN = 1, PIN_MODE_PULLUP = 2, PIN_MODE_REPEATER = 3 }
| IOCON Pin Modes enum. More...
enum | CHIP_PIN_SMODE_T { PIN_SMODE_BYPASS = 0, PIN_SMODE_CYC1 = 1, PIN_SMODE_CYC2 = 2, PIN_SMODE_CYC3 = 3 }
| IOCON Digital Filter Sample modes enum. More...
enum | CHIP_PIN_CLKDIV_T { IOCONCLKDIV0 = 0, IOCONCLKDIV1 = 1, IOCONCLKDIV2 = 2, IOCONCLKDIV3 = 3, IOCONCLKDIV4 = 4, IOCONCLKDIV5 = 5, IOCONCLKDIV6 = 6 }
| IOCON Perpipheral Clock divider selction for input filter sampling clock. More...
enum | CHIP_PIN_I2CMODE_T { PIN_I2CMODE_STDFAST = 0, PIN_I2CMODE_GPIO = 1, PIN_I2CMODE_FASTPLUS = 2 }
| IOCON I2C Modes enum (Only for I2C pins PIO0_10 and PIO0_11) More...

## Functions
void | Chip_IOCON_PinSetMode (LPC_IOCON_T *pIOCON, CHIP_PINx_T pin, CHIP_PIN_MODE_T mode)
| Set a function mode (pull-up/pull-down) for a pin.
void | Chip_IOCON_PinSetHysteresis (LPC_IOCON_T *pIOCON, CHIP_PINx_T pin, bool enable)
| Enable or disable the hysteresis for a pin.
void | Chip_IOCON_PinSetInputInverted (LPC_IOCON_T *pIOCON, CHIP_PINx_T pin, bool invert)
| Invert input for a pin.
void | Chip_IOCON_PinSetOpenDrainMode (LPC_IOCON_T *pIOCON, CHIP_PINx_T pin, bool open_drain)
| Sets open-drain mode for a pin.
void | Chip_IOCON_PinSetSampleMode (LPC_IOCON_T *pIOCON, CHIP_PINx_T pin, CHIP_PIN_SMODE_T smode)
| Sets the digital filter sampling mode for a pin.
void | Chip_IOCON_PinSetClockDivisor (LPC_IOCON_T *pIOCON, CHIP_PINx_T pin, CHIP_PIN_CLKDIV_T clkdiv)
| Select peripheral clock divider for input filter sampling clock.
void | Chip_IOCON_PinSetI2CMode (LPC_IOCON_T *pIOCON, CHIP_PINx_T pin, CHIP_PIN_I2CMODE_T mode)
| Set I2C mode for a pin.

## Enumeration Type Documentation

enum CHIP_PIN_CLKDIV_T

IOCON Perpipheral Clock divider selction for input filter sampling clock.

Enumerator:

  IOCONCLKDIV0 | Clock divider 0
  IOCONCLKDIV1 | Clock divider 1
  IOCONCLKDIV2 | Clock divider 2
  IOCONCLKDIV3 | Clock divider 3
  IOCONCLKDIV4 | Clock divider 4
  IOCONCLKDIV5 | Clock divider 5
  IOCONCLKDIV6 | Clock divider 6

Definition at line 118 of file iocon_8xx.h.

enum CHIP_PIN_I2CMODE_T

IOCON I2C Modes enum (Only for I2C pins PIO0_10 and PIO0_11)

Enumerator:

  PIN_I2CMODE_STDFAST | I2C standard mode/Fast mode
  PIN_I2CMODE_GPIO | Standard I/O functionality
  PIN_I2CMODE_FASTPLUS | I2C Fast plus mode

Definition at line 131 of file iocon_8xx.h.

enum CHIP_PIN_MODE_T

IOCON Pin Modes enum.

Enumerator:

  PIN_MODE_INACTIVE | Inactive mode
  PIN_MODE_PULLDN | Pull Down mode
  PIN_MODE_PULLUP | Pull up mode
  PIN_MODE_REPEATER | Repeater mode

Definition at line 97 of file iocon_8xx.h.

enum CHIP_PIN_SMODE_T

IOCON Digital Filter Sample modes enum.

Enumerator:

  PIN_SMODE_BYPASS | Bypass input filter
  PIN_SMODE_CYC1 | Input pulses shorter than 1 filter clock cycle are rejected
  PIN_SMODE_CYC2 | Input pulses shorter than 2 filter clock cycles are rejected
  PIN_SMODE_CYC3 | Input pulses shorter than 3 filter clock cycles are rejected

Definition at line 107 of file iocon_8xx.h.

enum CHIP_PINx_T

IOCON Pin Numbers enum.

Enumerator:

  PIO0 | PIN 0
  PIO1 | PIN 1
  PIO2 | PIN 2
  PIO3 | PIN 3
  PIO4 | PIN 4
  PIO5 | PIN 5
  PIO6 | PIN 6
  PIO7 | PIN 7
  PIO8 | PIN 8
  PIO9 | PIN 9
  PIO10 | PIN 10
  PIO11 | PIN 11
  PIO12 | PIN 12
  PIO13 | PIN 13
  PIO14 | PIN 14
  PIO15 | PIN 15
  PIO16 | PIN 16
  PIO17 | PIN 17
  PIO_NUL | PIN NULL

Definition at line 72 of file iocon_8xx.h.

## Function Documentation

void Chip_IOCON_PinSetClockDivisor | ( | LPC_IOCON_T * | pIOCON,
|  | CHIP_PINx_T | pin,
|  | CHIP_PIN_CLKDIV_T | clkdiv
| ) |  |

Select peripheral clock divider for input filter sampling clock.

Parameters

  pIOCON | : The base of IOCON peripheral on the chip
  pin | : Pin number
  clkdiv | : 0 = no divisor, 1...6 = PCLK/clkdiv

Returns
  Nothing

Definition at line 165 of file iocon_8xx.c.

void Chip_IOCON_PinSetHysteresis | ( | LPC_IOCON_T * | pIOCON,
|  | CHIP_PINx_T | pin,
|  | bool | enable
| ) |  |

Enable or disable the hysteresis for a pin.

Parameters

  pIOCON | : The base of IOCON peripheral on the chip
  pin | : Pin number
  enable | : true to enable, false to disable

Returns
  Nothing

Definition at line 129 of file iocon_8xx.c.

void Chip_IOCON_PinSetI2CMode | ( | LPC_IOCON_T * | pIOCON,
|  | CHIP_PINx_T | pin,
|  | CHIP_PIN_I2CMODE_T | mode
| ) |  |

Set I2C mode for a pin.

Parameters

  pIOCON | : The base of IOCON peripheral on the chip
  pin | : Pin number
  mode | : 0:Standard/Fast I2C 1: GPIO 2: Fast Plus

Returns
  Nothing

Note
  Valid for pins PIO0_10 and PIO0_11

Definition at line 172 of file iocon_8xx.c.

void Chip_IOCON_PinSetInputInverted | ( | LPC_IOCON_T * | pIOCON,
|  | CHIP_PINx_T | pin,
|  | bool | invert
| ) |  |

Invert input for a pin.

Parameters

  pIOCON | : The base of IOCON peripheral on the chip
  pin | : Pin number
  invert | : true to invert, false to not to invert

Returns
  Nothing

Definition at line 144 of file iocon_8xx.c.

void Chip_IOCON_PinSetMode | ( | LPC_IOCON_T * | pIOCON,
|  | CHIP_PINx_T | pin,
|  | CHIP_PIN_MODE_T | mode
| ) |  |

Set a function mode (pull-up/pull-down) for a pin.

Parameters

  pIOCON | : The base of IOCON peripheral on the chip
  pin | : Pin number
  mode | Mode (Pull-up/Pull-down mode)

Returns
  Nothing

Definition at line 114 of file iocon_8xx.c.

void Chip_IOCON_PinSetOpenDrainMode | ( | LPC_IOCON_T * | pIOCON,
|  | CHIP_PINx_T | pin,
|  | bool | open_drain
| ) |  |

Sets open-drain mode for a pin.

Parameters

  pIOCON | : The base of IOCON peripheral on the chip
  pin | : Pin number
  open_drain | : true to enable open-drain mode, false to disable open-drain mode

Returns
  Nothing

Definition at line 151 of file iocon_8xx.c.

void Chip_IOCON_PinSetSampleMode | ( | LPC_IOCON_T * | pIOCON,
|  | CHIP_PINx_T | pin,
|  | CHIP_PIN_SMODE_T | smode
| ) |  |

Sets the digital filter sampling mode for a pin.

Parameters

  pIOCON | : The base of IOCON peripheral on the chip
  pin | : Pin number
  smode | : 0x0 = bypass, 0x[1..3] = 1 to 3 clock cycles.

Returns
  Nothing

Definition at line 158 of file iocon_8xx.c.