caffeine-hal 0.6.6
A Header-Defined Interface c library, it provides the hal layer for the Caffeine framework
Loading...
Searching...
No Matches
Data Fields
cfn_hal_driver_s Struct Reference

Base structure for all peripheral drivers. Contains common state and polymorphic interface linkage. More...

#include <cfn_hal_types.h>

Data Fields

cfn_hal_peripheral_type_t type
 
cfn_hal_driver_status_t status
 
cfn_hal_power_state_t power_state
 
struct cfn_hal_clock_sclock_driver
 
cfn_hal_error_code_t(* on_config )(struct cfn_hal_driver_s *base, void *user_arg, cfn_hal_config_phase_t phase)
 Board-level configuration hook (BSP). Called by the generic HAL to handle hardware-specific setup like pin muxing.
 
voidon_config_arg
 
voiddependency
 
voidextension
 
uint32_t flags
 
uint32_t peripheral_id
 
const struct cfn_hal_api_base_svmt
 

Detailed Description

Base structure for all peripheral drivers. Contains common state and polymorphic interface linkage.

Field Documentation

◆ clock_driver

struct cfn_hal_clock_s* cfn_hal_driver_s::clock_driver

Pointer to the clock driver instance

◆ dependency

void* cfn_hal_driver_s::dependency

Pointer to an optional peripheral dependency (e.g., DMA handle or parent bus)

◆ extension

void* cfn_hal_driver_s::extension

Pointer to an optional driver extension or private implementation state

◆ flags

uint32_t cfn_hal_driver_s::flags

Generic generic state tracking flags for the peripheral

◆ on_config

cfn_hal_error_code_t(* cfn_hal_driver_s::on_config) (struct cfn_hal_driver_s *base, void *user_arg, cfn_hal_config_phase_t phase)

Board-level configuration hook (BSP). Called by the generic HAL to handle hardware-specific setup like pin muxing.

◆ on_config_arg

void* cfn_hal_driver_s::on_config_arg

User argument passed to the on_config hook

◆ peripheral_id

uint32_t cfn_hal_driver_s::peripheral_id

◆ power_state

cfn_hal_power_state_t cfn_hal_driver_s::power_state

Current power/clocking state of the hardware

◆ status

cfn_hal_driver_status_t cfn_hal_driver_s::status

Current software state of the driver

◆ type

cfn_hal_peripheral_type_t cfn_hal_driver_s::type

FourCC peripheral type code (e.g. 'UART')

◆ vmt

const struct cfn_hal_api_base_s* cfn_hal_driver_s::vmt

Pointer to the peripheral-specific Virtual Method Table (API)


The documentation for this struct was generated from the following file: