SBUS Example#
Introduction#
This example sends SBUS frames via UART3, and dynamically modifies channel values when a button is pressed.
Source code location: src/rtsmart/examples/peripheral/sbus/test_sbus.c
Example Behavior#
Configured via FPIOA:
GPIO21as button inputPIN50->UART3_TXDPIN51->UART3_RXD
Sends a set of default frames after initialization
Cycles through channel values and sends when the button is pressed
The main loop continuously sends SBUS frames at a fixed period
Key Interfaces#
drv_fpioa_set_pin_func()drv_gpio_inst_create()/drv_gpio_value_get()sbus_create()/sbus_destroy()sbus_set_channel()/sbus_send_frame()
Build and Run#
cd src/rtsmart/examples/peripheral/sbus
make
./test_sbus
This example has no command-line arguments.
Tip
SBUS uses UART for transmission. For UART-related parameters and interfaces, please refer to the UART API Documentation.
