LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
NXP LPC1769 Xpresso board support functions

Detailed Description

Modules

 BOARD: NXP LPC1769 Xpresso board build options
 
 NXP LPC1769 Xpresso board system init code
 

Macros

#define BOARD_NXP_XPRESSO_1769
 
#define LEDS_LED1   0x01
 
#define LEDS_LED2   0x02
 
#define LEDS_LED3   0x04
 
#define LEDS_LED4   0x08
 
#define LEDS_NO_LEDS   0x00
 
#define BUTTONS_BUTTON1   0x01
 
#define NO_BUTTON_PRESSED   0x00
 
#define JOY_UP   0x01
 
#define JOY_DOWN   0x02
 
#define JOY_LEFT   0x04
 
#define JOY_RIGHT   0x08
 
#define JOY_PRESS   0x10
 
#define MCB_17XX_AUDIO_MIC_SELECT   0x00
 
#define MCB_17XX_AUDIO_LINE_IN_SELECT   0x00
 

Functions

void Board_UART_Init (LPC_USART_T *pUART)
 Initialize pin muxing for a UART.
 
void Board_ENET_GetMacADDR (uint8_t *mcaddr)
 Returns the MAC address assigned to this board.
 
void Board_Audio_Init (uint8_t audio_in_sel)
 Sets up board audio output.
 
void Board_SSP_Init (LPC_SSP_T *pSSP)
 Initialize pin muxing for SSP interface.
 
void Board_SPI_Init (bool isMaster)
 Initialize pin muxing for SPI interface.
 
void Board_SPI_AssertSSEL (void)
 Assert SSEL pin.
 
void Board_SPI_DeassertSSEL (void)
 De-assert SSEL pin.
 
void Board_I2C_Init (I2C_ID_T id)
 Sets up board specific I2C interface.
 
STATIC INLINE void Board_I2C_EnableFastPlus (I2C_ID_T id)
 Sets up I2C Fast Plus mode.
 
STATIC INLINE void Board_I2C_DisableFastPlus (I2C_ID_T id)
 Disables I2C Fast plus mode and enable normal mode.
 
void Board_Buttons_Init (void)
 Initialize buttons on the board.
 
uint32_t Buttons_GetStatus (void)
 Get button status.
 
void Board_Joystick_Init (void)
 Initialize Joystick.
 
uint8_t Joystick_GetStatus (void)
 Get Joystick status.
 
void Serial_CreateStream (void *Stream)
 Create Serial Stream.
 

Macro Definition Documentation

#define BOARD_NXP_XPRESSO_1769

Build for Xpresso LPC1769 board

Definition at line 60 of file board_nxp_xpresso_1769.h.

#define BUTTONS_BUTTON1   0x01

Button defines

Definition at line 74 of file board_nxp_xpresso_1769.h.

#define BUTTONS_BUTTON1_GPIO_BIT_NUM   10

Definition at line 46 of file board_nxp_xpresso_1769.c.

#define BUTTONS_BUTTON1_GPIO_PORT_NUM   2

Definition at line 45 of file board_nxp_xpresso_1769.c.

#define JOY_DOWN   0x02

Definition at line 81 of file board_nxp_xpresso_1769.h.

#define JOY_LEFT   0x04

Definition at line 82 of file board_nxp_xpresso_1769.h.

#define JOY_PRESS   0x10

Definition at line 84 of file board_nxp_xpresso_1769.h.

#define JOY_RIGHT   0x08

Definition at line 83 of file board_nxp_xpresso_1769.h.

#define JOY_UP   0x01

Joystick defines

Definition at line 80 of file board_nxp_xpresso_1769.h.

#define JOYSTICK_DOWN_GPIO_BIT_NUM   15

Definition at line 50 of file board_nxp_xpresso_1769.c.

#define JOYSTICK_DOWN_GPIO_PORT_NUM   0

Definition at line 49 of file board_nxp_xpresso_1769.c.

#define JOYSTICK_LEFT_GPIO_BIT_NUM   4

Definition at line 52 of file board_nxp_xpresso_1769.c.

#define JOYSTICK_LEFT_GPIO_PORT_NUM   2

Definition at line 51 of file board_nxp_xpresso_1769.c.

#define JOYSTICK_PRESS_GPIO_BIT_NUM   17

Definition at line 56 of file board_nxp_xpresso_1769.c.

#define JOYSTICK_PRESS_GPIO_PORT_NUM   0

Definition at line 55 of file board_nxp_xpresso_1769.c.

#define JOYSTICK_RIGHT_GPIO_BIT_NUM   16

Definition at line 54 of file board_nxp_xpresso_1769.c.

#define JOYSTICK_RIGHT_GPIO_PORT_NUM   0

Definition at line 53 of file board_nxp_xpresso_1769.c.

#define JOYSTICK_UP_GPIO_BIT_NUM   3

Definition at line 48 of file board_nxp_xpresso_1769.c.

#define JOYSTICK_UP_GPIO_PORT_NUM   2

Definition at line 47 of file board_nxp_xpresso_1769.c.

#define LED0_GPIO_BIT_NUM   22

Definition at line 58 of file board_nxp_xpresso_1769.c.

#define LED0_GPIO_PORT_NUM   0

Definition at line 57 of file board_nxp_xpresso_1769.c.

#define LEDS_LED1   0x01

LED defines

Definition at line 65 of file board_nxp_xpresso_1769.h.

#define LEDS_LED2   0x02

Definition at line 66 of file board_nxp_xpresso_1769.h.

#define LEDS_LED3   0x04

Definition at line 67 of file board_nxp_xpresso_1769.h.

