ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_usb_irq.c File Reference

USB IRQ dispatch / event callbacks / power + host-mode bring-up. More...

#include <stdint.h>
#include "ra8_attributes.h"
#include "ra8_check.h"
#include "ra8_err.h"
#include "ra8_log.h"
#include "ra8_mstp.h"
#include "ra8_usb.h"
#include "ra8_usb_internal.h"
#include "ra8_usb_regs.h"
Include dependency graph for ra8_usb_irq.c:

Go to the source code of this file.

Enumerations

enum  ra8_usb_cb_slot_t : uint8_t {
  k_ra8_usb_cb_slot_fs = 0U ,
  k_ra8_usb_cb_slot_hs = 1U ,
  k_ra8_usb_cb_slot_n = 2U
}
enum  ra8_usb_dvstctr_bit_t : uint8_t {
  k_ra8_dvstctr_bit_uact = 4U ,
  k_ra8_dvstctr_bit_vbusen = 9U ,
  k_ra8_dvstctr_bit_resume = 5U ,
  k_ra8_dvstctr_bit_usbrst = 6U ,
  k_ra8_dvstctr_bit_rwupe = 7U
}
 DVSTCTR0 host-mode bit positions (HUM Ch 36.2.5 "DVSTCTR0"). More...

Functions

static uint8_t internal_cb_slot (ra8_usb_speed_t speed)
 Map a USB speed enum to the per-controller callback slot index.
void ra8_usb_attach_handler (ra8_usb_speed_t speed, ra8_usb_event_fn_t fn, void *ctx)
 Install (or detach) the per-controller USB event handler.
void ra8_usb_dispatch (ra8_usb_speed_t speed)
 Implementation of ra8_usb_dispatch().
uint16_t ra8_usb_intsts0_snapshot (ra8_usb_speed_t speed)
 Implementation of ra8_usb_intsts0_snapshot().
ra8_err_t ra8_usb_enter_stop (ra8_usb_speed_t speed)
 Implementation of ra8_usb_enter_stop().
ra8_err_t ra8_usb_exit_stop (ra8_usb_speed_t speed)
 Implementation of ra8_usb_exit_stop().
static uint16_t internal_host_syscfg_word (ra8_usb_speed_t speed)
 Build the host-mode SYSCFG word.
static void internal_host_init_defaults (volatile r_usb_regs_t *reg)
 Program the host-mode FIFO / DCP / interrupt-enable defaults.
static ra8_err_t internal_host_hs_bringup (volatile r_usb_regs_t *reg)
 Bring the USBHS instance up in HOST role (PHY + SYSCFG bits).
ra8_err_t ra8_usb_host_init (ra8_usb_speed_t speed)
 Implementation of ra8_usb_host_init().
ra8_err_t ra8_usb_host_deinit (ra8_usb_speed_t speed)
 Implementation of ra8_usb_host_deinit().
ra8_err_t ra8_usb_host_bus_reset (ra8_usb_speed_t speed, bool assert_reset)
 Implementation of ra8_usb_host_bus_reset().
ra8_err_t ra8_usb_host_set_uact (ra8_usb_speed_t speed, bool enable)
 Implementation of ra8_usb_host_set_uact().
ra8_err_t ra8_usb_host_setup_request (ra8_usb_speed_t speed, const ra8_usb_setup_t *setup)
 Implementation of ra8_usb_host_setup_request().

Variables

static const char * s_tag = "USB"
static ra8_usb_event_fn_t s_usb_fn [k_ra8_usb_cb_slot_n]
static void * s_usb_ctx [k_ra8_usb_cb_slot_n]

Detailed Description

USB IRQ dispatch / event callbacks / power + host-mode bring-up.

Tag
[Ring 3 / HAL] {World: NS}

Two cohesive groups split out of ra8_usb.c to keep every translation unit under the 1000-line cap:

The shared register helpers and the USBHS PHY bring-up it calls are declared in ra8_usb_internal.h. Modelled on FSP r_usb_hreg_access.c; no FSP source ships in this tree.

Since
0.1.0

Definition in file ra8_usb_irq.c.

Enumeration Type Documentation

◆ ra8_usb_cb_slot_t

enum ra8_usb_cb_slot_t : uint8_t
Enumerator
k_ra8_usb_cb_slot_fs 

RA8 USB cb slot fs.

k_ra8_usb_cb_slot_hs 

RA8 USB cb slot hs.

k_ra8_usb_cb_slot_n 

