LPCOpen Platform for LPC112X microcontrollers  112X
LPCOpen Platform for the NXP LPC112X family of Microcontrollers
Macros | Functions | Variables
board.c File Reference
#include "board.h"
#include "retarget.h"

Go to the source code of this file.

Macros

#define BUTTONS_BUTTON1_GPIO_PORT_NUM   1 /* WAKE button */
 
#define BUTTONS_BUTTON1_GPIO_BIT_NUM   4
 
#define BUTTONS_BUTTON2_GPIO_PORT_NUM   0 /* ISP button */
 
#define BUTTONS_BUTTON2_GPIO_BIT_NUM   1
 

Functions

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_Debug_Init (void)
 Initializes board UART for output, required for printf redirection. More...
 
static void Board_LED_Init (void)
 
void Board_LED_Set (uint8_t LEDNumber, bool On)
 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_Init (void)
 Set up and initialize all required blocks and functions related to the board hardware. More...
 
void Board_Buttons_Init (void)
 Initialize buttons on the board. More...
 
uint32_t Buttons_GetStatus (void)
 Get button status. More...
 

Variables

static const uint8_t ledPin [] = {1, 2, 4}
 
const uint32_t OscRateIn = 12000000
 System oscillator rate This value is defined externally to the chip layer and contains the value in Hz for the external oscillator for the board. If using the internal oscillator, this rate can be 0. More...
 
const uint32_t ExtRateIn = 0
 Clock rate on the CLKIN pin This value is defined externally to the chip layer and contains the value in Hz for the CLKIN pin for the board. If this pin isn't used, this rate can be 0. More...
 

Macro Definition Documentation

#define BUTTONS_BUTTON1_GPIO_BIT_NUM   4

Definition at line 41 of file board.c.

#define BUTTONS_BUTTON1_GPIO_PORT_NUM   1 /* WAKE button */

Definition at line 40 of file board.c.

#define BUTTONS_BUTTON2_GPIO_BIT_NUM   1

Definition at line 43 of file board.c.

#define BUTTONS_BUTTON2_GPIO_PORT_NUM   0 /* ISP button */

Definition at line 42 of file board.c.

Function Documentation

void Board_Buttons_Init ( void  )

Initialize buttons on the board.

Returns
Nothing

Definition at line 164 of file board.c.

static void Board_LED_Init ( void  )
static

Definition at line 113 of file board.c.

uint32_t Buttons_GetStatus ( void  )

Get button status.

Returns
status of button

Definition at line 170 of file board.c.

Variable Documentation

const uint32_t ExtRateIn = 0

Clock rate on the CLKIN pin This value is defined externally to the chip layer and contains the value in Hz for the CLKIN pin for the board. If this pin isn't used, this rate can be 0.

Definition at line 55 of file board.c.

const uint8_t ledPin[] = {1, 2, 4}
static

Definition at line 47 of file board.c.

const uint32_t OscRateIn = 12000000

System oscillator rate This value is defined externally to the chip layer and contains the value in Hz for the external oscillator for the board. If using the internal oscillator, this rate can be 0.

Definition at line 54 of file board.c.