WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
LPM

结构体

struct  lpm_dev_ops_t
 The peripheral device operation functions. 更多...
 

类型定义

typedef void(* lpm_clock_init_callback) (void)
 

枚举

enum  lpm_dev_id_t {
  DEV_ADC , DEV_I2C , DEV_DMA , DEV_SPI ,
  DEV_QSPI , DEV_UART , DEV_CAP , DEV_OPI ,
  DEV_PSRAM , DEV_IR , DEV_EMMC , DEV_SDIO ,
  DEV_DSS , DEV_GPU , DEV_PCIE , DEV_PWM ,
  DEV_MAX
}
 Peripheral device ID. 更多...
 
enum  lpm_ret_t {
  LPM_RET_OK = 0 , LPM_RET_NOREG , LPM_RET_ON , LPM_RET_OFF ,
  LPM_RET_ERR , LPM_RET_UNINIT , LPM_RET_MAX
}
 Function return value. 更多...
 

函数

bool lpm_dev_ops_init (void)
 The peripheral device operations init.
 
bool lpm_dev_ops_deinit (void)
 The peripheral device operations deinit.
 
bool lpm_dev_ops_register (lpm_dev_id_t id, lpm_dev_ops_t *ops)
 Register low-power operation interface of the peripheral device.
 
bool lpm_dev_ops_unregister (lpm_dev_id_t id)
 Deregister low-power operation interface of the peripheral device.
 
int lpm_dev_ops_update (lpm_dev_id_t id, lpm_dev_ops_t *ops)
 Update the operation function of the device.
 
int lpm_dev_power_on (lpm_dev_id_t id, bool on)
 Power on or power off the peripheral device.
 
int lpm_dev_get_power_sts (lpm_dev_id_t id)
 Get the power status of peripheral Devices.
 
int lpm_dev_set_voltage (lpm_dev_id_t id, int vset)
 Config the peripheral device voltage.
 
int lpm_dev_get_voltage (lpm_dev_id_t id)
 Get the voltage of peripheral device.
 
int lpm_dev_clock_en (lpm_dev_id_t id, bool on)
 Enable or disable the device clock switch.
 
int lpm_dev_get_clock_sts (lpm_dev_id_t id)
 Get the device clock switch status.
 
int lpm_dev_set_freq (lpm_dev_id_t id, int freq)
 Set the clock frequency of the peripheral device.
 
int lpm_dev_get_freq (lpm_dev_id_t id)
 Get the clock frequency of the peripheral device.
 
int lpm_dev_set_div_num (lpm_dev_id_t id, int clk_div)
 Set the divider number of the peripheral device clock.
 
int lpm_dev_get_div_num (lpm_dev_id_t id)
 Get the divider number of the peripheral device clock.
 
int lpm_dev_sub_bus_clken (lpm_dev_id_t id, int bus, bool on)
 Enables or disables the clock of a subdevice.
 
void lpm_display_clocks_init_register_callback (lpm_clock_init_callback callback)
 Registering the callback function for clock initialization configuration of the display module.
 
void lpm_display_clocks_init (void)
 Clock initialization configuration of the display module.
 

详细描述

类型定义说明

◆ lpm_clock_init_callback

typedef void(* lpm_clock_init_callback) (void)

枚举类型说明

◆ lpm_dev_id_t

Peripheral device ID.

枚举值
DEV_ADC 
DEV_I2C 
DEV_DMA 
DEV_SPI 
DEV_QSPI 
DEV_UART 
DEV_CAP 
DEV_OPI 
DEV_PSRAM 
DEV_IR 
DEV_EMMC 
DEV_SDIO 
DEV_DSS 
DEV_GPU 
DEV_PCIE 
DEV_PWM 
DEV_MAX 

◆ lpm_ret_t

enum lpm_ret_t

Function return value.

枚举值
LPM_RET_OK 

Run successfully.

LPM_RET_NOREG 

Not register.

LPM_RET_ON 

The switch status is ON.

LPM_RET_OFF 

The switch status is OFF.

LPM_RET_ERR 

Run error.

LPM_RET_UNINIT 

Uninitialized.

LPM_RET_MAX 

函数说明

◆ lpm_dev_clock_en()

int lpm_dev_clock_en ( lpm_dev_id_t  id,
bool  on 
)

Enable or disable the device clock switch.

参数
idPeripheral device ID.
onEnable or disable.
返回
Success or not, for details, refer to lpm_ret_t.