RA8 USB cb slot n.

Definition at line 52 of file ra8_usb_irq.c.

◆ ra8_usb_dvstctr_bit_t

enum ra8_usb_dvstctr_bit_t : uint8_t

DVSTCTR0 host-mode bit positions (HUM Ch 36.2.5 "DVSTCTR0").

Sourced from CMSIS R_USB_FS0_DVSTCTR0_*_Pos in R7KA8D2KF_core0.h (lines 71382-71389) and confirmed for the HS instance (R_USB_HS0_DVSTCTR0_*_Pos, lines 75228-75235).

Enumerator
k_ra8_dvstctr_bit_uact 

Bus enable (host SOF generation).

k_ra8_dvstctr_bit_vbusen 

External VBUS-switch enable (HS).

k_ra8_dvstctr_bit_resume 

Resume signal output (host).

k_ra8_dvstctr_bit_usbrst 

Bus reset signal (host).

k_ra8_dvstctr_bit_rwupe 

Remote-wake detect enable (host).

Definition at line 238 of file ra8_usb_irq.c.

Function Documentation

◆ internal_cb_slot()

uint8_t internal_cb_slot ( ra8_usb_speed_t speed)
static

Map a USB speed enum to the per-controller callback slot index.

Two slots exist: k_ra8_usb_cb_slot_fs for the USBFS controller and k_ra8_usb_cb_slot_hs for the USBHS controller. Every code path that indexes s_usb_fn[] or s_usb_ctx[] goes through this helper so we never confuse the two.

Parameters
[in]speedController selector (FS or HS).
Returns
Slot index in s_usb_fn[] / s_usb_ctx[].
Return values
k_ra8_usb_cb_slot_hsspeed == k_ra8_usb_speed_hs.
k_ra8_usb_cb_slot_fsAny other speed value (FS default).
Precondition
speed is a valid ra8_usb_speed_t enum.
s_usb_fn / s_usb_ctx storage is in scope.
Postcondition
No global state is touched; the helper is pure.
Result is always < k_ra8_usb_cb_slot_n.
Note
Pure / thread-safe.
Since
0.1.0

Definition at line 84 of file ra8_usb_irq.c.

References k_ra8_usb_cb_slot_fs, k_ra8_usb_cb_slot_hs, and k_ra8_usb_speed_hs.

Referenced by ra8_usb_attach_handler(), and ra8_usb_dispatch().

◆ internal_host_hs_bringup()

ra8_err_t internal_host_hs_bringup ( volatile r_usb_regs_t * reg)
static

Bring the USBHS instance up in HOST role (PHY + SYSCFG bits).

The HS PHY needs the full UTMI bring-up (CLKSEL, DIRPD and PLLRESET release, SUSPENDM, PLLLOCK) before the module can operate; reuse the device-mode sequence, which ends with USBE=1 and the device-polarity DRPD=0. Then flip the role bits: HUM Ch 37.2.1 requires DCFM to be changed while USBE=0, so drop USBE, set DCFM (host controller) + DRPD (host pull-downs) + CNEN, and re-enable. CNEN (single-ended receiver enable) is required for the HS PHY to report line state / attach at all – without it LNST reads SE0 forever and no ATTCH ever latches (HUM Ch 37.2.1 p 2062).

Parameters
[in]regHS register block (must be the USBHS instance).
Returns
Passthrough from the PHY bring-up.
Return values
k_ra8_okPHY locked; SYSCFG carries the host role.
k_ra8_err_hw_timeoutThe UTMI PLL never locked.
Precondition
MSTPB12 is ungated and USB60CLK (PLL2P/4) is running.
Single-threaded init context.
Postcondition
SYSCFG = HSE | DCFM | DRPD | CNEN | USBE with the PHY powered.
The caller still programs DVSTCTR0 / FIFO / DCP defaults.
Note
Not thread-safe; init context only.
Since
0.1.0

Definition at line 346 of file ra8_usb_irq.c.

References k_ra8_ok, k_ra8_syscfg_bit_cnen, k_ra8_syscfg_bit_dcfm, k_ra8_syscfg_bit_drpd, k_ra8_syscfg_bit_usbe, priv_rmw16(), priv_usbhs_phy_bringup(), RA8_RETURN_ON_ERROR, s_tag, and r_usb_regs_t::SYSCFG.

Referenced by ra8_usb_host_init().

◆ internal_host_init_defaults()

