Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_etha_set_ipv_remap(ra8_etha_port_t port, const uint8_t *map)
Programme the IPV (PCP-to-internal-priority) remap table.
ra8_err_t ra8_etha_deinit(ra8_etha_port_t port)
Tear down an ETHA port (drop into RESET, mask all IRQs).
ra8_err_t ra8_etha_set_mode(ra8_etha_port_t port, ra8_etha_opc_t mode)
Issue an explicit EAMC mode-change command.
ra8_err_t ra8_etha_disable_irq(ra8_etha_port_t port, ra8_etha_irq_class_t block, uint32_t mask)
Atomically disable specific error IRQ bits in one of the three blocks.
ra8_err_t ra8_etha_enter_stop(ra8_etha_port_t port)
Drop an ETHA port into low-power stop (DISABLE mode).
ra8_err_t ra8_etha_clear_status(ra8_etha_port_t port, ra8_etha_irq_class_t block, uint32_t mask)
Clear bits in EAEIS0 / EAEIS1 / EAEIS2 via EAEIDx.
ra8_err_t ra8_etha_set_queue_depth(ra8_etha_port_t port, ra8_etha_tc_t tc, uint16_t depth)
Set the TX descriptor queue depth for one traffic class.
ra8_err_t ra8_etha_enable_irq(ra8_etha_port_t port, ra8_etha_irq_class_t block, uint32_t mask)
Atomically enable specific error IRQ bits in one of the three blocks.
void ra8_etha_dispatch(ra8_etha_port_t port)
Snapshot all three EAEISx, clear them, then fire the per-port handler.
ra8_err_t ra8_etha_attach_handler(ra8_etha_port_t port, ra8_etha_event_fn_t cb, void *ctx)
Attach a per-port event handler.
ra8_err_t ra8_etha_get_status(ra8_etha_port_t port, ra8_etha_status_t *out)
Read a port's status snapshot (mode + 3x error IRQ status + TAS).
ra8_err_t ra8_etha_set_preemption(ra8_etha_port_t port, uint8_t preempt, uint8_t cut_thru, ra8_etha_afs_t afs)
Configure 802.3br TX preemption: which classes are pre-emptable.
ra8_err_t ra8_etha_reset(ra8_etha_port_t port)
Software-reset the port: drop to RESET, then re-enter CONFIG.
ra8_err_t ra8_etha_exit_stop(ra8_etha_port_t port)
Bring an ETHA port back from low-power stop (OPERATION mode).
ra8_err_t ra8_etha_set_max_frame_size(ra8_etha_port_t port, ra8_etha_tc_t tc, uint16_t max_bytes)
Set the maximum frame size for one traffic class (jumbo OK).
ra8_err_t ra8_etha_set_queue_arb(ra8_etha_port_t port, ra8_etha_tc_t tc, uint8_t arb)
Configure the per-traffic-class TX queue arbitration weight.
ra8_err_t ra8_etha_init(ra8_etha_port_t port, const ra8_etha_config_t *cfg)
Initialise an ETHA port (MSTP gate + reset registers + initial mode).
ra8_err_t ra8_etha_get_queue_level(ra8_etha_port_t port, ra8_etha_tc_t tc, uint16_t *cur_level, uint16_t *peak)
Read the current and high-water-mark queue level for one class.
Ethernet Agent (ETHA) per-port register layout for the RA8D2.
ra8_etha_port_t
ETHA port index (m = 0, 1).
ra8_etha_afs_t
EATPEC.AFS[1:0] additional fragment size policy for 802.3br.
ra8_etha_tc_t
Traffic-class index (q = 0..7) used by every per-class array.
ra8_etha_opc_t
ETHA EAMC.OPC[1:0] operating mode commands.
ra8_etha_irq_class_t
Identifier for one of the three error-interrupt blocks.
Per-port Ethernet Agent (ETHA) data types – HUM Ch 32 (p 1627-1702).
void(* ra8_etha_event_fn_t)(void *ctx, ra8_etha_port_t port, uint32_t eaeis0, uint32_t eaeis1, uint32_t eaeis2)
ETHA per-port event callback.
Per-port ETHA configuration knobs.
Snapshot of an ETHA port's runtime state.