DT Reference
DT
-
enum device_status_enumeration
device status
Values:
-
enumerator WM_DEV_ST_UNINIT
-
enumerator WM_DEV_ST_INITING
-
enumerator WM_DEV_ST_INITED
-
enumerator WM_DEV_ST_UNKNOWN
-
enumerator WM_DEV_ST_UNINIT
-
typedef enum device_status_enumeration wm_device_status_t
device status
-
typedef struct device_structure wm_device_t
device structure
Structure of the device entity
-
struct device_structure
device structure
Structure of the device entity
-
wm_device_t *wm_dt_get_device_by_name(const char *device_name)
Get the device.
- Parameters:
device_name – [in] device name
- Returns:
NULL : failed
others: succeed
-
int wm_dt_set_device_table_name(const char *default_name)
Set the device table name.
Warning
It must be invoked before any use of wm_dt_get_device_by_name, and will fail if invoked after wm_dt_get_device_by_name.
- Parameters:
default_name – [in] device table name
- Returns:
WM_ERR_SUCCESS : succeed
others : failed
-
int wm_dt_free_device_by_name(const char *device_name)
Free the device.
- Parameters:
device_name – [in] device name
- Returns:
WM_ERR_SUCCESS : succeed
others : failed
-
int wm_dt_free_device(wm_device_t *device)
Free the device.
- Parameters:
device – [in] device pointer
- Returns:
WM_ERR_SUCCESS : succeed
others : failed
-
int wm_dt_free_all_device(void)
Free all devices.
- Returns:
WM_ERR_SUCCESS : succeed
others : failed
-
int wm_dt_dump_all_device(void)
dump in the default serial
- Returns:
WM_ERR_SUCCESS : succeed
others : failed
-
int wm_dt_auto_init_device(void)
auto init system device
- Returns:
WM_ERR_SUCCESS : succeed
others : failed