void internal_host_init_defaults ( volatile r_usb_regs_t * reg)
static

Program the host-mode FIFO / DCP / interrupt-enable defaults.

Shared tail of host bring-up for both controller instances: 16-bit FIFO port widths (the per-access width is re-selected by priv_select_cfifo), DCP defaults with a 64-byte max packet, USBADDR=0 (newly attached devices answer at the default address), and the host interrupt-enable mask (per-pipe ENB registers stay clear; the transfer engines arm exactly what they wait on).

Parameters
[in]regSelected controller register block.
Precondition
SYSCFG already carries the host role (DCFM | DRPD | USBE).
Single-threaded init context.
Postcondition
FIFO selects, DCP, USBADDR and INTENB0/1 hold the defaults.
BRDYENB / NRDYENB / BEMPENB are cleared.
Note
Not thread-safe; init context only.
Since
0.1.0

Definition at line 294 of file ra8_usb_irq.c.

References r_usb_regs_t::BEMPENB, r_usb_regs_t::BRDYENB, r_usb_regs_t::CFIFOSEL, r_usb_regs_t::D0FIFOSEL, r_usb_regs_t::D1FIFOSEL, r_usb_regs_t::DCPCFG, r_usb_regs_t::DCPCTR, r_usb_regs_t::DCPMAXP, r_usb_regs_t::INTENB0, r_usb_regs_t::INTENB1, k_ra8_fifosel_mbw_16, k_ra8_int0_bit_bemp, k_ra8_int0_bit_brdy, k_ra8_int0_bit_ctrt, k_ra8_int0_bit_dvst, k_ra8_int0_bit_nrdy, k_ra8_int0_bit_vbse, k_ra8_usb_dcp_max_packet, r_usb_regs_t::NRDYENB, and r_usb_regs_t::USBADDR.

Referenced by ra8_usb_host_init().

◆ internal_host_syscfg_word()

uint16_t internal_host_syscfg_word ( ra8_usb_speed_t speed)
static

Build the host-mode SYSCFG word.

Sets SCKE | DCFM | DRPD | USBE; adds HSE for the HS instance. DPRPU is intentionally not set (device-mode pull-up).

Parameters
[in]speedSee implementation.
Returns
Result code.
Return values
k_ra8_okOperation succeeded.
Precondition
Module state is consistent.
Module state is consistent.
Postcondition
Caller-visible state matches the documented contract.
Caller-visible state matches the documented contract.
Note
Not thread-safe unless documented otherwise.
Since
0.1.0

Definition at line 263 of file ra8_usb_irq.c.

References k_ra8_syscfg_bit_dcfm, k_ra8_syscfg_bit_drpd, k_ra8_syscfg_bit_hse, k_ra8_syscfg_bit_scke, k_ra8_syscfg_bit_usbe, and k_ra8_usb_speed_hs.

Referenced by ra8_usb_host_init().

◆ ra8_usb_attach_handler()

void ra8_usb_attach_handler ( ra8_usb_speed_t speed,
ra8_usb_event_fn_t fn,
void * ctx )

Install (or detach) the per-controller USB event handler.

Each controller (USBFS, USBHS) has its own callback slot, so one firmware image can run different upper-layer drivers on each controller simultaneously (e.g. USBX/DCD bridge on USBHS, a bare-CDC handler on USBFS). The matching ra8_usb_dispatch(speed) only fires the callback registered for that speed.

Parameters
[in]speedWhich controller's callback slot to update.
[in]fnCallback. NULL detaches.
[in]ctxContext passed to fn.

Slot replacement performs no fallible work; callers observe completion when this function returns.

Precondition
speed is k_ra8_usb_speed_fs or k_ra8_usb_speed_hs.
Caller serializes this update with ra8_usb_dispatch(speed).
Postcondition
Subsequent ra8_usb_dispatch(speed) calls route through fn.
Passing NULL for fn prevents subsequent callback invocation for the selected controller.
Note
Not thread-safe.
Since
0.1.0

Definition at line 90 of file ra8_usb_irq.c.

References internal_cb_slot(), s_usb_ctx, and s_usb_fn.

Referenced by ra8_usb_pal_deinit(), ra8_usb_pal_init(), ux_dcd_ra8_usb_initialize(), and ux_dcd_ra8_usb_uninitialize().

◆ ra8_usb_dispatch()

void ra8_usb_dispatch ( ra8_usb_speed_t speed)

Implementation of ra8_usb_dispatch().

