GPIO Example#
Overview#
This sample is a GPIO HAL regression test.
Source file:
src/rtsmart/examples/peripheral/gpio/test_gpio.c
Sample Behavior#
pin mapping
instance creation and destruction
mode switching
level read and write
toggle behavior
IRQ registration
Key APIs#
drv_fpioa_set_pin_func()drv_gpio_inst_create()/drv_gpio_inst_destroy()drv_gpio_mode_set()/drv_gpio_mode_get()drv_gpio_value_set()/drv_gpio_value_get()/drv_gpio_toggle()drv_gpio_register_irq()/drv_gpio_unregister_irq()
Build and Run#
cd src/rtsmart/examples/peripheral/gpio
make
./test_gpio
