|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Binds the ra8_c6link transport seam to this port's OS vtable. More...
Go to the source code of this file.
Functions | |
| ra8_err_t | ra8_esp_hosted_c6link_bind (ra8_c6link_transport_t *out) |
| Fill a ra8_c6link transport seam with this port's implementations. | |
Binds the ra8_c6link transport seam to this port's OS vtable.
libs/ra8_c6link is deliberately ignorant of hardware: it reaches the co-processor through three function pointers and knows nothing about SCI channels, ICU edges or ThreadX. This header is where those three pointers are filled in with the port's own implementations, which is why it lives here rather than inside the library – the library must stay compilable on a host with no port, and it is.
All three rows are thin trampolines onto the 72-entry hosted_osi_funcs_t vtable behind g_h. That is deliberate: the transactions the facade clocks then go through exactly the same code the vendored driver would use, so a bench result from the facade is a bench result about the port.
Definition in file ra8_esp_hosted_c6link.h.
|
nodiscard |
Fill a ra8_c6link transport seam with this port's implementations.
Sets the transfer, handshake and delay rows to trampolines onto g_h and leaves the context null – the port is a singleton, so there is nothing per-instance to carry. The seam is validated by ra8_c6link_open, which rejects any row this call failed to fill.
| [out] | out | Seam to fill; must be non-null. |
| k_ra8_ok | The seam is bound and may be handed to ra8_c6link_open. |
| k_ra8_err_null_ptr | out was null. |
| k_ra8_err_not_initialized | The port is not up, so g_h.funcs would be unpopulated at the first transaction. |
out are non-null. out is cleared rather than left half-filled.Definition at line 151 of file ra8_esp_hosted_c6link.c.
References ra8_c6link_transport::ctx, ra8_c6link_transport::delay_ms, ra8_c6link_transport::handshake_active, internal_ra8_esp_hosted_c6link_delay(), internal_ra8_esp_hosted_c6link_handshake(), internal_ra8_esp_hosted_c6link_transfer(), k_ra8_err_not_initialized, k_ra8_err_null_ptr, k_ra8_ok, ra8_esp_hosted_port_is_ready(), and ra8_c6link_transport::transfer.
Referenced by c6_join_open_link(), c6_wifi_open_link(), internal_c6_cam_open_link(), internal_open_and_join(), and wifi_hal_make_cfg().