Snapshot INTSTS0 and fire the installed event handler.

See the public header for the documented contract; this definition implements it.

Parameters
[in]speedSee implementation.
Precondition
Module state is consistent.
Module state is consistent.
Postcondition
Caller-visible state matches the documented contract.
Caller-visible state matches the documented contract.
Note
Not thread-safe unless documented otherwise.
Since
0.1.0

Definition at line 109 of file ra8_usb_irq.c.

References internal_cb_slot(), r_usb_regs_t::INTSTS0, k_ra8_int0_bit_bemp, k_ra8_int0_bit_brdy, k_ra8_int0_bit_ctrt, k_ra8_int0_bit_dvst, k_ra8_int0_bit_nrdy, k_ra8_int0_bit_rsme, k_ra8_int0_bit_sofr, k_ra8_int0_bit_vbse, priv_pick(), s_usb_ctx, and s_usb_fn.

Referenced by internal_usbfs_isr(), internal_usbhs_isr(), and ns_usb_worker().

◆ ra8_usb_enter_stop()

ra8_err_t ra8_usb_enter_stop ( ra8_usb_speed_t speed)
nodiscard

Implementation of ra8_usb_enter_stop().

Drop the controller's MSTP gate without touching SYSCFG.

See the public header for the documented contract; this definition implements it.

Parameters
[in]speedSee implementation.
Returns
Result code.
Return values
k_ra8_okOperation succeeded.
Precondition
Module state is consistent.
Module state is consistent.
Postcondition
Caller-visible state matches the documented contract.
Caller-visible state matches the documented contract.
Note
Not thread-safe unless documented otherwise.
Since
0.1.0

Definition at line 192 of file ra8_usb_irq.c.

References k_ra8_err_invalid_arg, k_ra8_usb_speed_fs, k_ra8_usb_speed_hs, priv_mstp(), and ra8_mstp_disable().

◆ ra8_usb_exit_stop()

ra8_err_t ra8_usb_exit_stop ( ra8_usb_speed_t speed)
nodiscard

Implementation of ra8_usb_exit_stop().

Re-enable the controller's MSTP gate (counterpart to ra8_usb_enter_stop).

See the public header for the documented contract; this definition implements it.

Parameters
[in]speedSee implementation.
Returns
Result code.
Return values
k_ra8_okOperation succeeded.
Precondition
Module state is consistent.
Module state is consistent.
Postcondition
Caller-visible state matches the documented contract.
Caller-visible state matches the documented contract.
Note
Not thread-safe unless documented otherwise.
Since
0.1.0

Definition at line 213 of file ra8_usb_irq.c.

References k_ra8_err_invalid_arg, k_ra8_usb_speed_fs, k_ra8_usb_speed_hs, priv_mstp(), and ra8_mstp_enable().

◆ ra8_usb_host_bus_reset()

ra8_err_t ra8_usb_host_bus_reset ( ra8_usb_speed_t speed,
bool assert_reset )
nodiscard

Implementation of ra8_usb_host_bus_reset().

Drive (or release) the bus reset line.

See the public header for the documented contract; this definition implements it.

Parameters
[in]speedSee implementation.
[in]assert_resetSee implementation.
Returns
Result code.
Return values
k_ra8_okOperation succeeded.
Precondition
Module state is consistent.
Module state is consistent.
Postcondition
Caller-visible state matches the documented contract.
Caller-visible state matches the documented contract.
Note
Not thread-safe unless documented otherwise.
Since
0.1.0

Definition at line 455 of file ra8_usb_irq.c.

References r_usb_regs_t::DVSTCTR0, k_ra8_dvstctr_bit_uact, k_ra8_dvstctr_bit_usbrst, k_ra8_err_invalid_arg, k_ra8_ok, priv_pick(), and priv_rmw16().

Referenced by cdc_enum_hunt(), dfu_enum_hunt(), hid_enum_hunt(), hid_enum_hunt(), internal_do_bus_reset(), internal_do_bus_reset(), internal_do_bus_reset(), internal_do_bus_reset(), internal_do_bus_reset(), internal_do_idle(), internal_do_idle(), internal_do_idle(), internal_do_idle(), internal_do_idle(), internal_enum_hunt(), internal_enum_hunt(), internal_port_reset(), and ns_host_enum_hunt().

◆ ra8_usb_host_deinit()

ra8_err_t ra8_usb_host_deinit ( ra8_usb_speed_t speed)
nodiscard

