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

Native USB host-side CDC ECM (Communications Device Class -Ethernet Networking Control Model) class layer. More...

#include <stdint.h>
#include "ra8_err.h"
#include "ra8_usb.h"
Include dependency graph for ra8_usb_hcdc_ecm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ra8_usb_hcdc_ecm_device_t
 Snapshot of the attached CDC-ECM adapter, passed to the attach callback. More...

Typedefs

typedef void(* ra8_usb_hcdc_ecm_attach_fn_t) (void *ctx, const ra8_usb_hcdc_ecm_device_t *device)
 Attach-callback signature.

Enumerations

enum  ra8_usb_hcdc_ecm_pipe_t : uint8_t {
  k_ra8_hcdc_ecm_pipe_bulk_in = 1U ,
  k_ra8_hcdc_ecm_pipe_bulk_out = 2U ,
  k_ra8_hcdc_ecm_pipe_intr_in = 6U
}
 PIPE numbers used by the host-CDC-ECM driver for the attached adapter's endpoints. More...
enum  ra8_usb_hcdc_ecm_packet_t : uint16_t {
  k_ra8_hcdc_ecm_bulk_max_packet_fs = 64U ,
  k_ra8_hcdc_ecm_bulk_max_packet_hs = 512U ,
  k_ra8_hcdc_ecm_intr_max_packet = 16U ,
  k_ra8_hcdc_ecm_max_ethernet_frame = 1514U
}
 Packet sizing for the attached adapter's bulk + interrupt endpoints. More...
enum  ra8_usb_hcdc_ecm_class_t : uint8_t {
  k_ra8_hcdc_ecm_class_comms = 0x02U ,
  k_ra8_hcdc_ecm_subclass_ecm = 0x06U ,
  k_ra8_hcdc_ecm_protocol_none = 0x00U ,
  k_ra8_hcdc_ecm_class_data = 0x0AU ,
  k_ra8_hcdc_ecm_subclass_zero = 0x00U ,
  k_ra8_hcdc_ecm_protocol_zero = 0x00U
}
 Class / subclass / protocol triplets that identify a CDC ECM function within an attached USB device's descriptor walk. More...
enum  ra8_usb_hcdc_ecm_request_t : uint8_t {
  k_ra8_hcdc_ecm_req_set_packet_filter = 0x43U ,
  k_ra8_hcdc_ecm_req_get_statistic = 0x44U
}
 CDC-ECM class-specific request codes the host issues to the attached adapter (USB CDC ECM 1.20 sec 6.2 "Management Element Requests"). More...
enum  ra8_usb_hcdc_ecm_filter_t : uint16_t {
  k_ra8_hcdc_ecm_filter_promiscuous = 0x01U ,
  k_ra8_hcdc_ecm_filter_all_multicast = 0x02U ,
  k_ra8_hcdc_ecm_filter_directed = 0x04U ,
  k_ra8_hcdc_ecm_filter_broadcast = 0x08U ,
  k_ra8_hcdc_ecm_filter_multicast = 0x10U ,
  k_ra8_hcdc_ecm_filter_all = 0x1FU
}
 Filter mask bits passed to ra8_usb_hcdc_ecm_set_packet_filter. More...
enum  ra8_usb_hcdc_ecm_link_t : uint8_t {
  k_ra8_hcdc_ecm_link_down = 0U ,
  k_ra8_hcdc_ecm_link_up = 1U
}
 Adapter link status reported by _get_link_status. More...
enum  ra8_usb_hcdc_ecm_mac_t : uint8_t {
  k_ra8_hcdc_ecm_mac_bytes = 6U ,
  k_ra8_hcdc_ecm_mac_hex_chars = 12U
}
 Sizes related to the 6-byte Ethernet MAC + its 12-character ASCII hex representation in the iMACAddress string descriptor. More...

Functions

ra8_err_t ra8_usb_hcdc_ecm_init (ra8_usb_speed_t speed)
 Bring up the host-CDC-ECM driver on a chosen USB controller.
ra8_err_t ra8_usb_hcdc_ecm_close (void)
 Tear down the host-CDC-ECM driver and release the controller.
ra8_err_t ra8_usb_hcdc_ecm_attach_callback (ra8_usb_hcdc_ecm_attach_fn_t on_attach, void *ctx)
 Register (or detach) the attach callback.
