|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Apache NimBLE HCI transport adapter against the ra8_ble HCI ring. More...
Go to the source code of this file.
Enumerations | |
| enum | ble_hci_ra8_ble_limits_t : uint16_t { k_ble_hci_ra8_ble_evt_buf_max = 257U , k_ble_hci_ra8_ble_acl_buf_max = 255U , k_ble_hci_ra8_ble_handle_mask = 0x0FFFU } |
| Sizing constants for the adapter's private scratch buffers. More... | |
Functions | |
| ra8_err_t | ble_hci_ra8_ble_init (void) |
| Attach the adapter to the ra8_ble HCI ring. | |
| ra8_err_t | ble_hci_ra8_ble_deinit (void) |
| Detach the adapter from the ra8_ble HCI ring. | |
Apache NimBLE HCI transport adapter against the ra8_ble HCI ring.
Bridges Apache NimBLE's HCI transport entry points onto our ra8_ble driver:
The host->controller path is wired to ra8_ble_hci_send_command / ra8_ble_hci_send_acl_data. The controller->host path is fed by ra8_ble_attach_event_handler / ra8_ble_attach_acl_handler callbacks invoked from ra8_ble_dispatch at every kernel tick (or from the controller IRQ once enabled).
The expected lifecycle is:
Definition in file ble_hci_ra8_ble.h.
| enum ble_hci_ra8_ble_limits_t : uint16_t |
Sizing constants for the adapter's private scratch buffers.
The adapter copies inbound HCI events / ACL frames out of the driver-owned scratch buffer (ra8_ble_event_fn_t / ra8_ble_acl_fn_t promise the pointer is only valid for the duration of the callback) into NimBLE-allocated mbufs. The maxima below match the matching ra8_ble_limits_t constants but live here so the adapter does not reach across the driver header boundary for sizing.
Definition at line 73 of file ble_hci_ra8_ble.h.
|
nodiscard |
Detach the adapter from the ra8_ble HCI ring.
Calls ra8_ble_attach_event_handler(nullptr, nullptr) and ra8_ble_attach_acl_handler(nullptr, nullptr) so subsequent inbound traffic is dropped on the floor by the driver.
| k_ra8_ok | Adapter detached. |
Definition at line 248 of file ble_hci_ra8_ble.c.
References k_ble_hci_ra8_ble_state_idle, k_ra8_ok, ra8_ble_attach_acl_handler(), ra8_ble_attach_event_handler(), and s_state.
|
nodiscard |
Attach the adapter to the ra8_ble HCI ring.
Registers priv_event_cb and priv_acl_cb with ra8_ble_attach_event_handler / ra8_ble_attach_acl_handler. The callbacks copy the inbound bytes out of the driver scratch region into NimBLE-allocated buffers and hand them to ble_transport_to_hs_evt / ble_transport_to_hs_acl.
| k_ra8_ok | Callbacks attached. |
| k_ra8_err_not_initialized | ra8_ble_init has not been called. |
Definition at line 235 of file ble_hci_ra8_ble.c.
References internal_acl_cb(), internal_event_cb(), k_ble_hci_ra8_ble_state_running, k_ra8_err_not_initialized, k_ra8_ok, ra8_ble_attach_acl_handler(), ra8_ble_attach_event_handler(), and s_state.
Referenced by ble_transport_ll_init(), and internal_demo_ble_or_halt().