Implementation of ra8_usb_host_deinit().

Tear down a host-mode controller and drop its MSTP reference.

See the public header for the documented contract; this definition implements it.

Parameters
[in]speedSee implementation.
Returns
Result code.
Return values
k_ra8_okOperation succeeded.
Precondition
Module state is consistent.
Module state is consistent.
Postcondition
Caller-visible state matches the documented contract.
Caller-visible state matches the documented contract.
Note
Not thread-safe unless documented otherwise.
Since
0.1.0

Definition at line 424 of file ra8_usb_irq.c.

References r_usb_regs_t::BEMPENB, r_usb_regs_t::BRDYENB, r_usb_regs_t::DVSTCTR0, r_usb_regs_t::INTENB0, r_usb_regs_t::INTENB1, k_ra8_err_invalid_arg, r_usb_regs_t::NRDYENB, priv_mstp(), priv_pick(), ra8_mstp_disable(), and r_usb_regs_t::SYSCFG.

Referenced by cdc_host_pass(), dfu_host_enumerate(), dfu_host_pass(), hid_host_pass(), hid_host_pass(), ns_host_worker(), ra8_dfu_host_program(), ra8_dfu_host_run(), ra8_usb_haud_close(), ra8_usb_hcdc_close(), ra8_usb_hcdc_ecm_close(), ra8_usb_hhid_close(), ra8_usb_hhub_close(), ra8_usb_hmsc_close(), and ux_hcd_ra8_usb_uninitialize().

◆ ra8_usb_host_init()

ra8_err_t ra8_usb_host_init ( ra8_usb_speed_t speed)
nodiscard

Implementation of ra8_usb_host_init().

Bring up a USB controller in HOST mode.

See the public header for the documented contract; this definition implements it.

Parameters
[in]speedSee implementation.
Returns
Result code.
Return values
k_ra8_okOperation succeeded.
Precondition
Module state is consistent.
Module state is consistent.
Postcondition
Caller-visible state matches the documented contract.
Caller-visible state matches the documented contract.
Note
Not thread-safe unless documented otherwise.
Since
0.1.0

Definition at line 375 of file ra8_usb_irq.c.

References r_usb_regs_t::DVSTCTR0, internal_host_hs_bringup(), internal_host_init_defaults(), internal_host_syscfg_word(), k_ra8_dvstctr_bit_vbusen, k_ra8_err_invalid_arg, k_ra8_ok, k_ra8_usb_speed_hs, priv_mstp(), priv_pick(), priv_rmw16(), ra8_log_info_val, ra8_mstp_enable(), RA8_RETURN_ON_ERROR, s_tag, and r_usb_regs_t::SYSCFG.

Referenced by cdc_host_pass(), dfu_host_pass(), hid_host_pass(), hid_host_pass(), ns_host_worker(), ra8_board_usbhs_host_init(), ra8_dfu_host_program(), ra8_dfu_host_run(), ra8_usb_haud_init(), ra8_usb_hcdc_ecm_init(), ra8_usb_hcdc_init(), ra8_usb_hhid_init(), ra8_usb_hhub_init(), ra8_usb_hmsc_init(), and ux_hcd_ra8_usb_initialize().

◆ ra8_usb_host_set_uact()

ra8_err_t ra8_usb_host_set_uact ( ra8_usb_speed_t speed,
bool enable )
nodiscard

Implementation of ra8_usb_host_set_uact().

Enable / disable SOF (Start-of-Frame) generation on the bus.

See the public header for the documented contract; this definition implements it.

Parameters
[in]speedSee implementation.
[in]enableSee implementation.
Returns
Result code.
Return values
k_ra8_okOperation succeeded.
Precondition
Module state is consistent.
Module state is consistent.
Postcondition
Caller-visible state matches the documented contract.
Caller-visible state matches the documented contract.
Note
Not thread-safe unless documented otherwise.
Since
0.1.0

Definition at line 487 of file ra8_usb_irq.c.

References r_usb_regs_t::DVSTCTR0, k_ra8_dvstctr_bit_uact, k_ra8_err_invalid_arg, k_ra8_ok, priv_pick(), and priv_rmw16().

Referenced by cdc_enum_hunt(), dfu_enum_hunt(), hid_enum_hunt(), hid_enum_hunt(), internal_enum_hunt(), internal_enum_hunt(), internal_port_set_enabled(), ns_host_enum_hunt(), ra8_usb_haud_close(), ra8_usb_hcdc_close(), ra8_usb_hcdc_ecm_close(), ra8_usb_hhid_close(), ra8_usb_hhub_close(), ra8_usb_hmsc_close(), and ux_hcd_ra8_usb_uninitialize().