ra8_err_t ra8_usb_hcdc_ecm_send_frame (const uint8_t *buf, uint16_t len)
 Send an Ethernet frame OUT to the attached CDC-ECM adapter.
ra8_err_t ra8_usb_hcdc_ecm_recv_frame (uint8_t *buf, uint16_t max_len, uint16_t *got_len)
 Drain an Ethernet frame IN from the attached CDC-ECM adapter.
ra8_err_t ra8_usb_hcdc_ecm_set_packet_filter (uint16_t filter_mask)
 Issue SET_ETHERNET_PACKET_FILTER (bRequest=0x43) to the attached CDC-ECM adapter.
ra8_err_t ra8_usb_hcdc_ecm_get_link_status (ra8_usb_hcdc_ecm_link_t *out_link)
 Issue GET_ETHERNET_STATISTIC (bRequest=0x44) to read the adapter's link state and store the result in *out_link.
ra8_err_t ra8_usb_hcdc_ecm_step (void)
 Drive the enumeration step machine forward by one step.
ra8_err_t ra8_usb_hcdc_ecm_parse_mac (const char *chars, uint8_t *out_mac)
 Parse 12 ASCII hex characters from an iMACAddress string descriptor payload into a 6-byte MAC.

Detailed Description

Native USB host-side CDC ECM (Communications Device Class -

Ethernet Networking Control Model) class layer.

Glues the host-mode bring-up paths in ra8_usb to a CDC-ECM USB Ethernet adapter attached on the EK-RA8D2's USB-HS host port. Mirrors FSP's r_usb_hcdc_ecm host-CDC-ECM class flow but compiled as part of this tree with no FSP / CherryUSB / TinyUSB binaries pulled in.

Lifecycle:

  1. ra8_usb_hcdc_ecm_init(speed) flips the controller to host mode, enables SOF generation and waits for SYSSTS0.LNST to report a J-state attach.
  2. The driver runs the chapter-9 enumeration step machine (Reset -> SET_ADDRESS -> GET_DEVICE_DESCRIPTOR -> GET_CONFIG_DESCRIPTOR -> SET_CONFIG -> SET_INTERFACE) over the DCP and walks the configuration descriptor for the CDC Communication-Interface (class=0x02 / subclass=0x06) plus the Data-Interface (class=0x0A) and the Ethernet Networking Functional descriptor (subtype=0x0F) which holds the iMACAddress string-descriptor index.
  3. After SET_INTERFACE the driver issues GET_STRING_DESCRIPTOR for the iMACAddress index and parses the 12 ASCII hex digits into a 6-byte MAC.
  4. When enumeration completes, the registered attach callback fires once with the bulk-IN / bulk-OUT pipe handles, max-packet sizes, and the parsed MAC.
  5. ra8_usb_hcdc_ecm_send_frame / _recv_frame move Ethernet frames through the bulk pipes.
  6. ra8_usb_hcdc_ecm_set_packet_filter issues the SET_ETHERNET_PACKET_FILTER class request (bRequest=0x43, bmRequestType=0x21) so the adapter accepts the desired class of frames.
  7. ra8_usb_hcdc_ecm_get_link_status issues GET_ETHERNET_STATISTIC (bRequest=0x44).
  8. ra8_usb_hcdc_ecm_close() drops bus power and releases the device.

The starter does not support hubs; it tracks a single attached CDC-ECM adapter. Hub class enumeration is tracked as a deferred follow-up.

Definition in file ra8_usb_hcdc_ecm.h.

Typedef Documentation

◆ ra8_usb_hcdc_ecm_attach_fn_t

typedef void(* ra8_usb_hcdc_ecm_attach_fn_t) (void *ctx, const ra8_usb_hcdc_ecm_device_t *device)

Attach-callback signature.

Parameters
[in]ctxCaller-supplied context registered with ra8_usb_hcdc_ecm_attach_callback.
[in]deviceSnapshot of the attached CDC-ECM adapter. Pointer remains valid only for the duration of the call; copy out anything you need.
Note
Invoked from the dispatch site (typically ISR context) after enumeration completes successfully.

Definition at line 198 of file ra8_usb_hcdc_ecm.h.

Enumeration Type Documentation

◆ ra8_usb_hcdc_ecm_class_t

enum ra8_usb_hcdc_ecm_class_t : uint8_t

Class / subclass / protocol triplets that identify a CDC ECM function within an attached USB device's descriptor walk.

