| 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
Modules | Macros | Functions
NXP LPC812 Xpresso board support functions
BOARD: LPC8xx boards

## Detailed Description

## Modules
| BOARD: LPC812 board build options
| LPC812 NXP Xpresso board System Init code

## Macros
#define | BOARD_NXP_XPRESSO_812
#define | LPC8XX_USE_ACMP_I1 (1) /* 0 to not configure ACMP_I1 to use pin choice below */
#define | LPC8XX_ACMP_O_PINx (PIO15) /* This value selects the output P0.x pin for the ACMP Output Function */

## Functions
void | Board_UART_Init (LPC_USART_T *pUART)
| Initialize pin muxing for UART interface.
void | Board_SPI_Init (LPC_SPI_T *pSPI)
| Initialize pin muxing for SPI interface.
void | Board_I2C_Init (void)
| Initialize pin muxing and clock for I2C interface.

## Macro Definition Documentation

#define BLUE_LED_PORT_BIT 16

Definition at line 44 of file board_nxp_xpresso_812.c.

#define BOARD_NXP_XPRESSO_812

Definition at line 69 of file board_nxp_xpresso_812.h.

#define GREEN_LED_PORT_BIT 17

Definition at line 45 of file board_nxp_xpresso_812.c.

#define LPC8XX_ACMP_O_PINx (PIO15) /* This value selects the output P0.x pin for the ACMP Output Function */

Definition at line 73 of file board_nxp_xpresso_812.h.

#define LPC8XX_USE_ACMP_I1 (1) /* 0 to not configure ACMP_I1 to use pin choice below */

Definition at line 72 of file board_nxp_xpresso_812.h.

#define RED_LED_PORT_BIT 7

Definition at line 43 of file board_nxp_xpresso_812.c.

## Function Documentation

void Board_Debug_Init | ( | void |  | ) |

Initializes board UART for output, required for printf redirection.

Returns
  None

Definition at line 216 of file board_nxp_xpresso_812.c.

void Board_I2C_Init | ( | void |  | ) |

Initialize pin muxing and clock for I2C interface.

Returns
  Nothing

Definition at line 171 of file board_nxp_xpresso_812.c.

void Board_Init | ( | void |  | ) |

Set up and initialize all required blocks and functions related to the board hardware.

Returns
  None

Definition at line 230 of file board_nxp_xpresso_812.c.

static void Board_LED_Init | ( | void |  | ) |
| static

Definition at line 58 of file board_nxp_xpresso_812.c.

void Board_LED_Set | ( | uint8_t | LEDNumber,
|  | bool | State
| ) |  |

Sets the state of a board LED to on or off.

Parameters

  LEDNumber | : LED number to set state for
  State | : true for on, false for off

Returns
  None

Definition at line 72 of file board_nxp_xpresso_812.c.

bool Board_LED_Test | ( | uint8_t | LEDNumber | ) |

Returns the current state of a board LED.

Parameters

  LEDNumber | : LED number to set state for

Returns
  true if the LED is on, otherwise false

Definition at line 78 of file board_nxp_xpresso_812.c.

void Board_SPI_Init | ( | LPC_SPI_T * | pSPI | ) |

Initialize pin muxing for SPI interface.

Parameters

  pSPI | : Pointer to SPI interface to initialize

Returns
  Nothing

Definition at line 133 of file board_nxp_xpresso_812.c.

void Board_UART_Init | ( | LPC_USART_T * | pUART | ) |

Initialize pin muxing for UART interface.

Parameters

  pUART | : Pointer to SPI interface to initialize

Returns
  Nothing

Initialize pin muxing for UART interface.

Parameters

  pUART | : Pointer to UART register block for UART pins to init

Returns
  Nothing

Definition at line 379 of file board_ea_devkit_17884088.c.

int Board_UARTGetChar | ( | void |  | ) |

Get a single character from the UART, required for scanf input.

Returns
  EOF if not character was received, or character value

Definition at line 193 of file board_nxp_xpresso_812.c.

void Board_UARTPutChar | ( | char | ch | ) |

Sends a single character on the UART, required for printf redirection.

Parameters

  ch | : character to send

Returns
  None

Definition at line 185 of file board_nxp_xpresso_812.c.

void Board_UARTPutSTR | ( | char * | str | ) |

Prints a string to the UART.

Parameters

  str | : Terminated string to output

Returns
  None

Definition at line 206 of file board_nxp_xpresso_812.c.

void SystemCoreClockUpdate | ( | void |  | ) |

Update system core clock rate, should be called if the system has a clock rate change.

Returns
  None

Definition at line 90 of file board_nxp_xpresso_812.c.

## Variable Documentation

const uint8_t LED_BITS[] = {RED_LED_PORT_BIT, BLUE_LED_PORT_BIT, GREEN_LED_PORT_BIT}
| static

Definition at line 47 of file board_nxp_xpresso_812.c.

uint32_t SystemCoreClock

Current system clock rate, mainly used for sysTick.

< System Clock Frequency (Core Clock)

System Clock Frequency (Core Clock)

Definition at line 84 of file board_nxp_xpresso_812.c.