◆ ra8_usb_host_setup_request()

ra8_err_t ra8_usb_host_setup_request ( ra8_usb_speed_t speed,
const ra8_usb_setup_t * setup )
nodiscard

Implementation of ra8_usb_host_setup_request().

Issue a SETUP packet through the DCP (host -> peripheral).

See the public header for the documented contract; this definition implements it.

Parameters
[in]speedSee implementation.
[in]setupSee implementation.
Returns
Result code.
Return values
k_ra8_okOperation succeeded.
Precondition
Module state is consistent.
Module state is consistent.
Postcondition
Caller-visible state matches the documented contract.
Caller-visible state matches the documented contract.
Note
Not thread-safe unless documented otherwise.
Since
0.1.0

Definition at line 517 of file ra8_usb_irq.c.

References ra8_usb_setup_t::b_request, ra8_usb_setup_t::bm_request_type, r_usb_regs_t::DCPCTR, k_ra8_dcpctr_bit_sureq, k_ra8_err_busy, k_ra8_err_invalid_arg, k_ra8_ok, k_ra8_usb_byte_bits, priv_pick(), priv_rmw16(), RA8_CHECK_NULL_PTR, s_tag, r_usb_regs_t::USBINDX, r_usb_regs_t::USBLENG, r_usb_regs_t::USBREQ, r_usb_regs_t::USBVAL, ra8_usb_setup_t::w_index, ra8_usb_setup_t::w_length, and ra8_usb_setup_t::w_value.

Referenced by internal_control_xfer(), internal_setup_get_descriptor(), internal_setup_get_descriptor(), internal_setup_get_descriptor(), internal_setup_get_descriptor(), internal_setup_get_descriptor(), internal_setup_get_hub_descriptor(), internal_setup_get_report_descriptor(), internal_setup_set_address(), internal_setup_set_address(), internal_setup_set_address(), internal_setup_set_address(), internal_setup_set_address(), internal_setup_set_config(), internal_setup_set_config(), internal_setup_set_config(), internal_setup_set_config(), internal_setup_set_config(), internal_setup_set_interface(), internal_setup_set_interface(), internal_setup_set_interface(), internal_setup_set_interface_data(), internal_setup_set_packet_filter(), ra8_usb_haud_set_format(), ra8_usb_haud_set_mute(), ra8_usb_haud_set_volume(), ra8_usb_hcdc_ecm_get_link_status(), ra8_usb_hcdc_set_line_coding(), ra8_usb_hhid_get_report(), ra8_usb_hhid_set_idle(), ra8_usb_hhid_set_protocol(), ra8_usb_hhid_set_report(), ra8_usb_hhub_clear_port_feature(), ra8_usb_hhub_get_port_status(), and ra8_usb_hhub_set_port_feature().

◆ ra8_usb_intsts0_snapshot()

uint16_t ra8_usb_intsts0_snapshot ( ra8_usb_speed_t speed)

Implementation of ra8_usb_intsts0_snapshot().

Read INTSTS0 without acking any bits.

Pure MMIO read; no INTSTS0 bits are modified.

Parameters
[in]speedSee header.
Returns
INTSTS0 raw value.
Return values
0Invalid speed or controller not powered.
Precondition
Module state is consistent.
Controller register window is mapped.
Postcondition
No bits in INTSTS0 modified.
Caller-visible state matches the documented contract.
Note
Safe to call from any context.
Since
0.1.0

Definition at line 170 of file ra8_usb_irq.c.

References r_usb_regs_t::INTSTS0, and priv_pick().

Referenced by internal_usbfs_isr(), internal_usbhs_isr(), and ns_usb_worker().

Variable Documentation

◆ s_tag

const char* s_tag = "USB"
static

Definition at line 41 of file ra8_usb_irq.c.

◆ s_usb_ctx

void* s_usb_ctx[k_ra8_usb_cb_slot_n]
static

Definition at line 59 of file ra8_usb_irq.c.

Referenced by ra8_usb_attach_handler(), and ra8_usb_dispatch().

◆ s_usb_fn

Definition at line 58 of file ra8_usb_irq.c.

Referenced by ra8_usb_attach_handler(), and ra8_usb_dispatch().