Numbered from the USB CDC ECM 1.20 spec (subclass 0x06) and the USB-IF Class Codes registry. Protocol = 0x00 (no specific protocol).

Enumerator
k_ra8_hcdc_ecm_class_comms 

CDC control IF class.

k_ra8_hcdc_ecm_subclass_ecm 

Ethernet Networking model.

k_ra8_hcdc_ecm_protocol_none 

No protocol.

k_ra8_hcdc_ecm_class_data 

CDC data interface class.

k_ra8_hcdc_ecm_subclass_zero 

Data subclass = 0.

k_ra8_hcdc_ecm_protocol_zero 

Data protocol = 0.

Definition at line 104 of file ra8_usb_hcdc_ecm.h.

◆ ra8_usb_hcdc_ecm_filter_t

enum ra8_usb_hcdc_ecm_filter_t : uint16_t

Filter mask bits passed to ra8_usb_hcdc_ecm_set_packet_filter.

Wire-level layout matches USB CDC ECM 1.20 sec 6.2.4 "Set Ethernet Packet Filter" (Table 6: PACKET_TYPE bitmap).

Enumerator
k_ra8_hcdc_ecm_filter_promiscuous 

All received frames.

k_ra8_hcdc_ecm_filter_all_multicast 

All multicast frames.

k_ra8_hcdc_ecm_filter_directed 

Frames addressed to MAC.

k_ra8_hcdc_ecm_filter_broadcast 

Broadcast frames.

k_ra8_hcdc_ecm_filter_multicast 

Listed multicast.

k_ra8_hcdc_ecm_filter_all 

All bits set.

Definition at line 132 of file ra8_usb_hcdc_ecm.h.

◆ ra8_usb_hcdc_ecm_link_t

enum ra8_usb_hcdc_ecm_link_t : uint8_t

Adapter link status reported by _get_link_status.

Enumerator
k_ra8_hcdc_ecm_link_down 

NetworkConnection notification 0.

k_ra8_hcdc_ecm_link_up 

NetworkConnection notification 1.

Definition at line 145 of file ra8_usb_hcdc_ecm.h.

◆ ra8_usb_hcdc_ecm_mac_t

enum ra8_usb_hcdc_ecm_mac_t : uint8_t

Sizes related to the 6-byte Ethernet MAC + its 12-character ASCII hex representation in the iMACAddress string descriptor.

Enumerator
k_ra8_hcdc_ecm_mac_bytes 

Ethernet MAC byte count.

k_ra8_hcdc_ecm_mac_hex_chars 

12 ASCII hex chars in iMACAddr.

Definition at line 155 of file ra8_usb_hcdc_ecm.h.

◆ ra8_usb_hcdc_ecm_packet_t

enum ra8_usb_hcdc_ecm_packet_t : uint16_t

Packet sizing for the attached adapter's bulk + interrupt endpoints.

The Ethernet MTU plus 14-byte Ethernet header plus 4-byte FCS yields the canonical 1514-byte maximum frame size mirrored from FSP USB_HCDC_ECM_MAXIMUM_ETHERNET_FRAME_SIZE.

Enumerator
k_ra8_hcdc_ecm_bulk_max_packet_fs 

Bulk size at full speed.

k_ra8_hcdc_ecm_bulk_max_packet_hs 

Bulk size at high speed.

k_ra8_hcdc_ecm_intr_max_packet 

Notification pipe size.

k_ra8_hcdc_ecm_max_ethernet_frame 

Ethernet frame ceiling.

Definition at line 88 of file ra8_usb_hcdc_ecm.h.

◆ ra8_usb_hcdc_ecm_pipe_t

enum ra8_usb_hcdc_ecm_pipe_t : uint8_t

PIPE numbers used by the host-CDC-ECM driver for the attached adapter's endpoints.

FSP / RA8D2 PIPE assignment rules constrain bulk pipes to PIPE1..PIPE5 and interrupt pipes to PIPE6..PIPE9.

Enumerator
k_ra8_hcdc_ecm_pipe_bulk_in 

PIPE1 -> attached EP bulk IN.

k_ra8_hcdc_ecm_pipe_bulk_out 

PIPE2 -> attached EP bulk OUT.

k_ra8_hcdc_ecm_pipe_intr_in 

PIPE6 -> attached EP intr IN.

