Zephyr Project API 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
device_state Struct Reference

Runtime device dynamic structure (in RAM) per driver instance. More...

#include <device.h>

Data Fields

uint8_t init_res
 Device initialization return code (positive errno value).
 
bool initialized: 1
 Indicates the device initialization function has been invoked.
 

Detailed Description

Runtime device dynamic structure (in RAM) per driver instance.

Fields in this are expected to be default-initialized to zero. The kernel driver infrastructure and driver access functions are responsible for ensuring that any non-zero initialization is done before they are accessed.

Field Documentation

◆ init_res

uint8_t device_state::init_res

Device initialization return code (positive errno value).

Device initialization functions return a negative errno code if they fail. In Zephyr, errno values do not exceed 255, so we can store the positive result value in a uint8_t type.

◆ initialized

bool device_state::initialized

Indicates the device initialization function has been invoked.


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