LPCOpen Platform for LPC18XX/43XX microcontrollers: BOARD: Common board functions

| LPCOpen Platform for LPC18XX/43XX microcontrollers 18XX43XX LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers

- Main Page
- Modules
- Data Structures
- Files

Macros | Typedefs | Functions
BOARD: Common board functions
BOARD: Common board components used with board drivers

## 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 379 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 508 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 438 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 451 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 466 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%.

Definition at line 681 of file board.c.

void Board_SetupClocking | ( | void |  | ) |

Setup system clocking.

Returns
  None

Note
  This sets up board clocking.

Definition at line 410 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.

Definition at line 381 of file board_sysinit.c.

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 364 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 442 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 404 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 394 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 415 of file board.c.