Definition at line 73 of file ra8_usb_hcdc_ecm.h.

◆ ra8_usb_hcdc_ecm_request_t

CDC-ECM class-specific request codes the host issues to the attached adapter (USB CDC ECM 1.20 sec 6.2 "Management Element Requests").

Enumerator
k_ra8_hcdc_ecm_req_set_packet_filter 

SET_ETHERNET_PACKET_FILTER.

k_ra8_hcdc_ecm_req_get_statistic 

GET_ETHERNET_STATISTIC.

Definition at line 119 of file ra8_usb_hcdc_ecm.h.

Function Documentation

◆ ra8_usb_hcdc_ecm_attach_callback()

ra8_err_t ra8_usb_hcdc_ecm_attach_callback ( ra8_usb_hcdc_ecm_attach_fn_t on_attach,
void * ctx )
nodiscard

Register (or detach) the attach callback.

The supplied callback fires exactly once per attach event, after the descriptor walk identifies a CDC-ECM Communication + Data interface pair on the attached device and the iMACAddress string descriptor has been parsed into device->mac_address. Pass NULL to detach.

Parameters
[in]on_attachCallback. NULL detaches.
[in]ctxContext pointer threaded back into on_attach.
Returns
ra8_err_t error code.
Return values
k_ra8_okCallback installed.
k_ra8_err_invalid_stateDriver was never initialized.
Precondition
ra8_usb_hcdc_ecm_init has run.
Postcondition
On a subsequent attach, on_attach(ctx, &device) fires once.
Note
Not thread-safe.
Since
0.1.0

Definition at line 780 of file ra8_usb_hcdc_ecm.c.

References k_ra8_err_invalid_state, k_ra8_ok, and s_state.

◆ ra8_usb_hcdc_ecm_close()

ra8_err_t ra8_usb_hcdc_ecm_close ( void )
nodiscard

Tear down the host-CDC-ECM driver and release the controller.

Returns
ra8_err_t error code.
Return values
k_ra8_okReleased.
k_ra8_err_invalid_stateDriver was never initialized.
Precondition
Single-threaded shutdown context.
Postcondition
ra8_usb_host_deinit ran; SOF generation halted; bus power dropped.
Subsequent host-CDC-ECM API calls return k_ra8_err_invalid_state.
Note
Not thread-safe.
Since
0.1.0

Definition at line 759 of file ra8_usb_hcdc_ecm.c.

References k_ra8_err_invalid_state, k_ra8_hcdc_ecm_step_idle, ra8_usb_host_deinit(), ra8_usb_host_set_uact(), and s_state.

◆ ra8_usb_hcdc_ecm_get_link_status()

ra8_err_t ra8_usb_hcdc_ecm_get_link_status ( ra8_usb_hcdc_ecm_link_t * out_link)
nodiscard

Issue GET_ETHERNET_STATISTIC (bRequest=0x44) to read the adapter's link state and store the result in *out_link.

Builds a class-interface-in SETUP packet (bmRequestType=0xA1, bRequest=0x44) with a 1-byte data stage that carries the latest NetworkConnection notification value (0 = down, 1 = up). See USB CDC ECM 1.20 sec 6.2.5 "GetEthernetStatistic".

Parameters
[out]out_linkReceives the current link state.
Returns
ra8_err_t error code.
Return values
k_ra8_okControl transfer queued; *out_link populated.
k_ra8_err_invalid_stateDriver not initialized, or no adapter attached.
k_ra8_err_null_ptrout_link was NULL.
k_ra8_err_busyA control transfer is already in flight.
Precondition
ra8_usb_hcdc_ecm_init succeeded.
Attach callback already fired.
out_link != NULL.
Postcondition
*out_link reflects the cached NetworkConnection state.
Note
Not thread-safe.
Since
0.1.0

Definition at line 855 of file ra8_usb_hcdc_ecm.c.

References k_ra8_err_invalid_state, k_ra8_hcdc_ecm_bm_class_iface_in, k_ra8_hcdc_ecm_data_alt, k_ra8_hcdc_ecm_req_get_statistic, k_ra8_ok, RA8_CHECK_NULL_PTR, ra8_usb_host_setup_request(), s_state, and s_tag.

◆ ra8_usb_hcdc_ecm_init()

ra8_err_t ra8_usb_hcdc_ecm_init ( ra8_usb_speed_t speed)
nodiscard

