ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_eth_mfwd.h
Go to the documentation of this file.
1
20
21#pragma once
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <stdint.h>
28
29#include "ra8_err.h"
30
35typedef void (*ra8_eth_mfwd_event_fn_t)(void* ctx, uint32_t status_mask);
36
38[[nodiscard]] ra8_err_t ra8_eth_mfwd_init(void);
39
41[[nodiscard]] ra8_err_t ra8_eth_mfwd_deinit(void);
42
44[[nodiscard]] ra8_err_t ra8_eth_mfwd_get_status(uint32_t* out_mask);
45
47[[nodiscard]] ra8_err_t ra8_eth_mfwd_clear_status(uint32_t mask);
48
51
62void ra8_eth_mfwd_dispatch(void);
63
65[[nodiscard]] ra8_err_t ra8_eth_mfwd_enter_stop(void);
66
68[[nodiscard]] ra8_err_t ra8_eth_mfwd_exit_stop(void);
69
100[[nodiscard]] ra8_err_t ra8_eth_mfwd_set_forwarding_masks(const uint8_t port_masks[3]);
101
129[[nodiscard]] ra8_err_t ra8_eth_mfwd_route_queue(uint8_t port, uint8_t queue_index);
130
131#ifdef __cplusplus
132}
133#endif
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_err_t ra8_eth_mfwd_set_forwarding_masks(const uint8_t port_masks[3])
Program the per-port forwarding-destination masks (FWPBFC0).
void ra8_eth_mfwd_dispatch(void)
Dispatch an MFWD event.
ra8_err_t ra8_eth_mfwd_attach_handler(ra8_eth_mfwd_event_fn_t fn, void *ctx)
Attach the shared event handler.
ra8_err_t ra8_eth_mfwd_init(void)
Initialise the MFWD block (MSTP enable + reset regs).
ra8_err_t ra8_eth_mfwd_exit_stop(void)
Exit MSTP-gated stop.
void(* ra8_eth_mfwd_event_fn_t)(void *ctx, uint32_t status_mask)
MFWD event callback.
ra8_err_t ra8_eth_mfwd_deinit(void)
Tear down the MFWD block.
ra8_err_t ra8_eth_mfwd_enter_stop(void)
Put MFWD into MSTP-gated stop.
ra8_err_t ra8_eth_mfwd_route_queue(uint8_t port, uint8_t queue_index)
Route inbound frames from a GMAC port into a GWCA RX queue.
ra8_err_t ra8_eth_mfwd_clear_status(uint32_t mask)
Clear bits in MFWD_STS via MFWD_ICLR.
ra8_err_t ra8_eth_mfwd_get_status(uint32_t *out_mask)
Read the MFWD_STS status register.