LPCOpen Platform for LPC112X microcontrollers  112X
LPCOpen Platform for the NXP LPC112X family of Microcontrollers
Macros | Typedefs | Functions

Detailed Description

This file contains common board definitions that are shared across boards and devices. All of these functions do not need to be implemented for a specific board, but if they are implemented, they should use this API standard.

Macros

#define DEBUGINIT()
 
#define DEBUGOUT(...)
 
#define DEBUGSTR(str)
 
#define DEBUGIN()   (int) EOF
 

Typedefs

typedef void(* p_msDelay_func_t )(uint32_t)
 Function prototype for a MS delay function. Board layers or example code may define this function as needed. More...
 

Functions

void Board_SystemInit (void)
 Setup and initialize hardware prior to call to main() More...
 
void Board_SetupMuxing (void)
 Setup pin multiplexer per board schematics. More...
 
void Board_SetupClocking (void)
 Setup system clocking. More...
 
void Board_SetupExtMemory (void)
 Setup external system memory. More...
 
void Board_Init (void)
 Set up and initialize all required blocks and functions related to the board hardware. More...
 
void Board_Debug_Init (void)
 Initializes board UART for output, required for printf redirection. More...
 
void Board_UARTPutChar (char ch)
 Sends a single character on the UART, required for printf redirection. More...
 
int Board_UARTGetChar (void)
 Get a single character from the UART, required for scanf input. More...
 
void Board_UARTPutSTR (const char *str)
 Prints a string to the UART. More...
 
void Board_LED_Set (uint8_t LEDNumber, bool State)
 Sets the state of a board LED to on or off. More...
 
bool Board_LED_Test (uint8_t LEDNumber)
 Returns the current state of a board LED. More...
 
void Board_LED_Toggle (uint8_t LEDNumber)
 Toggles the current state of a board LED. More...
 
void Board_SetLCDBacklight (uint8_t Intensity)
 Turn on Board LCD Backlight. More...
 

Macro Definition Documentation

#define DEBUGIN ( )    (int) EOF

Definition at line 176 of file board_api.h.

#define DEBUGINIT ( )

Definition at line 173 of file board_api.h.

#define DEBUGOUT (   ...)

Definition at line 174 of file board_api.h.

#define DEBUGSTR (   str)

Definition at line 175 of file board_api.h.

Typedef Documentation

typedef void(* p_msDelay_func_t)(uint32_t)

Function prototype for a MS delay function. Board layers or example code may define this function as needed.

Definition at line 153 of file board_api.h.

Function Documentation

void Board_Debug_Init ( void  )

Initializes board UART for output, required for printf redirection.

Returns
None

Definition at line 97 of file board.c.

void Board_Init ( void  )

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

Returns
None

Definition at line 152 of file board.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 124 of file board.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 132 of file board.c.

void Board_LED_Toggle ( uint8_t  LEDNumber)

Toggles the current state of a board LED.

Parameters
LEDNumber: LED number to change state for
Returns
None

Definition at line 143 of file board.c.

void Board_SetLCDBacklight ( uint8_t  Intensity)

Turn on Board LCD Backlight.

Parameters
Intensity: Backlight intensity (0 = off, >=1 = on)
Returns
None
Note
On boards where a GPIO is used to control backlight on/off state, a '0' or '1' value will turn off or on the backlight. On some boards, a non-0 value will control backlight intensity via a PWN. For PWM systems, the intensity value is a percentage value between 0 and 100%.
void Board_SetupClocking ( void  )

Setup system clocking.

Returns
None
Note
This sets up board clocking.

Definition at line 81 of file board_sysinit.c.

void Board_SetupExtMemory ( void  )

Setup external system memory.

Returns
None
Note
This function is typically called after pin mux setup and clock setup and sets up any external memory needed by the system (DRAM, SRAM, etc.). Not all boards need this function.
void Board_SetupMuxing ( void  )

Setup pin multiplexer per board schematics.

Returns
None
Note
Board_SetupMuxing() should be called from SystemInit() prior to application main() is called. So that the PINs are set in proper state.

Definition at line 72 of file board_sysinit.c.

void Board_SystemInit ( void  )

Setup and initialize hardware prior to call to main()

Returns
None
Note
Board_SystemInit() is called prior to the application and sets up system clocking, memory, and any resources needed prior to the application starting.

Definition at line 88 of file board_sysinit.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 74 of file board.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 66 of file board.c.

void Board_UARTPutSTR ( const char *  str)

Prints a string to the UART.

Parameters
str: Terminated string to output
Returns
None

Definition at line 87 of file board.c.