Bring up the host-CDC-ECM driver on a chosen USB controller.

Initialises the underlying ra8_usb driver in HOST mode for speed by delegating to ra8_usb_host_init, programs the DCP for 64-byte EP0 control transfers, leaves the bus in the "wait for attach" state (UACT cleared), and arms the internal enumeration step machine.

Parameters
[in]speedWhich USB controller (FS or HS).
Returns
ra8_err_t error code.
Return values
k_ra8_okHost-CDC-ECM ready, awaiting attach.
k_ra8_err_invalid_argspeed out of range.
k_ra8_err_hw_init_failedUnderlying ra8_usb_host_init failed.
Precondition
Single-threaded init context.
ra8_mstp_init and ra8_pwr_init already ran.
Postcondition
ra8_usb_host_init succeeded for speed.
Internal step machine armed; attach callback has not fired yet.
Note
Not thread-safe.
See also
ra8_usb_hcdc_ecm_attach_callback
ra8_usb_hcdc_ecm_close
Since
0.1.0

Definition at line 735 of file ra8_usb_hcdc_ecm.c.

References k_ra8_err_hw_init_failed, k_ra8_err_invalid_arg, k_ra8_hcdc_ecm_link_down, k_ra8_hcdc_ecm_step_idle, k_ra8_ok, k_ra8_usb_speed_fs, k_ra8_usb_speed_hs, ra8_log_error_val, ra8_log_info_val, ra8_usb_host_init(), s_state, and s_tag.

◆ ra8_usb_hcdc_ecm_parse_mac()

ra8_err_t ra8_usb_hcdc_ecm_parse_mac ( const char * chars,
uint8_t * out_mac )
nodiscard

Parse 12 ASCII hex characters from an iMACAddress string descriptor payload into a 6-byte MAC.

USB string descriptors are UTF-16LE; the iMACAddress payload is a 12-character ASCII-hex MAC encoded as 12 UTF-16LE code units (24 bytes). This helper walks chars two ASCII hex digits at a time and writes each parsed nibble pair to out_mac[0..5].

See USB CDC ECM 1.20 sec 5.4 "iMACAddress".

Parameters
[in]charsPointer to 12 ASCII hex characters (post-UTF-16 decoding).
[out]out_macReceives the 6-byte MAC.
Returns
ra8_err_t error code.
Return values
k_ra8_okParsed successfully.
k_ra8_err_null_ptrchars or out_mac was NULL.
k_ra8_err_invalid_argOne of the characters was not a valid ASCII hex digit.
Precondition
chars points to >= 12 readable bytes.
out_mac points to >= 6 writable bytes.
Postcondition
On success, out_mac[0..5] carries the parsed MAC.
On failure, out_mac contents are unspecified.
Note
Pure function; safe to call before init.
Since
0.1.0

Definition at line 888 of file ra8_usb_hcdc_ecm.c.

References internal_hex_nibble(), k_ra8_hcdc_ecm_mac_bytes, k_ra8_hcdc_ecm_shift_nibble, k_ra8_ok, RA8_CHECK_NULL_PTR, and s_tag.

◆ ra8_usb_hcdc_ecm_recv_frame()

ra8_err_t ra8_usb_hcdc_ecm_recv_frame ( uint8_t * buf,
uint16_t max_len,
uint16_t * got_len )
nodiscard

Drain an Ethernet frame IN from the attached CDC-ECM adapter.

Polling / non-blocking. Pulls bytes from PIPE1 (bulk IN) into buf and stores the actual byte count in *got_len. Per USB CDC ECM 1.20 sec 5.4 "Data Class Interface Definitions" one bulk IN transfer yields one Ethernet frame.

Parameters
[out]bufDestination buffer.
[in]max_lenCapacity of buf, > 0.
[out]got_lenReceives the number of bytes actually placed.
Returns
ra8_err_t error code.
Return values
k_ra8_okFrame drained; *got_len reflects the count.
k_ra8_err_no_dataPipe was empty.
k_ra8_err_invalid_stateDriver not initialized, or no adapter attached.
k_ra8_err_null_ptrbuf or got_len was NULL.
k_ra8_err_invalid_argmax_len == 0.
Precondition
ra8_usb_hcdc_ecm_init succeeded.
Attach callback already fired.
buf, got_len non-NULL, max_len > 0.
Postcondition
On success *got_len reflects the actual byte count.
Note
Not thread-safe.
Since
0.1.0

