In e² studio, when you install the support for Road test: Renesas Solution Starter Kit for RX23E-A, the FIT directory does not include the smart configurator module r_gpio_rx. For non-Renesas developers: this is the HAL API for GPIO. easter egg: I may get comments that HALs are not the way to go.
It is possible to add it. Follow these steps:
In the smart configurator, components tab, click on the + sign to add a module, Select Download the latest FIT drivers and middleware:
Deselect Show RX Driver Package only, then select the GPIO Module
Download
Deselect the Hide items that have duplicated functionality (there is overlap with the PORTS driver for initialisation, but we won't use the GPIO API for that).
Select GPIO Driver, Finish
If you now generate code, the HAL API (header and source) are generated.
Example code (it's the blinky from my previous post, ported to the r_gpio_rx API):
// ... #include "r_gpio_rx_if.h" #define LED1 (GPIO_PORT_H_PIN_2) // ... void main(void) { R_GPIO_PinWrite(LED1, GPIO_LEVEL_LOW); bool state = false; do { state = !state; R_GPIO_PinWrite(LED1, state ? GPIO_LEVEL_HIGH : GPIO_LEVEL_LOW); // silly wait for (int i = 0; i < 10000000; i++) {}; } while (1); }