100typedef enum : uint8_t {
175typedef enum : uint8_t {
189typedef enum : uint8_t {
195typedef enum : uint8_t {
262typedef enum : uint8_t {
319typedef enum : uint16_t {
393typedef enum : uint16_t {
418typedef enum : uint8_t {
465typedef enum : uint16_t {
528typedef enum : uint8_t {
565typedef enum : uint8_t {
579typedef enum : uint16_t {
594typedef enum : uint16_t {
610typedef enum : uint16_t {
620typedef enum : uint16_t {
656typedef enum : uint8_t {
675typedef enum : uint16_t {
690typedef enum : uint16_t {
706typedef enum : uint16_t {
751typedef enum : uint16_t {
785typedef enum : uint16_t {
801typedef enum : uint8_t {
821typedef enum : uint8_t {
866typedef enum : uint8_t {
920typedef enum : uint16_t {
948typedef enum : uint8_t {
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_board_pi4ioe_project_t
Required SW4 DIP-switch positions for this project's wiring.
@ k_ra8_board_pi4ioe_output_project_default
U15 output byte that drives the SW4 layout above.
@ k_ra8_board_pi4ioe_output_usbhs_host
Project layout with USBHS in HOST role: the project default (0xF2) with bit 7 (SW4-8,...
@ k_ra8_board_pi4ioe_output_octospi_active
U15 output byte that ELECTRICALLY ENABLES the on-board Octo-SPI flash.
ra8_board_mikrobus_iic_channel_t
I2C peripheral channel that backs the MikroBUS SDA/SCL pins.
@ k_ra8_board_mikrobus_iic_b_channel
RA8 board mikrobus iic b channel.
const char *const k_ra8_board_doc_rev
"R20UT5523EG0101 Rev 1.01".
ra8_board_mikrobus_uart_channel_t
SCI channel that backs the MikroBUS J22.3/J22.4 UART pins.
@ k_ra8_board_mikrobus_uart_sci_channel
P808/P809 -> RXD7/TXD7 = SCI7 (SW4-4 ON).
ra8_err_t ra8_board_led_toggle(ra8_board_led_id_t led)
Toggle led's output state.
ra8_board_pmod2_uart_pin_t
Pin assignments for Pmod2 (J25) in UART mode (UM Table 19 p 27).
@ k_ra8_board_pmod2_uart_txd
Pmod2 UART TXD (TXD0), P603.
@ k_ra8_board_pmod2_uart_cts
Pmod2 UART CTS (CTS0), P605.
@ k_ra8_board_pmod2_uart_rxd
Pmod2 UART RXD (RXD0), P602.
@ k_ra8_board_pmod2_uart_rts
Pmod2 UART RTS (RTS0), P604.
ra8_board_pmod2_gpio_pin_t
Pin assignments for Pmod2 GPIO + IRQ side-band (UM Table 19 p 27).
@ k_ra8_board_pmod2_gpio_b
Pmod2.10 GPIO, P704.
@ k_ra8_board_pmod2_gpio_a
Pmod2.9 GPIO, P409.
@ k_ra8_board_pmod2_irq
Pmod2.7 IRQ (IRQ15), P012.
@ k_ra8_board_pmod2_reset
Pmod2.8 RESET, P410.
ra8_board_sdhi_pin_t
Pin assignments for the native 4-bit SDHI0 micro-SD bus.
@ k_ra8_board_sdhi_cd
SDHI0 CD, P407.
@ k_ra8_board_sdhi_dat3
SDHI0 DAT3, P405.
@ k_ra8_board_sdhi_clk
SDHI0 CLK, P401.
@ k_ra8_board_sdhi_dat2
SDHI0 DAT2, P404.
@ k_ra8_board_sdhi_dat0
SDHI0 DAT0, P402.
@ k_ra8_board_sdhi_cmd
SDHI0 CMD, P400.
@ k_ra8_board_sdhi_dat1
SDHI0 DAT1, P403.
@ k_ra8_board_sdhi_wp
SDHI0 WP, P406.
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_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_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_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_board_arduino_mode_t
Direction mode for an Arduino-header GPIO pin.
@ k_ra8_board_arduino_mode_input_pullup
RA8 board arduino mode input pullup.
@ k_ra8_board_arduino_mode_input
RA8 board arduino mode input.
@ k_ra8_board_arduino_mode_output
RA8 board arduino mode output.
const uint32_t g_ra8_board_glcdc_rgb888_pin_count
Number of entries in each per-format pin table.
ra8_err_t ra8_board_lcd_panel_power_on(void)
Pulse the J1 panel's RESET_L line and assert BLEN backlight.
const char *const k_ra8_board_name
Human-readable strings identifying this BSP target.
ra8_err_t ra8_board_backlight_set(bool on)
Turn the J1 panel backlight (BLEN, P514) on or off.
const uint32_t g_ra8_board_glcdc_rgb565_pin_count
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_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_init(ra8_board_sw_id_t sw)
Configure a switch pin as an input with internal pull-up.
ra8_board_pmod2_spi_pin_t
Pin assignments for Pmod2 (J25) in SPI mode (UM Table 19 p 27).
@ k_ra8_board_pmod2_spi_cipo
Pmod2.3 CIPO (CIPO0_B), P602.
@ k_ra8_board_pmod2_spi_cs
Pmod2.1 CS (SS0_B), P604.
@ k_ra8_board_pmod2_spi_copi
Pmod2.2 COPI (COPI0_B), P603.
@ k_ra8_board_pmod2_spi_sck
Pmod2.4 SCK (SCK0_B), P601.
const ra8_board_glcdc_pin_t g_ra8_board_glcdc_rgb666_pins[]
RGB666-mode pin table for J1 (UM Table 33 p 42).
ra8_board_audio_pin_t
Pin assignments for the on-board DA7212 audio CODEC.
@ k_ra8_board_audio_pin_i2c_sda
P511 (SDA1), EK-RA8D2 UM Table 32 p 38.
@ k_ra8_board_audio_pin_datin
P405 (J41), EK-RA8D2 UM Table 32 p 38.
@ k_ra8_board_audio_pin_bclk
P403, EK-RA8D2 UM Table 32 p 38.
@ k_ra8_board_audio_pin_mclk
PD06, EK-RA8D2 UM Table 32 p 38.
@ k_ra8_board_audio_pin_wclk
P404, EK-RA8D2 UM Table 32 p 38.
@ k_ra8_board_audio_pin_i2c_scl
P512 (SCL1), EK-RA8D2 UM Table 32 p 38.
@ k_ra8_board_audio_pin_datout
P406 (J41), EK-RA8D2 UM Table 32 p 38.
ra8_err_t ra8_board_sdhi_pins_init(void)
Route the eight SDHI0 bus pins to the SDHI peripheral function.
ra8_board_pmod_id_t
Identifiers for the two Pmod sockets.
@ k_ra8_board_pmod_count
RA8 board pmod count.
@ k_ra8_board_pmod2
Pmod2 – J25, SPI/UART (RSPI/SCI0).
@ k_ra8_board_pmod1
Pmod1 – J26, SCI2 simple-SPI/UART/I2C.
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_board_sw_id_t
Identifiers for the on-board user push-buttons.
@ k_ra8_board_sw_count
RA8 board sw count.
@ k_ra8_board_sw1
SW1, P009, IRQ13-DS (jumper E31).
@ k_ra8_board_sw2
SW2, P008, IRQ12-DS (jumper E32).
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_board_mikrobus_pin_t
MikroBUS slot wiring on this board.
@ k_ra8_board_mikrobus_an
J21.1 AN – analog input.
@ k_ra8_board_mikrobus_cs
J21.3 CS – SPI chip-select (SSLB0, SW4-4 ON).
@ k_ra8_board_mikrobus_rx
J22.3 RX – UART RX (RXD7, SW4-4 ON).
@ k_ra8_board_mikrobus_cipo
J21.5 CIPO – Controller In, Peripheral Out (UM names this MISOB, SW4-4 ON).
@ k_ra8_board_mikrobus_int
J22.2 INT – hardware interrupt (IRQ-22).
@ k_ra8_board_mikrobus_tx
J22.4 TX – UART TX (TXD7, SW4-4 ON).
@ k_ra8_board_mikrobus_sck
J21.4 SCK – SPI clock (RSPCKB, SW4-4 ON).
@ k_ra8_board_mikrobus_copi
J21.6 COPI – Controller Out, Peripheral In (UM names this MOSIB, SW4-4 ON).
@ k_ra8_board_mikrobus_rst
J21.2 RST – reset out to the Click.
@ k_ra8_board_mikrobus_pwm
J22.1 PWM – GTIOC10A.
const char *const k_ra8_board_mcu
"R7KA8D2KFLCAC".
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_board_pmod_sci_channel_t
SCI channels that back the two Pmod sockets in Simple-SPI mode.
@ k_ra8_board_pmod1_sci_channel
Pmod1 (J26) Simple-SPI is SCI2.
@ k_ra8_board_pmod2_sci_channel
Pmod2 (J25) Simple-SPI is SCI0.
ra8_board_pmod1_i2c_pin_t
Pin assignments for Pmod1 (J26) in I2C mode (UM Table 17 p 26).
@ k_ra8_board_pmod1_i2c_sda
Pmod1 I2C SDA (SDA1), P511.
@ k_ra8_board_pmod1_i2c_scl
Pmod1 I2C SCL (SCL1), P512.
ra8_board_sw_irq_t
Per-switch IRQ channel numbers (UM Table 25 p 32).
@ k_ra8_board_sw2_irq
SW2 -> IRQ12-DS.
@ k_ra8_board_sw1_irq
SW1 -> IRQ13-DS.
ra8_err_t ra8_board_get_info(ra8_board_info_t *out)
Copy the three board-identity strings into out.
ra8_board_arduino_pin_t
Logical Arduino-header pins mapped to RA8D2 port pins.
@ k_ra8_board_arduino_d11
D11 SPI_MOSI / GTIOC8A,P101.
@ k_ra8_board_arduino_a5
A5 AN015/DA1, P015.
@ k_ra8_board_arduino_d5
D5 GTIOC1B/IRQ1, P104.
@ k_ra8_board_arduino_d14
D14 SDA1 (or SDA0=P401 if SW4-5 ON), P511.
@ k_ra8_board_arduino_d13
D13 SPI_SCK / GTIOC2B, P102.
@ k_ra8_board_arduino_d2
D2 INT0/IRQ16, P011.
@ k_ra8_board_arduino_a0
A0 AN001, P001.
@ k_ra8_board_arduino_a2
A2 AN003, P003.
@ k_ra8_board_arduino_a3
A3 AN004, P004.
@ k_ra8_board_arduino_d1
D1 TXD7, P809.
@ k_ra8_board_arduino_d6
D6 GTIOC1A/IRQ0, P105.
@ k_ra8_board_arduino_d7
D7 IRQ22-DS, P312.
@ k_ra8_board_arduino_d0
D0 RXD7/GTIOC13B, P808.
@ k_ra8_board_arduino_a1
A1 AN007, P007.
@ k_ra8_board_arduino_d3
D3 INT1/GTIOC10B, P811.
@ k_ra8_board_arduino_d10
D10 SPI_SS / GTIOC2A, P103.
@ k_ra8_board_arduino_a4
A4 AN014/DA0, P014.
@ k_ra8_board_arduino_d8
D8 IRQ22, PD01.
@ k_ra8_board_arduino_d12
D12 SPI_MISO / GTIOC8B,P100.
@ k_ra8_board_arduino_d4
D4 GTIOC10A/IRQ21, P810.
@ k_ra8_board_arduino_d9
D9 GTIOC9B/IRQ20, P110.
@ k_ra8_board_arduino_d15
D15 SCL1 (or SCL0=P400 if SW4-5 ON), P512.
ra8_board_pmod1_uart_pin_t
Pin assignments for Pmod1 (J26) in UART mode (UM Table 17 p 26).
@ k_ra8_board_pmod1_uart_rts
Pmod1 UART RTS (RTS2), P804.
@ k_ra8_board_pmod1_uart_cts
Pmod1 UART CTS (CTS2), P800.
@ k_ra8_board_pmod1_uart_txd
Pmod1 UART TXD (TXD2), P801.
@ k_ra8_board_pmod1_uart_rxd
Pmod1 UART RXD (RXD2), P802.
ra8_board_audio_ch_t
SSIE channel the CODEC is wired to.
@ k_ra8_board_audio_ssie_channel
RA8 board audio ssie channel.
ra8_board_lcd_gpio_pin_t
Board-style aliases for the J1 LCD GPIO control pins.
@ k_ra8_board_lcd_reset_l
J1-6 RST, P606 (active-low).
@ k_ra8_board_lcd_blen
J1-1 BLEN, P514 (active-high).
ra8_board_pmod1_spi_pin_t
Pin assignments for Pmod1 (J26) in SPI mode (UM Table 17 p 26).
@ k_ra8_board_pmod1_spi_copi
Pmod1.2 COPI (MOSI2/TXD2 per UM),P801.
@ k_ra8_board_pmod1_spi_sck
Pmod1.4 SCK (SCK2), P803.
@ k_ra8_board_pmod1_spi_cs
Pmod1.1 CS (SS2/IRQ14), P804.
@ k_ra8_board_pmod1_spi_cipo
Pmod1.3 CIPO (MISO2/RXD2 per UM),P802.
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).
ra8_board_glcdc_fmt_t
GLCDC parallel-RGB pixel formats supported by EK-RA8D2 J1.
@ k_ra8_board_glcdc_fmt_rgb888
24-bit, 8 bits/colour.
@ k_ra8_board_glcdc_fmt_rgb565
16-bit, 5/6/5 bits.
@ k_ra8_board_glcdc_fmt_rgb666
18-bit, 6 bits/colour.
ra8_board_sdhi_instance_t
SDHI instance that backs the ra8_board_sdhi_pin_t bus pins.
@ k_ra8_board_sdhi_instance
SDHI0 (chip HUM Ch 20.6 SDHI pin group).
const uint32_t g_ra8_board_glcdc_rgb666_pin_count
ra8_err_t ra8_board_led_off(ra8_board_led_id_t led)
Drive led LOW (extinguish it).
void(* ra8_board_sw_irq_cb_t)(void *ctx)
Switch IRQ callback signature.
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.
const ra8_board_glcdc_pin_t g_ra8_board_glcdc_rgb565_pins[]
RGB565-mode pin table for J1 (UM Table 33 p 42).
ra8_board_sw_state_t
Logical "pressed" / "released" state.
@ k_ra8_board_sw_released
RA8 board sw released.
@ k_ra8_board_sw_pressed
RA8 board sw pressed.
ra8_board_pmod1_gpio_pin_t
Pin assignments for Pmod1 GPIO + IRQ side-band (UM Table 17 p 26).
@ k_ra8_board_pmod1_gpio_a
Pmod1.9 GPIO, P412.
@ k_ra8_board_pmod1_gpio_b
Pmod1.10 GPIO, P413.
@ k_ra8_board_pmod1_irq
Pmod1.7 IRQ (IRQ11-DS), P006.
@ k_ra8_board_pmod1_reset
Pmod1.8 RESET, P402.
ra8_board_mikrobus_i2c_pin_t
MikroBUS J22.5 / J22.6 I2C lines.
@ k_ra8_board_mikrobus_i2c_scl
J22.5 SCL (SW4-5 OFF) -> P512 SCL1.
@ k_ra8_board_mikrobus_i2c_sda
J22.6 SDA (SW4-5 OFF) -> P511 SDA1.
ra8_board_led_id_t
Identifiers for the three user LEDs on EK-RA8D2 v1.
@ k_ra8_board_led2
LED2, GREEN, P303 (jumper E26).
@ k_ra8_board_led_count
RA8 board led count.
@ k_ra8_board_led1
LED1, BLUE, P600 (jumper E27).
@ k_ra8_board_led_green
RA8 board led green.
@ k_ra8_board_led_blue
Convenience aliases by colour.
@ k_ra8_board_led_red
RA8 board led red.
@ k_ra8_board_led3
LED3, RED, PA07 (jumper E28).
ra8_board_eth_pin_t pin
Pin.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Typed Port / Pin Constants for the RA8D2 IOPORT Module.
ra8_port_pin_t
Packed (port << 8) | pin pin identifier.
@ k_ra8_pin_lcd_reset_l
J1-6 RST, P606 (active-low).
@ k_ra8_pin_lcd_blen
J1-1 BLEN, P514 (active-high).
@ k_ra8_port_13
RA8 port 13.
@ k_ra8_port_7
RA8 port 7.
@ k_ra8_port_3
RA8 port 3.
@ k_ra8_port_2
RA8 port 2.
@ k_ra8_port_6
RA8 port 6.
@ k_ra8_port_4
RA8 port 4.
@ k_ra8_port_5
RA8 port 5.
@ k_ra8_port_0
RA8 port 0.
@ k_ra8_port_8
RA8 port 8.
@ k_ra8_port_1
RA8 port 1.
#define RA8_PIN(port, pin)
Build a ra8_port_pin_t from explicit port / pin indices.
ra8_level_t
Digital output / input level.
@ k_ra8_pin_11
RA8 pin 11.
@ k_ra8_pin_10
RA8 pin 10.
@ k_ra8_pin_13
RA8 pin 13.
@ k_ra8_pin_12
RA8 pin 12.
@ k_ra8_pin_14
RA8 pin 14.
@ k_ra8_pin_15
RA8 pin 15.
One row of the GLCDC pin table – (signal name, RA8D2 pin).
ra8_port_pin_t pin
RA8D2 port pin carrying that signal.
const char * signal
Human-readable signal name (UM Table 33).
Snapshot of board identity strings.
const char * doc_rev
Same value as k_ra8_board_doc_rev.
const char * mcu
Same value as k_ra8_board_mcu.
const char * name
Same value as k_ra8_board_name.