tinyusb  0.4
Click here to lend your support to tinyusb donation and make a donation at pledgie.com
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

All the board must support these APIs. More...

Functions

void board_init (void)
 Initialize all required peripherals on board including uart, led, buttons etc ...
 
void board_leds (uint32_t on_mask, uint32_t off_mask)
 Turns on and off leds on the board. More...
 
uint32_t board_buttons (void)
 Get the current state of the buttons on the board. More...
 
uint8_t board_uart_getchar (void)
 Get a character input from UART. More...
 
void board_uart_putchar (uint8_t c)
 Send a character to UART. More...
 

Detailed Description

All the board must support these APIs.

Function Documentation

uint32_t board_buttons ( void  )

Get the current state of the buttons on the board.

Returns
Bitmask where a '1' means active (pressed), a '0' means inactive.
void board_leds ( uint32_t  on_mask,
uint32_t  off_mask 
)

Turns on and off leds on the board.

Parameters
[in]on_maskBitmask for LED's numbers is turning ON
[out]off_maskBitmask for LED's numbers is turning OFF
Note
the on_mask is more priority then off_mask, if an led's number is present on both. It will be turned ON.
uint8_t board_uart_getchar ( void  )

Get a character input from UART.

Returns
ASCII code of the input character or zero if none.
void board_uart_putchar ( uint8_t  c)

Send a character to UART.

Parameters
[in]cthe character to be sent