Definition at line 812 of file ra8_usb_hcdc_ecm.c.

References k_ra8_err_invalid_arg, k_ra8_err_invalid_state, k_ra8_hcdc_ecm_pipe_bulk_in, k_ra8_ok, RA8_CHECK_NULL_PTR, ra8_usb_queue_out(), s_state, and s_tag.

◆ ra8_usb_hcdc_ecm_send_frame()

ra8_err_t ra8_usb_hcdc_ecm_send_frame ( const uint8_t * buf,
uint16_t len )
nodiscard

Send an Ethernet frame OUT to the attached CDC-ECM adapter.

Pushes buf bytes on PIPE2 (bulk OUT) so the controller delivers them at the next OUT token. Per USB CDC ECM 1.20 sec 5.4 "Data Class Interface Definitions" each USB transfer carries exactly one Ethernet frame (no length prefix). A frame whose length is an integer multiple of wMaxPacketSize is followed by a zero-length packet to terminate the transfer.

Parameters
[in]bufFrame buffer. NULL allowed iff len == 0.
[in]lenByte count, 0..k_ra8_hcdc_ecm_max_ethernet_frame.
Returns
ra8_err_t error code.
Return values
k_ra8_okTransfer queued.
k_ra8_err_invalid_stateDriver not initialized, or no adapter attached.
k_ra8_err_invalid_argBad buf / len.
Precondition
ra8_usb_hcdc_ecm_init succeeded.
Attach callback already fired.
Postcondition
Frame will be delivered on the next bulk OUT token.
Note
Not thread-safe.
Since
0.1.0

Definition at line 795 of file ra8_usb_hcdc_ecm.c.

References k_ra8_err_invalid_arg, k_ra8_err_invalid_state, k_ra8_hcdc_ecm_max_ethernet_frame, k_ra8_hcdc_ecm_pipe_bulk_out, ra8_usb_queue_in(), and s_state.

◆ ra8_usb_hcdc_ecm_set_packet_filter()

ra8_err_t ra8_usb_hcdc_ecm_set_packet_filter ( uint16_t filter_mask)
nodiscard

Issue SET_ETHERNET_PACKET_FILTER (bRequest=0x43) to the attached CDC-ECM adapter.

Builds a class-interface-out SETUP packet (bmRequestType=0x21, bRequest=0x43) with the requested filter mask in wValue and wLength=0, and hands it to ra8_usb_host_setup_request. See USB CDC ECM 1.20 sec 6.2.4 "SetEthernetPacketFilter".

Parameters
[in]filter_maskOR of k_ra8_hcdc_ecm_filter_* bits.
Returns
ra8_err_t error code.
Return values
k_ra8_okControl transfer queued.
k_ra8_err_invalid_stateDriver not initialized, or no adapter attached.
k_ra8_err_invalid_argfilter_mask has bits outside the documented set.
k_ra8_err_busyA control transfer is already in flight.
Precondition
ra8_usb_hcdc_ecm_init succeeded.
Attach callback already fired.
Postcondition
DCP control transfer queued at the controller.
Note
Not thread-safe.
Since
0.1.0

Definition at line 841 of file ra8_usb_hcdc_ecm.c.

References internal_setup_set_packet_filter(), k_ra8_err_invalid_arg, k_ra8_err_invalid_state, k_ra8_hcdc_ecm_filter_all, and s_state.

◆ ra8_usb_hcdc_ecm_step()

ra8_err_t ra8_usb_hcdc_ecm_step ( void )
nodiscard

Drive the enumeration step machine forward by one step.

Test / debug entry point. The production path drives this from the ra8_usb_dispatch callback when the controller fires a CTRT or BRDY interrupt; tests call it directly to walk the state machine deterministically.

Returns
ra8_err_t error code.
Return values
k_ra8_okStep advanced.
k_ra8_err_invalid_stateDriver not initialized.
Precondition
ra8_usb_hcdc_ecm_init succeeded.
Postcondition
Internal enumeration step counter advances by one. When the step machine reaches the terminal state, the registered attach callback fires.
Note
Not thread-safe.
Since
0.1.0

Definition at line 917 of file ra8_usb_hcdc_ecm.c.

References internal_step_advance(), k_ra8_err_invalid_state, and s_state.