#define LEDS_LED4   0x08

Definition at line 68 of file board_nxp_xpresso_1769.h.

#define LEDS_NO_LEDS   0x00

Definition at line 69 of file board_nxp_xpresso_1769.h.

#define MCB_17XX_AUDIO_LINE_IN_SELECT   0x00

Definition at line 90 of file board_nxp_xpresso_1769.h.

#define MCB_17XX_AUDIO_MIC_SELECT   0x00

Dummy audio input selection values enum

Definition at line 89 of file board_nxp_xpresso_1769.h.

#define NO_BUTTON_PRESSED   0x00

Definition at line 75 of file board_nxp_xpresso_1769.h.

Function Documentation

void Board_Audio_Init ( uint8_t  audio_in_sel)

Sets up board audio output.

Parameters
audio_in_sel: audio input selection
Returns
Nothing

Definition at line 255 of file board_nxp_xpresso_1769.c.

void Board_Buttons_Init ( void  )

Initialize buttons on the board.

Returns
Nothing

Definition at line 186 of file board_nxp_xpresso_11u14.c.

void Board_Debug_Init ( void  )

Initializes board UART for output, required for printf redirection.

Returns
None

Definition at line 98 of file board_nxp_xpresso_1769.c.

void Board_ENET_GetMacADDR ( uint8_t *  mcaddr)

Returns the MAC address assigned to this board.

Parameters
mcaddr: Pointer to 6-byte character array to populate with MAC address
Returns
Nothing
Note
Returns the MAC address used by Ethernet

Definition at line 461 of file board_ea_devkit_17884088.c.

STATIC INLINE void Board_I2C_DisableFastPlus ( I2C_ID_T  id)

Disables I2C Fast plus mode and enable normal mode.

Parameters
id: Must always be I2C0
Returns
Nothing

Definition at line 166 of file board_nxp_xpresso_1769.h.

STATIC INLINE void Board_I2C_EnableFastPlus ( I2C_ID_T  id)

Sets up I2C Fast Plus mode.

Parameters
id: Must always be I2C0
Returns
Nothing
Note
This function must be called before calling Chip_I2C_SetClockRate() to set clock rates above normal range 100KHz to 400KHz. Only I2C0 supports this mode.

Definition at line 156 of file board_nxp_xpresso_1769.h.

void Board_I2C_Init ( I2C_ID_T  id)

Sets up board specific I2C interface.

Parameters
id: ID of I2C peripheral
Returns
Nothing

Sets up board specific I2C interface.

Parameters
id: Must be passed as I2C0
Returns
Nothing
Parameters
id: I2C peripheral ID (Must be I2C0)
Returns
Nothing
Parameters
id: I2C peripheral ID (I2C0, I2C1 or I2C2)
Returns
Nothing

Sets up board specific I2C interface.

Parameters
id: Must be passed as I2C0
Returns
Nothing
Parameters
id: I2C peripheral ID (Must be I2C0)
Returns
Nothing

Definition at line 88 of file board_nxp_xpresso_11c24.h.

void Board_Init ( void  )

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

Returns
None

Definition at line 161 of file board_nxp_xpresso_1769.c.

void Board_Joystick_Init ( void  )

Initialize Joystick.

Returns
Nothing

Definition at line 200 of file board_nxp_xpresso_11u14.c.

static void Board_LED_Init ( void  )
static

Definition at line 72 of file board_nxp_xpresso_1769.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 145 of file board_nxp_xpresso_1769.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 154 of file board_nxp_xpresso_1769.c.

void Board_SPI_AssertSSEL ( void  )

Assert SSEL pin.

Returns
Nothing

Definition at line 244 of file board_nxp_xpresso_1769.c.

void Board_SPI_DeassertSSEL ( void  )

De-assert SSEL pin.

Returns
Nothing

Definition at line 250 of file board_nxp_xpresso_1769.c.

void Board_SPI_Init ( bool  isMaster)

Initialize pin muxing for SPI interface.

Parameters
isMaster: true for master mode, false for slave mode
Returns
Nothing

Definition at line 219 of file board_nxp_xpresso_1769.c.

void Board_SSP_Init ( LPC_SSP_T pSSP)

Initialize pin muxing for SSP interface.

Parameters
pSSP: Pointer to SSP interface to initialize
Returns
Nothing

Definition at line 169 of file board_nxp_xpresso_1347.c.

void Board_UART_Init ( LPC_USART_T pUART)

Initialize pin muxing for a UART.

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 122 of file board_nxp_xpresso_1769.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 114 of file board_nxp_xpresso_1769.c.

void Board_UARTPutSTR ( char *  str)

Prints a string to the UART.

Parameters
str: Terminated string to output
Returns
None

Definition at line 135 of file board_nxp_xpresso_1769.c.

uint32_t Buttons_GetStatus ( void  )

Get button status.

Returns
status of button

Definition at line 191 of file board_nxp_xpresso_11u14.c.

uint8_t Joystick_GetStatus ( void  )

Get Joystick status.

Returns
status of Joystick

System Clock Frequency (Core Clock)

Definition at line 214 of file board_nxp_xpresso_11u14.c.

void Serial_CreateStream ( void *  Stream)

Create Serial Stream.

Parameters
Stream: Pointer to stream
Returns
Nothing

Definition at line 833 of file board_ea_devkit_17884088.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 85 of file board_nxp_xpresso_1769.c.

Variable Documentation

uint32_t SystemCoreClock

Current system clock rate, mainly used for sysTick.

< System Clock Frequency (Core Clock)

Definition at line 65 of file board_nxp_xpresso_1769.c.