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_mipi_phy_ldo_enable(void)
Enable the D-PHY LDO (DPHYPWRCR.PWRSEN = 1) only.
ra8_err_t ra8_mipi_phy_deinit(void)
Stop the D-PHY per HUM Ch 64.3.2 p 3837 (DPHYEN -> PLLSTP -> PWRSEN).
ra8_err_t ra8_mipi_phy_exit_stop(const ra8_mipi_phy_config_t *cfg)
Post-standby resume: re-run the start-up procedure.
void ra8_mipi_phy_dispatch(void)
Read DPHYSFR, snapshot it, decode events, and fire the callback.
ra8_err_t ra8_mipi_phy_pll_start(void)
Release the PLL (DPHYPLOCR.PLLSTP = 0) and wait for lock.
bool ra8_mipi_phy_is_pll_locked(void)
Test whether the PLL is locked (DPHYSFR.PLLSF = 1).
ra8_err_t ra8_mipi_phy_init(const ra8_mipi_phy_config_t *cfg)
Bring up the D-PHY end-to-end per HUM Ch 64.3.1 p 3837.
ra8_err_t ra8_mipi_phy_recover_from_error(const ra8_mipi_phy_config_t *cfg)
Reset and re-arm the PHY after an LDO drop / PLL unlock.
ra8_err_t ra8_mipi_phy_attach_handler(ra8_mipi_phy_event_fn_t fn, void *ctx)
Attach a status callback fired by ra8_mipi_phy_dispatch.
bool ra8_mipi_phy_is_ldo_stable(void)
Test whether the LDO has stabilised (DPHYSFR.PWRSF = 1).
ra8_err_t ra8_mipi_phy_ldo_disable(void)
Disable the D-PHY LDO (DPHYPWRCR.PWRSEN = 0) only.
ra8_err_t ra8_mipi_phy_wait_ready(void)
Bounded poll until the PHY is fully ready (PWRSF & PLLSF).
ra8_err_t ra8_mipi_phy_get_status(uint32_t *out_mask)
Read the D-PHY status flags (DPHYSFR).
ra8_err_t ra8_mipi_phy_reset(void)
Reset the PHY to its post-MSTPCRC-clear state without re-init.
ra8_err_t ra8_mipi_phy_enter_stop(void)
Pre-standby tear-down: disable D-PHY then drop the LDO.
ra8_err_t ra8_mipi_phy_pll_stop(void)
Stop the PLL (DPHYPLOCR.PLLSTP = 1).
MIPI D-PHY register layout for the RA8D2.
MIPI D-PHY driver – shared enums, structs, and callback typedef.
void(* ra8_mipi_phy_event_fn_t)(void *ctx, ra8_mipi_phy_event_t event, uint32_t sfr)
MIPI PHY status callback (LDO ready / PLL lock / PLL drop).
Top-level configuration for ra8_mipi_phy_init.