The board support software API functions provide some simple abstracted functions used across multiple LPCOpen board examples. See BOARD: Common board functions for the functions defined by this board support layer.
| #define BOARD_NXP_LPCLINK2_4370 |
| #define BUTTONS_BUTTON1 0x01 |
Define DEBUG_ENABLE to enable IO via the DEBUGSTR, DEBUGOUT, and DEBUGIN macros. If not defined, DEBUG* functions will be optimized out of the code at build time.
Definition at line 54 of file board.h.
Define DEBUG_SEMIHOSTING along with DEBUG_ENABLE to enable IO support via semihosting. You may need to use a C library that supports semihosting with this option. Board UART used for debug output and input using the DEBUG* macros. This is also the port used for Board_UARTPutChar, Board_UARTGetChar, and Board_UARTPutSTR functions.
Definition at line 65 of file board.h.
| #define LEDS_NO_LEDS 0x00 |
| #define NO_BUTTON_PRESSED 0x00 |
| void Board_ADC_Init |
( |
void |
| ) |
|
Sets up board specific ADC interface.
- Returns
- Nothing
Sets up board specific ADC interface.
- Returns
- Nothing
Definition at line 534 of file board.c.
| void Board_Audio_Init |
( |
LPC_I2S_T * |
pI2S, |
|
|
int |
micIn |
|
) |
| |
Initialize I2S interface for the board and UDA1380.
- Parameters
-
| pI2S | : Pointer to I2S register interface used on this board |
| micIn | : If 1 selects MIC as input device, If 0 selects LINE_IN |
- Returns
- Nothing
Sets up board specific I2S interface and UDA1380.
- Parameters
-
| pI2S | : Pointer to I2S register interface used on this board |
| micIn | : If 1 MIC will be used as input, if 0 LINE_IN will be used |
- Returns
- Nothing
Sets up board specific I2S interface and UDA1380.
- Parameters
-
| pI2S | : Pointer to I2S register interface used on this board |
| micIn | : If 1 selects MIC as input device, If 0 selects LINE_IN |
- Returns
- Nothing
- Parameters
-
| pI2S | : Pointer to I2S register interface used on this board |
| micIn | : If 1 MIC will be used as input, if 0 LINE_IN will be used |
- Returns
- Nothing
Definition at line 738 of file board.c.
| void Board_Buttons_Init |
( |
void |
| ) |
|
Initialize button(s) interface on board.
- Returns
- Nothing
Initializes board specific buttons.
- Returns
- Nothing
Definition at line 472 of file board.c.
Initialize DAC interface for the board.
- Parameters
-
| pDAC | : Pointer to DAC register interface used on this board |
- Returns
- Nothing
Definition at line 754 of file board.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
Definition at line 499 of file board.c.
| bool Board_GetTouchPos |
( |
int16_t * |
pX, |
|
|
int16_t * |
pY |
|
) |
| |
Get Touch coordinates.
- Parameters
-
| pX | : Pointer to x-Coord to populate |
| pY | : Pointer to y-Coord to populate |
- Returns
- true if touch is detected or false if otherwise
Get touch screen position (Polled mode)
- Parameters
-
| pX | : Pointer to x-Coord to populate |
| pY | : Pointer to y-Coord to populate |
- Returns
- true if touch is detected or false if otherwise
Definition at line 621 of file board.c.
Sets up I2C Fast Plus mode.
- Parameters
-
- 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 142 of file board.h.
Sets up board specific I2C interface.
- Parameters
-
| id | : I2C Peripheral ID (I2C0 or I2C1) |
- Returns
- Nothing
- Parameters
-
| id | : I2C Peripheral ID (I2C0, I2C1) |
- Returns
- Nothing
- Parameters
-
| id | : I2C Peripheral ID (I2C0 or I2C1) |
- Returns
- Nothing
- Parameters
-
| id | : I2C Peripheral ID (I2C0, I2C1) |
- Returns
- Nothing
Definition at line 541 of file board.c.
| void Board_InitLCDController |
( |
void |
| ) |
|
Initialize the LCD controller on the QVGA (320x240) TFT LCD.
- Returns
- Nothing
Initializes the LCD Controller.
- Returns
- Nothing
Definition at line 565 of file board.c.
| void Board_InitTouchController |
( |
void |
| ) |
|
Initialize touchscreen controller.
- Returns
- Nothing
Definition at line 590 of file board.c.
| void Board_Joystick_Init |
( |
void |
| ) |
|
Initialize joystick interface on board.
- Returns
- Nothing
Initializes board specific joystick.
- Returns
- Nothing
Definition at line 489 of file board.c.
| void Board_LCD_Init |
( |
void |
| ) |
|
Initialize the LCD interface.
- Returns
- Nothing
Definition at line 554 of file board.c.
| void Board_SDMMC_Init |
( |
void |
| ) |
|
Initialize pin muxing for SDMMC interface.
- Returns
- Nothing
Sets up board specific SDMMC interface.
- Returns
- Nothing
Definition at line 689 of file board.c.
| void Board_SetLCDBacklight |
( |
uint8_t |
Intensity | ) |
|
Set LCD Backlight.
- Returns
- Nothing
Set 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.
Initialize pin muxing for SSP interface.
- Parameters
-
| pSSP | : Pointer to SSP interface to initialize |
- Returns
- Nothing
Sets up board specific SSP interface.
- Parameters
-
| pSSP | : Pointer to SSP interface to initialize |
- Returns
- Nothing
Definition at line 704 of file board.c.
Initialize the UART interface.
- Parameters
-
| pUART | : Pointer to UART register interface used on this board |
- Returns
- Nothing
- Note
- This function will currently support USART2 only, it will setup USART2 pin mux [P2.10 : UART2_TXD J3 -> Pin 8, P2.11 : UART2_RXD -> J3 Pin-7]. For other UART/USART the application should setup pin-muxing on its own.
Initialize the UART interface.
- Parameters
-
| pUART | : Pointer to UART register block for UART pins to init |
- Returns
- Nothing
Definition at line 356 of file board.c.
| uint32_t Buttons_GetStatus |
( |
void |
| ) |
|
Returns button(s) state on board.
- Returns
- Returns BUTTONS_BUTTON1 if button1 is pressed
Definition at line 479 of file board.c.
| uint8_t Joystick_GetStatus |
( |
void |
| ) |
|
Returns joystick states on board.
- Returns
- Returns a JOY_* value, ir JOY_PRESS or JOY_UP
Initialize joystick interface on board.
- Returns
- Returns a JOY_* value, ir JOY_PRESS or JOY_UP
Definition at line 493 of file board.c.