Clemens Valens / board

Dependents:   kinetisizer

Embed: (wiki syntax)

« Back to documentation index

BOARD: Common board functions

BOARD: Common board functions

This file contains common board definitions that are shared across boards and devices. More...

Typedefs

typedef void(* p_msDelay_func_t )(uint32_t)
 Function prototype for a MS delay function.

Functions

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

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.


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 142 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 102 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 221 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 129 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 154 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 182 of file board.c.

void Board_SetupClocking ( void   )

Setup system clocking.

Returns:
None
Note:
This sets up board clocking.

Definition at line 83 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 74 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 89 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 81 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 71 of file board.c.

void Board_UARTPutSTR ( char *  str )

Prints a string to the UART.

Parameters:
str: Terminated string to output
Returns:
None

Definition at line 92 of file board.c.