◆ lpm_dev_get_clock_sts()

int lpm_dev_get_clock_sts ( lpm_dev_id_t  id)

Get the device clock switch status.

参数
idPeripheral device ID.
返回
Clock enable status, for details, refer to lpm_ret_t.

◆ lpm_dev_get_div_num()

int lpm_dev_get_div_num ( lpm_dev_id_t  id)

Get the divider number of the peripheral device clock.

参数
idPeripheral device ID.
返回
Current divider number of the peripheral device clock.

◆ lpm_dev_get_freq()

int lpm_dev_get_freq ( lpm_dev_id_t  id)

Get the clock frequency of the peripheral device.

参数
idPeripheral device ID.
返回
Current frequency of the peripheral device.

◆ lpm_dev_get_power_sts()

int lpm_dev_get_power_sts ( lpm_dev_id_t  id)

Get the power status of peripheral Devices.

参数
idPeripheral device ID.
返回
Power status, for details, refer to lpm_ret_t.

◆ lpm_dev_get_voltage()

int lpm_dev_get_voltage ( lpm_dev_id_t  id)

Get the voltage of peripheral device.

参数
idPeripheral device ID.
返回
Current voltage of the peripheral device.

◆ lpm_dev_ops_deinit()

bool lpm_dev_ops_deinit ( void  )

The peripheral device operations deinit.

返回
Result of the operation, true indicates success, false for failed.

◆ lpm_dev_ops_init()

bool lpm_dev_ops_init ( void  )

The peripheral device operations init.

返回
Result of the operation, true indicates success, false for failed.

◆ lpm_dev_ops_register()

bool lpm_dev_ops_register ( lpm_dev_id_t  id,
lpm_dev_ops_t ops 
)

Register low-power operation interface of the peripheral device.

参数
idPeripheral device ID.
opsPeripheral device operation methods.
返回
Result of the operation, true indicates success, false for failed.

◆ lpm_dev_ops_unregister()

bool lpm_dev_ops_unregister ( lpm_dev_id_t  id)

Deregister low-power operation interface of the peripheral device.

参数
idPeripheral device ID.
返回
Result of the operation, true indicates success, false for failed.

◆ lpm_dev_ops_update()

int lpm_dev_ops_update ( lpm_dev_id_t  id,
lpm_dev_ops_t ops 
)

Update the operation function of the device.

参数
idPeripheral device ID.
opsops Peripheral device operation methods.
返回
Success or not, for details, refer to lpm_ret_t.

◆ lpm_dev_power_on()

int lpm_dev_power_on ( lpm_dev_id_t  id,
bool  on 
)

Power on or power off the peripheral device.

参数
idPeripheral device ID.
onPower on or Power off.
返回
Success or not, for details, refer to lpm_ret_t.

◆ lpm_dev_set_div_num()

int lpm_dev_set_div_num ( lpm_dev_id_t  id,
int  clk_div 
)

Set the divider number of the peripheral device clock.

参数
idPeripheral device ID.
clk_divDivider number to be configured.
返回
Success or not, for details, refer to lpm_ret_t.

◆ lpm_dev_set_freq()

int lpm_dev_set_freq ( lpm_dev_id_t  id,
int  freq 
)

Set the clock frequency of the peripheral device.

参数
idPeripheral device ID.
freqFrequency to be configured.
返回
Success or not, for details, refer to lpm_ret_t.

◆ lpm_dev_set_voltage()

int lpm_dev_set_voltage ( lpm_dev_id_t  id,
int  vset 
)

Config the peripheral device voltage.

参数
idPeripheral device ID.
vsetVoltage to be configured.
返回
Success or not, for details, refer to lpm_ret_t.

◆ lpm_dev_sub_bus_clken()

int lpm_dev_sub_bus_clken ( lpm_dev_id_t  id,
int  bus,
bool  on 
)

Enables or disables the clock of a subdevice.

参数
idPeripheral device ID.
busSub device bus number.
onEnable or disable.
返回
Success or not, for details, refer to lpm_ret_t.

◆ lpm_display_clocks_init()

void lpm_display_clocks_init ( void  )

Clock initialization configuration of the display module.

◆ lpm_display_clocks_init_register_callback()

void lpm_display_clocks_init_register_callback ( lpm_clock_init_callback  callback)

Registering the callback function for clock initialization configuration of the display module.

参数
callbackCallback function.