Basic UART Example

Echo characters received on a UART

API Features Demonstrated

Platforms

This app works on:

Requirements and Prerequisites

Requires a Gecko OS evaluation board, such as a WGM160P_eval.

Other Gecko OS hardware can also be used by changing the source of the logged data to suit your device.

Description

The app configures the UART and echoes characters received on the UART. Keys typed into a Gecko OS terminal are echoed back to the terminal.

Usage Instructions

Connect a serial terminal application to the Gecko OS device UART.

The terminal application should be set to match the Gecko OS app configuration:

On running the app displays on the Gecko OS terminal:

>UART App Ready. Type something ...

Each character you type appears on the terminal.

Implementation

gos_app_init:

uart_rx_callback:

gos_event_issue(uart_rx_event_handler, NULL, GOS_EVENT_FLAGS1(FROM_IRQ)) 

See also: Execution Context, Hardware IRQ.

uart_rx_event_handler:

gos_app_deinit:

Source

See: