|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Board-identity, LEDs, switches, display, audio, Arduino, Pmod, and MikroBUS portion of the EK-RA8D2 v1 board-support layer. More...
Go to the source code of this file.
Data Structures | |
| struct | ra8_board_info_t |
| Snapshot of board identity strings. More... | |
| struct | ra8_board_glcdc_pin_t |
| One row of the GLCDC pin table – (signal name, RA8D2 pin). More... | |
Typedefs | |
| typedef void(* | ra8_board_sw_irq_cb_t) (void *ctx) |
| Switch IRQ callback signature. | |
Enumerations | |
| enum | ra8_board_led_id_t : uint8_t { k_ra8_board_led1 = 0U , k_ra8_board_led2 = 1U , k_ra8_board_led3 = 2U , k_ra8_board_led_blue = k_ra8_board_led1 , k_ra8_board_led_green = k_ra8_board_led2 , k_ra8_board_led_red = k_ra8_board_led3 , k_ra8_board_led_count = 3U } |
| Identifiers for the three user LEDs on EK-RA8D2 v1. More... | |
| enum | ra8_board_sw_id_t : uint8_t { k_ra8_board_sw1 = 0U , k_ra8_board_sw2 = 1U , k_ra8_board_sw_count = 2U } |
| Identifiers for the on-board user push-buttons. More... | |
| enum | ra8_board_sw_irq_t : uint8_t { k_ra8_board_sw1_irq = 13U , k_ra8_board_sw2_irq = 12U } |
| Per-switch IRQ channel numbers (UM Table 25 p 32). More... | |
| enum | ra8_board_sw_state_t : uint8_t { k_ra8_board_sw_released = 0U , k_ra8_board_sw_pressed = 1U } |
| Logical "pressed" / "released" state. More... | |
| enum | ra8_board_glcdc_fmt_t : uint8_t { k_ra8_board_glcdc_fmt_rgb888 = 0U , k_ra8_board_glcdc_fmt_rgb666 = 1U , k_ra8_board_glcdc_fmt_rgb565 = 2U } |
| GLCDC parallel-RGB pixel formats supported by EK-RA8D2 J1. More... | |
| enum | ra8_board_lcd_gpio_pin_t : uint16_t { k_ra8_board_lcd_reset_l = (uint16_t)k_ra8_pin_lcd_reset_l , k_ra8_board_lcd_blen = (uint16_t)k_ra8_pin_lcd_blen } |
| Board-style aliases for the J1 LCD GPIO control pins. More... | |
| enum | ra8_board_audio_pin_t : uint16_t { k_ra8_board_audio_pin_bclk , k_ra8_board_audio_pin_wclk , k_ra8_board_audio_pin_datin , k_ra8_board_audio_pin_datout , k_ra8_board_audio_pin_mclk , k_ra8_board_audio_pin_i2c_sda , k_ra8_board_audio_pin_i2c_scl } |
| Pin assignments for the on-board DA7212 audio CODEC. More... | |
| enum | ra8_board_audio_ch_t : uint8_t { k_ra8_board_audio_ssie_channel = 0U } |
| SSIE channel the CODEC is wired to. More... | |
| enum | ra8_board_arduino_pin_t : uint16_t { k_ra8_board_arduino_d0 , k_ra8_board_arduino_d1 , k_ra8_board_arduino_d2 , k_ra8_board_arduino_d3 , k_ra8_board_arduino_d4 , k_ra8_board_arduino_d5 , k_ra8_board_arduino_d6 , k_ra8_board_arduino_d7 , k_ra8_board_arduino_d8 , k_ra8_board_arduino_d9 , k_ra8_board_arduino_d10 , k_ra8_board_arduino_d11 , k_ra8_board_arduino_d12 , k_ra8_board_arduino_d13 , k_ra8_board_arduino_d14 , k_ra8_board_arduino_d15 , k_ra8_board_arduino_a0 , k_ra8_board_arduino_a1 , k_ra8_board_arduino_a2 , k_ra8_board_arduino_a3 , k_ra8_board_arduino_a4 , k_ra8_board_arduino_a5 } |
| Logical Arduino-header pins mapped to RA8D2 port pins. More... | |
| enum | ra8_board_arduino_mode_t : uint8_t { k_ra8_board_arduino_mode_input = 0U , k_ra8_board_arduino_mode_input_pullup = 1U , k_ra8_board_arduino_mode_output = 2U } |
| Direction mode for an Arduino-header GPIO pin. More... | |
| enum | ra8_board_pmod_id_t : uint8_t { k_ra8_board_pmod1 = 0U , k_ra8_board_pmod2 = 1U , k_ra8_board_pmod_count = 2U } |
| Identifiers for the two Pmod sockets. More... | |
| enum | ra8_board_pmod1_spi_pin_t : uint16_t { k_ra8_board_pmod1_spi_cs = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_8) << 8) | (uint16_t)(k_ra8_pin_4))) , k_ra8_board_pmod1_spi_copi , k_ra8_board_pmod1_spi_cipo , k_ra8_board_pmod1_spi_sck } |
| Pin assignments for Pmod1 (J26) in SPI mode (UM Table 17 p 26). More... | |
| enum | ra8_board_pmod1_uart_pin_t : uint16_t { k_ra8_board_pmod1_uart_txd , k_ra8_board_pmod1_uart_rxd , k_ra8_board_pmod1_uart_cts , k_ra8_board_pmod1_uart_rts } |
| Pin assignments for Pmod1 (J26) in UART mode (UM Table 17 p 26). More... | |
| enum | ra8_board_pmod1_i2c_pin_t : uint16_t { k_ra8_board_pmod1_i2c_sda , k_ra8_board_pmod1_i2c_scl } |
| Pin assignments for Pmod1 (J26) in I2C mode (UM Table 17 p 26). More... | |
| enum | ra8_board_pmod1_gpio_pin_t : uint16_t { k_ra8_board_pmod1_irq , k_ra8_board_pmod1_reset , k_ra8_board_pmod1_gpio_a , k_ra8_board_pmod1_gpio_b } |
| Pin assignments for Pmod1 GPIO + IRQ side-band (UM Table 17 p 26). More... | |
| enum | ra8_board_pmod_sci_channel_t : uint8_t { k_ra8_board_pmod1_sci_channel = 2U , k_ra8_board_pmod2_sci_channel = 0U } |
| SCI channels that back the two Pmod sockets in Simple-SPI mode. More... | |
| enum | ra8_board_pmod2_spi_pin_t : uint16_t { k_ra8_board_pmod2_spi_cs = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_6) << 8) | (uint16_t)(k_ra8_pin_4))) , k_ra8_board_pmod2_spi_copi , k_ra8_board_pmod2_spi_cipo , k_ra8_board_pmod2_spi_sck } |
| Pin assignments for Pmod2 (J25) in SPI mode (UM Table 19 p 27). More... | |
| enum | ra8_board_pmod2_uart_pin_t : uint16_t { k_ra8_board_pmod2_uart_txd , k_ra8_board_pmod2_uart_rxd , k_ra8_board_pmod2_uart_cts , k_ra8_board_pmod2_uart_rts } |
| Pin assignments for Pmod2 (J25) in UART mode (UM Table 19 p 27). More... | |
| enum | ra8_board_pmod2_gpio_pin_t : uint16_t { k_ra8_board_pmod2_irq , k_ra8_board_pmod2_reset , k_ra8_board_pmod2_gpio_a , k_ra8_board_pmod2_gpio_b } |
| Pin assignments for Pmod2 GPIO + IRQ side-band (UM Table 19 p 27). More... | |
| enum | ra8_board_mikrobus_pin_t : uint16_t { k_ra8_board_mikrobus_an = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_0) << 8) | (uint16_t)(k_ra8_pin_4))) , k_ra8_board_mikrobus_rst = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_2) << 8) | (uint16_t)(k_ra8_pin_1))) , k_ra8_board_mikrobus_cs = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_1) << 8) | (uint16_t)(k_ra8_pin_3))) , k_ra8_board_mikrobus_sck = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_1) << 8) | (uint16_t)(k_ra8_pin_2))) , k_ra8_board_mikrobus_cipo = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_1) << 8) | (uint16_t)(k_ra8_pin_0))) , k_ra8_board_mikrobus_copi = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_1) << 8) | (uint16_t)(k_ra8_pin_1))) , k_ra8_board_mikrobus_pwm = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_8) << 8) | (uint16_t)(k_ra8_pin_10))) , k_ra8_board_mikrobus_int = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_13) << 8) | (uint16_t)(k_ra8_pin_1))) , k_ra8_board_mikrobus_rx = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_8) << 8) | (uint16_t)(k_ra8_pin_8))) , k_ra8_board_mikrobus_tx = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_8) << 8) | (uint16_t)(k_ra8_pin_9))) } |
| MikroBUS slot wiring on this board. More... | |
| enum | ra8_board_mikrobus_i2c_pin_t : uint16_t { k_ra8_board_mikrobus_i2c_sda = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_5) << 8) | (uint16_t)(k_ra8_pin_11))) , k_ra8_board_mikrobus_i2c_scl = (uint16_t) ((ra8_port_pin_t)(((uint16_t)(k_ra8_port_5) << 8) | (uint16_t)(k_ra8_pin_12))) } |
| MikroBUS J22.5 / J22.6 I2C lines. More... | |
| enum | ra8_board_mikrobus_iic_channel_t : uint8_t { k_ra8_board_mikrobus_iic_b_channel = 0U } |
| I2C peripheral channel that backs the MikroBUS SDA/SCL pins. More... | |
| enum | ra8_board_mikrobus_uart_channel_t : uint8_t { k_ra8_board_mikrobus_uart_sci_channel = 7U } |
| SCI channel that backs the MikroBUS J22.3/J22.4 UART pins. More... | |
| enum | ra8_board_pi4ioe_project_t : uint8_t { k_ra8_board_pi4ioe_output_project_default = 0xF2U , k_ra8_board_pi4ioe_output_octospi_active = 0xF8U , k_ra8_board_pi4ioe_output_usbhs_host = 0x72U } |
| Required SW4 DIP-switch positions for this project's wiring. More... | |
| enum | ra8_board_sdhi_pin_t : uint16_t { k_ra8_board_sdhi_cmd , k_ra8_board_sdhi_clk , k_ra8_board_sdhi_dat0 , k_ra8_board_sdhi_dat1 , k_ra8_board_sdhi_dat2 , k_ra8_board_sdhi_dat3 , k_ra8_board_sdhi_wp , k_ra8_board_sdhi_cd } |
| Pin assignments for the native 4-bit SDHI0 micro-SD bus. More... | |
| enum | ra8_board_sdhi_instance_t : uint8_t { k_ra8_board_sdhi_instance = 0U } |
| SDHI instance that backs the ra8_board_sdhi_pin_t bus pins. More... | |
Functions | |
| ra8_err_t | ra8_board_get_info (ra8_board_info_t *out) |
| Copy the three board-identity strings into out. | |
| ra8_err_t | ra8_board_led_init (ra8_board_led_id_t led) |
| Configure led as a digital output, initial level low (off). | |
| ra8_err_t | ra8_board_led_on (ra8_board_led_id_t led) |
| Drive led HIGH (light it). | |
| ra8_err_t | ra8_board_led_off (ra8_board_led_id_t led) |
| Drive led LOW (extinguish it). | |
| ra8_err_t | ra8_board_led_toggle (ra8_board_led_id_t led) |
| Toggle led's output state. | |
| ra8_err_t | ra8_board_led_pin (ra8_board_led_id_t led, ra8_port_pin_t *out_pin) |
| Translate a board LED id into its underlying ra8_port_pin_t. | |
| ra8_err_t | ra8_board_sw_init (ra8_board_sw_id_t sw) |
| Configure a switch pin as an input with internal pull-up. | |
| ra8_err_t | ra8_board_sw_read (ra8_board_sw_id_t sw, ra8_board_sw_state_t *out_pressed) |
| Sample the current state of sw. | |
| ra8_err_t | ra8_board_sw_attach_irq (ra8_board_sw_id_t sw, ra8_board_sw_irq_cb_t cb, void *ctx) |
| Wire sw to the ICU and register a falling-edge callback. | |
| ra8_err_t | ra8_board_sw_pin (ra8_board_sw_id_t sw, ra8_port_pin_t *out_pin) |
| Translate a board switch id into its underlying ra8_port_pin_t. | |
| ra8_err_t | ra8_board_glcdc_init (ra8_board_glcdc_fmt_t fmt) |
| Program every J1 pin for fmt to its GLCDC alternate function. | |
| ra8_err_t | ra8_board_lcd_panel_power_on (void) |
| Pulse the J1 panel's RESET_L line and assert BLEN backlight. | |
| ra8_err_t | ra8_board_backlight_set (bool on) |
| Turn the J1 panel backlight (BLEN, P514) on or off. | |
| ra8_err_t | ra8_board_audio_init (uint32_t sample_rate_hz, uint8_t bit_depth, uint8_t channels) |
| Route the CODEC pins and bring up SSIE0 in I2S controller mode. | |
| ra8_err_t | ra8_board_audio_play_sample_block (const int16_t *buf, uint32_t len) |
| Push one block of stereo PCM samples to the CODEC's DAC. | |
| ra8_err_t | ra8_board_arduino_pin_init (ra8_board_arduino_pin_t pin, ra8_board_arduino_mode_t mode) |
| Configure an Arduino header pin in GPIO mode. | |
| ra8_err_t | ra8_board_arduino_gpio_write (ra8_board_arduino_pin_t pin, ra8_level_t level) |
| Drive a previously-initialized Arduino GPIO pin. | |
| ra8_err_t | ra8_board_arduino_gpio_read (ra8_board_arduino_pin_t pin, ra8_level_t *out_level) |
| Sample a previously-initialized Arduino GPIO pin. | |
| ra8_err_t | ra8_board_sdhi_pins_init (void) |
| Route the eight SDHI0 bus pins to the SDHI peripheral function. | |
Variables | |
| const char *const | k_ra8_board_name |
| Human-readable strings identifying this BSP target. | |
| const char *const | k_ra8_board_doc_rev |
| "R20UT5523EG0101 Rev 1.01". | |
| const char *const | k_ra8_board_mcu |
| "R7KA8D2KFLCAC". | |
| const ra8_board_glcdc_pin_t | g_ra8_board_glcdc_rgb888_pins [] |
| Pin tables for J1 in each pixel format (UM Table 33 p 42). | |
| const ra8_board_glcdc_pin_t | g_ra8_board_glcdc_rgb666_pins [] |
| RGB666-mode pin table for J1 (UM Table 33 p 42). | |
| const ra8_board_glcdc_pin_t | g_ra8_board_glcdc_rgb565_pins [] |
| RGB565-mode pin table for J1 (UM Table 33 p 42). | |
| const uint32_t | g_ra8_board_glcdc_rgb888_pin_count |
| Number of entries in each per-format pin table. | |
| const uint32_t | g_ra8_board_glcdc_rgb666_pin_count |
| const uint32_t | g_ra8_board_glcdc_rgb565_pin_count |
Board-identity, LEDs, switches, display, audio, Arduino, Pmod, and MikroBUS portion of the EK-RA8D2 v1 board-support layer.
Sub-header of ra8_board_ek_ra8d2.h (the thin umbrella). Carries the board-identity strings + struct, the user LEDs (Section 1), user switches (Section 2), the parallel-RGB graphics expansion connector J1 (Section 3), the DA7212 audio CODEC (Section 4), the Arduino Uno header (Section 5), the Pmod1/Pmod2 sockets (Section 6), and the MikroBUS slot (Section 6b) together with the project SW4 DIP layout enum (Section 6c).
Every declaration here was moved VERBATIM out of ra8_board_ek_ra8d2.h; no contract, Doxygen block, or HUM/UM citation has changed. Consumers keep including ra8_board_ek_ra8d2.h; this file is pulled in by that umbrella and should not be included directly.
Authoritative source: docs/reference/ek-ra8d2-v1-users-manual.pdf (Rev 1.01, R20UT5523EG0101, October 2025).
Definition in file ra8_board_ek_ra8d2_connectors.h.
| typedef void(* ra8_board_sw_irq_cb_t) (void *ctx) |
Switch IRQ callback signature.
Definition at line 231 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_arduino_mode_t : uint8_t |
Direction mode for an Arduino-header GPIO pin.
Definition at line 528 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_arduino_pin_t : uint16_t |
Logical Arduino-header pins mapped to RA8D2 port pins.
Per UM Table 20 ("Arduino Uno Port Assignments"). Several pins are gated by SW4-4 (Arduino vs Octo-SPI). PWM/GTIOC routings noted in UM Table 20 are reflected in the comments. SW4-4 must be ON to use the Arduino headers (default OFF prioritises Octo-SPI).
Definition at line 465 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_audio_ch_t : uint8_t |
SSIE channel the CODEC is wired to.
P403..P406 carry SSIE0 signals on the RA8D2 (see chip HUM I/O Ports chapter for PSEL values). Channel selection itself is not in the EK-RA8D2 board manual, only the chip pins.
| Enumerator | |
|---|---|
| k_ra8_board_audio_ssie_channel | RA8 board audio ssie channel. |
Definition at line 418 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_audio_pin_t : uint16_t |
Pin assignments for the on-board DA7212 audio CODEC.
Per UM Table 32 ("Audio CODEC Port Pin Assignments"). P405/P406 are shared with the parallel-camera connector via jumper J41; the camera and CODEC cannot be used simultaneously.
Definition at line 393 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_glcdc_fmt_t : uint8_t |
GLCDC parallel-RGB pixel formats supported by EK-RA8D2 J1.
| Enumerator | |
|---|---|
| k_ra8_board_glcdc_fmt_rgb888 | 24-bit, 8 bits/colour. |
| k_ra8_board_glcdc_fmt_rgb666 | 18-bit, 6 bits/colour. |
| k_ra8_board_glcdc_fmt_rgb565 | 16-bit, 5/6/5 bits. |
Definition at line 262 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_lcd_gpio_pin_t : uint16_t |
Board-style aliases for the J1 LCD GPIO control pins.
The underlying ra8_port_pin_t enum members live in libs/ra8_core/inc/ra8_port_constants.h (the same place LED1/2/3 are declared) so casting them to ra8_port_pin_t is type-safe for the analyzer. Source: EK-RA8D2 v1 UM Table 33 p 42.
| Enumerator | |
|---|---|
| k_ra8_board_lcd_reset_l | J1-6 RST, P606 (active-low). |
| k_ra8_board_lcd_blen | J1-1 BLEN, P514 (active-high). |
Definition at line 319 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_led_id_t : uint8_t |
Identifiers for the three user LEDs on EK-RA8D2 v1.
Pins per UM Table 24 ("EK-RA8D2 Board LED Functions"). Trace-cut jumpers E27/E26/E28 (closed by default) tie the LEDs to P600/P303/PA07 respectively. All three LEDs are active-high.
Definition at line 100 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_mikrobus_i2c_pin_t : uint16_t |
MikroBUS J22.5 / J22.6 I2C lines.
Per UM Table 21 footnote *1, the I3C/I2C pads are switched by SW4-5: OFF = I2C -> P511 (SDA1) / P512 (SCL1); ON = I3C -> P401 (SDA0) / P400 (SCL0). This project always runs in I2C mode, so the symbols below resolve to SDA1/SCL1. Per UM Section 5.4.2 p 30, the on-board pull-ups are not enabled by default; firmware must either enable the internal pad pull-ups via PFS.PCR or rely on the pull-ups inside the IIC_B controller / Click board itself.
| Enumerator | |
|---|---|
| k_ra8_board_mikrobus_i2c_sda | J22.6 SDA (SW4-5 OFF) -> P511 SDA1. |
| k_ra8_board_mikrobus_i2c_scl | J22.5 SCL (SW4-5 OFF) -> P512 SCL1. |
Definition at line 785 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_mikrobus_iic_channel_t : uint8_t |
I2C peripheral channel that backs the MikroBUS SDA/SCL pins.
The RA8D2 group exposes a single IIC_B controller (channel 0). The P511/P512 pins are its SDA1/SCL1 alternate-function pad pair (the SDA0/SCL0 pads at P401/P400 are gated by SW4-5 and not used here). Firmware that talks to a MikroBUS Click over I2C should call ra8_i3c_i2c_init with this channel.
| Enumerator | |
|---|---|
| k_ra8_board_mikrobus_iic_b_channel | RA8 board mikrobus iic b channel. |
Definition at line 801 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_mikrobus_pin_t : uint16_t |
MikroBUS slot wiring on this board.
The EK-RA8D2 v1 carries a mikroBUS-compatible footprint at J21/J22 in the center of the System Control + Ecosystem Access area (UM Rev 1.01 Section 5.3.5 Figure 16 p 29). The socket is not populated by default; the user can either solder the standard mikroBUS headers onto J21/J22 to plug a MikroE Click in directly, or use a Click-Shield-style breakout over the Arduino UNO header (Table 20 p 28) – both routes terminate at the same RA8D2 pads.
For this project's physical bring-up:
Per UM Table 21 p 29, all twelve mikroBUS signals are mapped below. Software callers should only enable the subset they need (e.g. the IMU demo touches just I2C).
Definition at line 751 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_mikrobus_uart_channel_t : uint8_t |
SCI channel that backs the MikroBUS J22.3/J22.4 UART pins.
The MikroBUS RX/TX pads (k_ra8_board_mikrobus_rx = P808 / k_ra8_board_mikrobus_tx = P809, UM Table 21 p 29) are the RXD7 / TXD7 alternate-function pair, i.e. SCI channel 7, enabled by SW4-4 ON. A MikroE cellular Click (LTE IoT / 4G LTE / NB-IoT, all AT-command modems) presents its UART on exactly these MikroBUS pins, so firmware that drives an AT modem should call ra8_sci_init with this channel.
Exposed as an enum (not a magic 7) so applications reference the channel through the board layer rather than re-encoding the pin-mux mapping. Distinct from k_ra8_board_uart_console_sci_channel (SCI8, the J-Link OB VCOM debug console).
| Enumerator | |
|---|---|
| k_ra8_board_mikrobus_uart_sci_channel | P808/P809 -> RXD7/TXD7 = SCI7 (SW4-4 ON). |
Definition at line 821 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pi4ioe_project_t : uint8_t |
Required SW4 DIP-switch positions for this project's wiring.
The on-board SW4 8-position DIP picks which of the chip's muxed peripherals the EK-RA8D2 routes to its connectors. Per UM Table 3 p 16, each bit governs a different routing decision, several of which conflict (SW4-3 vs SW4-4 vs the Pmod1 mode bits). The layout below is the one this project's wiring assumes:
| SW4 | Position | Reason |
|---|---|---|
| 1 | ON | Pmod1 Mode-Sel-1 (with SW4-2 OFF -> UART; Pmod1 free). |
| 2 | OFF | Pmod1 Mode-Sel-2 (UART, see Table 18). |
| 3 | ON | Octo-SPI Inactive – frees Pmod1/Arduino/mikroBUS. |
| 4 | ON | Arduino + mikroBUS Connectors Active (IMU on mikroBUS). |
| 5 | OFF | I2C Active on mikroBUS (P511/P512 SDA1/SCL1). |
| 6 | OFF | Default – Parallel Display + MIPI Camera. |
| 7 | OFF | Default – USBFS role toggle in mechanical OFF. |
| 8 | OFF | Default – USBHS in Device mode. |
ra8_board_io_expander_apply_project_sw4_defaults programs this pattern into the U15 PI4IOE5V6408 expander in push-pull output mode (iodir=0xFF, hiz=0x00, output=0xF2), which the EK-RA8D2 UM (Sec 4.3.4 p 15) says overrides the SW4 DIP switches in software. The earlier issue-#44 reading of u15: pins=0000 was a FALSE ALARM: a 2026-06-11 U15 drive test (out=FF->pins=0000 out=00->pins=0000) shows the PI4IOE5V6408 input-status register (0x0F) reads 0x00 for any pin held in output mode – it does not reflect output pins – so it never measured the mux. The override is valid; the DIP does NOT need to be touched for this layout.
Definition at line 866 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pmod1_gpio_pin_t : uint16_t |
Pin assignments for Pmod1 GPIO + IRQ side-band (UM Table 17 p 26).
Definition at line 620 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pmod1_i2c_pin_t : uint16_t |
Pin assignments for Pmod1 (J26) in I2C mode (UM Table 17 p 26).
| Enumerator | |
|---|---|
| k_ra8_board_pmod1_i2c_sda | Pmod1 I2C SDA (SDA1), P511. UM Table 17 p 26. |
| k_ra8_board_pmod1_i2c_scl | Pmod1 I2C SCL (SCL1), P512. UM Table 17 p 26. |
Definition at line 610 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pmod1_spi_pin_t : uint16_t |
Pin assignments for Pmod1 (J26) in SPI mode (UM Table 17 p 26).
Pmod1 uses SCI2 in "Simple SPI" mode and is selected by SW4-1=OFF
Definition at line 579 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pmod1_uart_pin_t : uint16_t |
Pin assignments for Pmod1 (J26) in UART mode (UM Table 17 p 26).
Definition at line 594 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pmod2_gpio_pin_t : uint16_t |
Pin assignments for Pmod2 GPIO + IRQ side-band (UM Table 19 p 27).
Definition at line 706 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pmod2_spi_pin_t : uint16_t |
Pin assignments for Pmod2 (J25) in SPI mode (UM Table 19 p 27).
Pmod2 SPI on P601..P604 is SCI0 in Simple-SPI mode, not the RSPI/SPI_B peripheral: HUM Table 20.13 (PORT6) routes these pins at PSEL = 00100b (k_ra8_psel_sci_async) to SCK0_B / CIPO0_B (MISO0_B) / COPI0_B (MOSI0_B) / SS0_B – the SPI (PSEL = 00110b) function has no mapping on P601..P604 (RSPCKB/MOSIB/MISOB live on P609..P611). The EK UM Table 19 labels them RSPCKB/MOSIB/MISOB after the bus role, but the silicon drives them from SCI0; use ::ra8_sci_spi (channel 0) as the controller. Both UART and Simple-SPI share the SCI function; jumpers E10/E14/E15/E16 select SPI vs UART signalling on pins 1/4.
Definition at line 675 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pmod2_uart_pin_t : uint16_t |
Pin assignments for Pmod2 (J25) in UART mode (UM Table 19 p 27).
Definition at line 690 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pmod_id_t : uint8_t |
Identifiers for the two Pmod sockets.
Definition at line 565 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_pmod_sci_channel_t : uint8_t |
SCI channels that back the two Pmod sockets in Simple-SPI mode.
Both Pmod sockets are driven by an SCI channel in Simple-SPI mode rather than by the RSPI/SPI_B peripheral, so firmware opens them with ra8_sci_spi_init on the channel named here. Pmod1 (J26) sits on SCI2 via P801..P804 (UM Table 17 p 26); Pmod2 (J25) sits on SCI0 via P601..P604 (UM Table 19 p 27). Both channel indices are a fixed board fact of the EK-RA8D2 routing, which is why they live here rather than in each application.
| Enumerator | |
|---|---|
| k_ra8_board_pmod1_sci_channel | Pmod1 (J26) Simple-SPI is SCI2. |
| k_ra8_board_pmod2_sci_channel | Pmod2 (J25) Simple-SPI is SCI0. |
Definition at line 656 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_sdhi_instance_t : uint8_t |
SDHI instance that backs the ra8_board_sdhi_pin_t bus pins.
Exposed as a typed enum (not a macro) so applications can pass the instance index to ra8_sdcard_init / ra8_sdhi_init without re-encoding the literal. The port-4 pin map above is the SDHI 0 function group in the chip HUM I/O Ports chapter.
| Enumerator | |
|---|---|
| k_ra8_board_sdhi_instance | SDHI0 (chip HUM Ch 20.6 SDHI pin group). |
Definition at line 948 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_sdhi_pin_t : uint16_t |
Pin assignments for the native 4-bit SDHI0 micro-SD bus.
The RA8D2 routes the SDHI0 SD/MMC host-controller signals to port 4 pins 0..7 under PSEL = k_ra8_psel_sdhi (chip HUM Ch 20.6 "Multiplexed Pin Function Selector"). In bus order the eight pins are CMD / CLK / DAT0 / DAT1 / DAT2 / DAT3 / WP (write-protect) / CD (card-detect). The values are (port << 8) | pin encodings in the ra8_port_pin_t value space, matching every other board-pin enum in this header.
Definition at line 920 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_sw_id_t : uint8_t |
Identifiers for the on-board user push-buttons.
Pins per UM Table 25 ("EK-RA8D2 Board Switches"). SW3 is tied to the chip RESET_L line and is therefore not exposed as a software-readable input here.
Definition at line 175 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_sw_irq_t : uint8_t |
Per-switch IRQ channel numbers (UM Table 25 p 32).
SW1 -> IRQ13-DS, SW2 -> IRQ12-DS. The "-DS" suffix means deep-sleep wake capable. Values are bare IRQ channel numbers usable with ra8_icu_configure_irq_pin.
| Enumerator | |
|---|---|
| k_ra8_board_sw1_irq | SW1 -> IRQ13-DS. UM Table 25 p 32. |
| k_ra8_board_sw2_irq | SW2 -> IRQ12-DS. UM Table 25 p 32. |
Definition at line 189 of file ra8_board_ek_ra8d2_connectors.h.
| enum ra8_board_sw_state_t : uint8_t |
Logical "pressed" / "released" state.
| Enumerator | |
|---|---|
| k_ra8_board_sw_released | RA8 board sw released. |
| k_ra8_board_sw_pressed | RA8 board sw pressed. |
Definition at line 195 of file ra8_board_ek_ra8d2_connectors.h.
|
nodiscard |
Sample a previously-initialized Arduino GPIO pin.
Definition at line 803 of file ra8_board_ek_ra8d2.c.
References k_ra8_err_invalid_arg, pin, and ra8_gpio_read().
|
nodiscard |
Drive a previously-initialized Arduino GPIO pin.
Definition at line 798 of file ra8_board_ek_ra8d2.c.
References pin, and ra8_gpio_write().
|
nodiscard |
Configure an Arduino header pin in GPIO mode.
| k_ra8_ok | / k_ra8_err_invalid_arg / k_ra8_err_gpio_conflict |
Definition at line 784 of file ra8_board_ek_ra8d2.c.
References k_ra8_board_arduino_mode_input, k_ra8_board_arduino_mode_input_pullup, k_ra8_board_arduino_mode_output, k_ra8_err_invalid_arg, k_ra8_level_low, k_ra8_pull_none, k_ra8_pull_up, pin, ra8_gpio_input_init(), and ra8_gpio_output_init().
|
nodiscard |
Route the CODEC pins and bring up SSIE0 in I2S controller mode.
| k_ra8_ok | / k_ra8_err_invalid_arg / k_ra8_err_gpio_conflict |
Definition at line 203 of file ra8_board_ek_ra8d2_audio_usb.c.
References internal_audio_bits_to_word(), internal_audio_build_ssie_cfg(), internal_audio_route_pins(), k_ra8_audio_channels_mono, k_ra8_audio_channels_stereo, k_ra8_board_audio_ssie_channel, k_ra8_err_hw_init_failed, k_ra8_err_invalid_arg, k_ra8_ok, k_ra8_ssie_dwl_16, k_ra8_ssie_swl_16, ra8_ssie_init(), and s_audio_initialized.
Referenced by internal_audio_loopback_init_codec().
|
nodiscard |
Push one block of stereo PCM samples to the CODEC's DAC.
| [in] | buf | Sample buffer (interleaved L/R, 16-bit). |
| [in] | len | Number of samples (must be even). |
| k_ra8_ok | Block enqueued or transmitted. |
| k_ra8_err_invalid_arg | buf NULL or len odd / zero. |
| k_ra8_err_not_initialized | ra8_board_audio_init not called. |
Definition at line 237 of file ra8_board_ek_ra8d2_audio_usb.c.
References k_ra8_audio_samples_per_word, k_ra8_board_audio_ssie_channel, k_ra8_err_hw_timeout, k_ra8_err_invalid_arg, k_ra8_err_not_initialized, k_ra8_ok, ra8_ssie_write_buffer(), and s_audio_initialized.
Referenced by main().
|
nodiscard |
Turn the J1 panel backlight (BLEN, P514) on or off.
Drives the active-high k_ra8_board_lcd_blen output high (on == true) or low (on == false). BLEN is configured as a GPIO output by ra8_board_lcd_panel_power_on, so this is a level change only – no re-init. Intended for an application idle-dim / auto-off policy: the LED backlight is the single largest load on a battery-powered backlit TFT, so blanking it while the reader sits idle on a static page is the highest-value power saving available. Brightness (PWM) control is a separate capability (BLEN is not routed to a GPT output on this board); this is on/off only.
| [in] | on | true to light the backlight, false to blank it. |
| k_ra8_ok | Backlight level updated. |
| k_ra8_err_invalid_arg | BLEN pin invalid (should not occur). |
| k_ra8_err_gpio_* | Underlying ra8_gpio_write propagated error. |
on. Definition at line 627 of file ra8_board_ek_ra8d2.c.
References k_ra8_level_high, k_ra8_level_low, k_ra8_pin_lcd_blen, and ra8_gpio_write().
Referenced by sh_run().
|
nodiscard |
Copy the three board-identity strings into out.
| [out] | out | Destination struct, must be non-NULL. |
| k_ra8_ok | Filled. |
| k_ra8_err_invalid_arg | out == NULL. |
Definition at line 50 of file ra8_board_ek_ra8d2.c.
References ra8_board_info_t::doc_rev, k_ra8_board_doc_rev, k_ra8_board_mcu, k_ra8_board_name, k_ra8_err_invalid_arg, k_ra8_ok, ra8_board_info_t::mcu, and ra8_board_info_t::name.
|
nodiscard |
Program every J1 pin for fmt to its GLCDC alternate function.
Walks the right table above and calls ra8_pfs_route_peripheral for each entry. Does NOT bring the GLCDC peripheral itself up – call ra8_glcdc_init after this returns.
| k_ra8_ok | All pins routed. |
| k_ra8_err_invalid_arg | fmt out of range. |
| k_ra8_err_gpio_conflict | At least one pin already owned. |
Definition at line 550 of file ra8_board_ek_ra8d2.c.
References g_ra8_board_glcdc_rgb565_pin_count, g_ra8_board_glcdc_rgb565_pins, g_ra8_board_glcdc_rgb666_pin_count, g_ra8_board_glcdc_rgb666_pins, g_ra8_board_glcdc_rgb888_pin_count, g_ra8_board_glcdc_rgb888_pins, internal_glcdc_force_pin_output(), internal_glcdc_signal_is_output(), k_ra8_board_glcdc_fmt_rgb565, k_ra8_board_glcdc_fmt_rgb666, k_ra8_board_glcdc_fmt_rgb888, k_ra8_err_invalid_arg, k_ra8_ok, k_ra8_psel_glcdc, pin, and ra8_pfs_route_peripheral().
Referenced by internal_lcd_bringup_panel(), and internal_lcd_bringup_panel().
|
nodiscard |
Pulse the J1 panel's RESET_L line and assert BLEN backlight.
Drives k_ra8_board_lcd_reset_l low for 50 ms, releases it high, waits another 50 ms for the panel's internal controller to latch reset-release, then drives k_ra8_board_lcd_blen high to enable the backlight. Must be called BEFORE ra8_board_glcdc_init routes the data pins to PSEL=glcdc so the panel sees stable signals by the time GLCDC starts driving them.
| k_ra8_ok | Panel reset released and backlight on. |
| k_ra8_err_invalid_arg | GPIO init for one of the pins failed. |
| k_ra8_err_gpio_* | Underlying ra8_gpio_* propagated error. |
Pulse the J1 panel's RESET_L line and assert BLEN backlight.
See header for caller-facing contract. Body drives RESET_L low for 50 ms, releases it high for another 50 ms to let the panel's internal POR finish, then asserts BLEN.
| k_ra8_ok | Panel out of reset, backlight on. |
| k_ra8_err_gpio_* | Underlying GPIO call failed. |
< Reset pulse ms.
Definition at line 608 of file ra8_board_ek_ra8d2.c.
References k_ra8_level_high, k_ra8_level_low, k_ra8_ok, k_ra8_pin_lcd_blen, k_ra8_pin_lcd_reset_l, ra8_delay_ms(), ra8_gpio_output_init(), and ra8_gpio_write().
Referenced by internal_lcd_bringup_panel(), and internal_lcd_bringup_panel().
|
nodiscard |
Configure led as a digital output, initial level low (off).
| k_ra8_ok | Pin claimed and driven low. |
| k_ra8_err_invalid_arg | led >= k_ra8_board_led_count. |
| k_ra8_err_gpio_conflict | Pin already owned. |
Definition at line 91 of file ra8_board_ek_ra8d2.c.
References k_ra8_level_low, k_ra8_ok, k_ra8_pin_none, pin, ra8_board_led_pin(), and ra8_gpio_output_init().
Referenced by adc_diag_setup_or_halt(), app_bringup_clocks(), blc_setup_or_halt(), c6_probe_setup_or_halt(), cdc_setup_or_halt(), cm_bringup_clocks(), combo_setup_or_halt(), crc_demo_setup_or_halt(), demo_setup_or_halt(), demo_setup_or_halt(), dfu_setup_or_halt(), drw_blend_setup_or_halt(), drw_demo_setup_or_halt(), dtc_arm_setup_or_halt(), dtc_coh_setup_or_halt(), dtc_demo_setup_or_halt(), ep_bringup_core(), ez_bringup_clocks(), fileops_setup_or_halt(), flash_journal_setup_or_halt(), gpt_ecc_clocks_or_halt(), gptp_setup_or_halt(), hid_setup_or_halt(), i3c_demo_setup_or_halt(), iic_setup_or_halt(), imu_demo_setup_or_halt(), internal_acmphs_demo_setup(), internal_agt_periodic_setup_or_halt(), internal_audio_loopback_init_clocks_and_led(), internal_bkup_demo_setup_or_halt(), internal_blink_pins_init(), internal_can_demo_setup_or_halt(), internal_canfd_demo_setup_or_halt(), internal_canfd_filter_setup_or_halt(), internal_clock_check_pins_init(), internal_dac_b_demo_setup_or_halt(), internal_demo_clocks_or_halt(), internal_dotf_demo_setup_or_halt(), internal_gpio_demo_setup_or_halt(), internal_gpt_3p_demo_setup_or_halt(), internal_gpt_irq_demo_setup_or_halt(), internal_gpt_pwm_demo_setup_or_halt(), internal_icu_extint_demo_setup_or_halt(), internal_iic_peripheral_setup_or_halt(), internal_kat_setup_or_halt(), internal_lcd_bringup_clocks(), internal_lpm_deep_setup_or_halt(), internal_lpm_demo_setup_or_halt(), internal_lpm_wake_setup_or_halt(), internal_lvd_demo_setup_or_halt(), internal_mecc_setup_or_halt(), internal_motor_3phase_init_clocks_and_led(), internal_mpu_simple_setup_or_halt(), internal_pdg_demo_setup_or_halt(), internal_poeg_demo_setup_or_halt(), internal_rng_demo_setup_or_halt(), internal_setup_or_halt(), internal_uart_hello_setup_or_halt(), internal_usb_audio_clocks_or_halt(), internal_wdt_demo_setup_or_halt(), kat_setup_or_halt(), l3_setup_or_halt(), lcd_bringup_clocks(), lin_hil_setup_or_halt(), lpi_setup_or_halt(), main(), mg_bringup_clocks(), microsd_setup_or_halt(), mlun_setup_or_halt(), modem_setup_or_halt(), ospirw_setup_or_halt(), pdm_demo_io_or_halt(), pp_demo_modules_or_halt(), riic_target_setup_or_halt(), rot_setup_or_halt(), sb_setup_or_halt(), scb_demo_setup_or_halt(), sdmsc_setup_or_halt(), sdram_demo_setup_or_halt(), selftest_setup_or_halt(), sfr_bringup_clocks(), timer_demo_setup_or_halt(), tsn_setup_or_halt(), uart_irq_setup_or_halt(), wdt_rr_setup_or_halt(), wdt_window_demo_setup_or_halt(), and wlun_setup_or_halt().
|
nodiscard |
Drive led LOW (extinguish it).
| k_ra8_ok | / k_ra8_err_invalid_arg |
Definition at line 111 of file ra8_board_ek_ra8d2.c.
References k_ra8_level_low, k_ra8_ok, k_ra8_pin_none, pin, ra8_board_led_pin(), and ra8_gpio_write().
Referenced by internal_gpio_demo_one_iter().
|
nodiscard |
Drive led HIGH (light it).
| k_ra8_ok | / k_ra8_err_invalid_arg |
Definition at line 101 of file ra8_board_ek_ra8d2.c.
References k_ra8_level_high, k_ra8_ok, k_ra8_pin_none, pin, ra8_board_led_pin(), and ra8_gpio_write().
Referenced by app_panic_halt(), c6_probe_run(), cdc_host_pass(), cm_panic_halt(), dfu_host_pass(), dfu_host_pass(), ep_panic_halt(), ez_panic_halt(), fileops_run_ladder(), hid_host_pass(), hid_host_pass(), imu_demo_check_who_am_i(), imu_demo_configure(), imu_demo_sample_and_emit(), internal_gpio_demo_one_iter(), internal_lcd_panic_halt(), lcd_panic_halt(), main(), mg_panic_halt(), microsd_host_pass(), mlun_host_pass(), modem_fail(), ospirw_host_pass(), selftest_host_pass(), selftest_host_pass(), sfr_panic_halt(), sfr_render_or_halt(), and wlun_host_pass().
|
nodiscard |
Translate a board LED id into its underlying ra8_port_pin_t.
| [in] | led | LED identifier. |
| [out] | out_pin | Destination pin id. |
| k_ra8_ok | / k_ra8_err_invalid_arg |
Definition at line 79 of file ra8_board_ek_ra8d2.c.
References k_ra8_board_led_count, k_ra8_err_invalid_arg, k_ra8_ok, and s_led_pins.
|
nodiscard |
Toggle led's output state.
| k_ra8_ok | / k_ra8_err_invalid_arg |
Definition at line 121 of file ra8_board_ek_ra8d2.c.
References k_ra8_ok, k_ra8_pin_none, pin, ra8_board_led_pin(), and ra8_gpio_toggle().
Referenced by cdc_echo_iter(), demo_echo_iter(), demo_jiggle_send(), demo_msc_read(), demo_msc_write(), demo_report(), demo_worker_echo_loop(), dtc_coh_report(), fileops_suite_create(), fileops_suite_mutate(), gpt_ecc_service_capture(), hid_send_iter(), hid_send_iter(), internal_acmphs_demo_one_iter(), internal_blink_pins_toggle_all(), internal_clock_check_pins_toggle_all(), internal_demo_tick_battery(), internal_gpt_irq_demo_isr(), internal_iic_peripheral_service(), internal_on_complete(), internal_report(), internal_retune_thread_entry(), internal_sdcard_thread_entry(), internal_thread_a_entry(), internal_thread_b_entry(), internal_thread_entry(), internal_thread_rx_entry(), internal_thread_tx_entry(), internal_usb_audio_log_frames(), lpi_do_work(), main(), microsd_msc_read(), mlun_msc_read(), ospirw_msc_read(), ospirw_msc_write(), riic_target_on_event(), sdmsc_msc_read(), sdmsc_msc_write(), selftest_msc_read(), selftest_msc_read(), timer_demo_one_capture(), uart_irq_rx_cb(), wdt_rr_arm_and_wait_for_reset(), wdt_window_demo_iter(), wlun_msc_read(), and wlun_msc_write().
|
nodiscard |
Route the eight SDHI0 bus pins to the SDHI peripheral function.
Walks the ra8_board_sdhi_pin_t bus order (CMD / CLK / DAT0..3 / WP / CD on port 4 pins 0..7) and calls ra8_pfs_route_peripheral for each under PSEL = k_ra8_psel_sdhi (chip HUM Ch 20.6 "Multiplexed Pin Function Selector"). It does NOT bring the SDHI block or the card up – call ra8_sdcard_init / ra8_sdhi_init after this returns. Returns on the first failing pin so the caller can panic-halt before SD bring-up.
See the
| k_ra8_ok | All eight SDHI0 pins routed. |
| k_ra8_err_invalid_arg | PFS programming rejected an entry. |
| k_ra8_err_gpio_conflict | At least one pin already owned. |
Definition at line 763 of file ra8_board_ek_ra8d2.c.
References k_ra8_ok, k_ra8_psel_sdhi, ra8_pfs_route_peripheral(), and s_sdhi_bus_pins.
Referenced by main(), sdhi_card_setup_or_halt(), and sdhi_demo_setup_or_halt().
|
nodiscard |
Wire sw to the ICU and register a falling-edge callback.
Buttons are active-low so a falling edge corresponds to a press. The HAL takes care of the PFS routing, IRQCR programming, and NVIC enable; this veneer just hides the specific channel number (UM Table 25) from the caller.
| k_ra8_ok | / k_ra8_err_invalid_arg / k_ra8_err_gpio_conflict |
Definition at line 196 of file ra8_board_ek_ra8d2.c.
References k_ra8_board_sw1, k_ra8_board_sw_count, k_ra8_elc_event_icu_irq12, k_ra8_elc_event_icu_irq13, k_ra8_err_invalid_arg, k_ra8_icu_fclksel_pclkb, k_ra8_icu_irqmd_falling, k_ra8_isr_prio_default, k_ra8_ok, ra8_icu_configure_irq_pin(), ra8_isr_register(), and s_sw_irq_nums.
|
nodiscard |
Configure a switch pin as an input with internal pull-up.
| k_ra8_ok | / k_ra8_err_invalid_arg / k_ra8_err_gpio_conflict |
Definition at line 165 of file ra8_board_ek_ra8d2.c.
References k_ra8_ok, k_ra8_pin_none, k_ra8_pull_up, pin, ra8_board_sw_pin(), and ra8_gpio_input_init().
Referenced by internal_gpio_demo_setup_or_halt(), internal_icu_extint_demo_setup_or_halt(), internal_kint_demo_arm(), internal_setup_or_halt(), main(), sh_input_init(), and wd_setup_or_halt().
|
nodiscard |
Translate a board switch id into its underlying ra8_port_pin_t.
Definition at line 153 of file ra8_board_ek_ra8d2.c.
References k_ra8_board_sw_count, k_ra8_err_invalid_arg, k_ra8_ok, and s_sw_pins.
Referenced by er_poll_buttons(), and wd_setup_or_halt().
|
nodiscard |
Sample the current state of sw.
The buttons are wired active-low (press shorts the pin to GND); this function inverts the level so callers receive a positive "pressed = true" semantic.
| [in] | sw | Switch id. |
| [out] | out_pressed | Set to k_ra8_board_sw_pressed if held. |
| k_ra8_ok | Read complete. |
| k_ra8_err_invalid_arg | sw out of range or out_pressed NULL. |
Definition at line 175 of file ra8_board_ek_ra8d2.c.
References k_ra8_board_sw_pressed, k_ra8_board_sw_released, k_ra8_err_invalid_arg, k_ra8_level_high, k_ra8_level_low, k_ra8_ok, k_ra8_pin_none, pin, ra8_board_sw_pin(), and ra8_gpio_read().
Referenced by internal_edge(), internal_gpio_demo_one_iter(), ls_poll_buttons(), main(), sh_pump_input(), and sh_run().
|
extern |
Definition at line 396 of file ra8_board_ek_ra8d2.c.
Referenced by ra8_board_glcdc_init().
|
extern |
RGB565-mode pin table for J1 (UM Table 33 p 42).
RGB565 uses 5+6+5 = 16 active data lines. R6/R7 + G6/G7 are NC, and DATA31..DATA38 (R0..R7 lines) are NC. Same control pins as RGB888.
Definition at line 362 of file ra8_board_ek_ra8d2.c.
Referenced by ra8_board_glcdc_init().
|
extern |
Definition at line 394 of file ra8_board_ek_ra8d2.c.
Referenced by ra8_board_glcdc_init().
|
extern |
RGB666-mode pin table for J1 (UM Table 33 p 42).
In RGB666 the lowest two bits of each colour channel (R0, R1, G0, G1, B0, B1) are not driven (board ties them off internally), so the table omits the DATA0..DATA3 + DATA8..DATA9 + DATA16..DATA17 lines and drops DATA22..DATA23 (R6/R7) which are NC in RGB666.
Definition at line 321 of file ra8_board_ek_ra8d2.c.
Referenced by ra8_board_glcdc_init().
|
extern |
Number of entries in each per-format pin table.
Definition at line 392 of file ra8_board_ek_ra8d2.c.
Referenced by ra8_board_glcdc_init().
|
extern |
Pin tables for J1 in each pixel format (UM Table 33 p 42).
Source-of-truth arrays the BSP iterates when programming J1. The tables are exposed publicly so applications can also inspect them for documentation / debug purposes. Only the data lines actually routed in the chosen format appear in the per-format table; common control + side-band signals (BLEN, RST, INT, I2C, CLK, sync, EXTCLK, TCON3) appear in every table.
Pin tables for J1 in each pixel format (UM Table 33 p 42).
Common control + data lines routed when J1 is driven in 24-bit RGB888 mode. Order matches the UM table (J1-1..J1-38).
Definition at line 239 of file ra8_board_ek_ra8d2.c.
Referenced by ra8_board_glcdc_init().
|
extern |
"R20UT5523EG0101 Rev 1.01".
Definition at line 47 of file ra8_board_ek_ra8d2.c.
Referenced by ra8_board_get_info().
|
extern |
"R7KA8D2KFLCAC".
Definition at line 48 of file ra8_board_ek_ra8d2.c.
Referenced by ra8_board_get_info().
|
extern |
Human-readable strings identifying this BSP target.
Returned by ra8_board_get_info() so applications can log / verify the board they were built for. All three are ASCII string literals with permanent storage duration. "EK-RA8D2 v1".
Definition at line 46 of file ra8_board_ek_ra8d2.c.
Referenced by ra8_board_get_info().