local_time_hw_device Struct Reference

local_time_hw_device Struct Reference

#include < local_time_hal.h >

Data Fields

struct hw_device_t   common
 
int64_t(*  get_local_time )(struct local_time_hw_device *dev)
 
uint64_t(*  get_local_freq )(struct local_time_hw_device *dev)
 
int(*  set_local_slew )(struct local_time_hw_device *dev, int16_t rate)
 
int(*  get_debug_log )(struct local_time_hw_device *dev, struct local_time_debug_event *records, int max_records)
 

Detailed Description

Definition at line 57 of file local_time_hal.h .

Field Documentation

struct hw_device_t common

Common methods of the local time hardware device. This must be the first member of local_time_hw_device as users of this structure will cast a hw_device_t to local_time_hw_device pointer in contexts where it's known the hw_device_t references a local_time_hw_device .

Definition at line 64 of file local_time_hal.h .

int(* get_debug_log)(struct local_time_hw_device *dev, struct local_time_debug_event *records, int max_records)

A method used to collect low level sync data in a lab environments. Most HAL implementations will simply set this member to NULL, or return -EINVAL to indicate that this functionality is not supported. Production HALs should never support this method.

Definition at line 98 of file local_time_hal.h .

uint64_t(* get_local_freq)(struct local_time_hw_device *dev)

Returns the nominal frequency (in hertz) of the system wide local time counter

Definition at line 77 of file local_time_hal.h .

int64_t(* get_local_time)(struct local_time_hw_device *dev)

Returns the current value of the system wide local time counter

Definition at line 70 of file local_time_hal.h .

int(* set_local_slew)(struct local_time_hw_device *dev, int16_t rate)

Sets the HW slew rate of oscillator which drives the system wide local time counter. On success, platforms should return 0. Platforms which do not support HW slew should leave this method set to NULL.

Valid values for rate range from MIN_INT16 to MAX_INT16. Platform implementations should attempt map this range linearly to the min/max slew rate of their hardware.

Definition at line 89 of file local_time_hal.h .


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