You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.4 KiB

/*
* Copyright (c) Hisilicon Technologies Co., Ltd.. 2021-2021. All rights reserved.
* Description: pwm pm
* Author:
* Create: 2021-05-12
* Note:
*/
/********************************************************************************************/
/* Includes */
/********************************************************************************************/
#include "pwm_pm.h"
/********************************************************************************************/
/* Defines */
/********************************************************************************************/
#define PWM_MAX_NUM 4
/********************************************************************************************/
/* Structure */
/********************************************************************************************/
typedef struct ext_pwm_state {
td_handle pwm_handle[PWM_MAX_NUM];
} pwm_state;
/********************************************************************************************/
/* Globals */
/********************************************************************************************/
static pwm_state g_pwm_state;
/********************************************************************************************
Function Implementation
********************************************************************************************/
static td_s32 pwm_suspend(td_void *private_data)
{
return TD_SUCCESS;
}
static td_s32 pwm_resume_early(td_void *private_data)
{
return TD_SUCCESS;
}
static td_s32 pwm_resume(td_void *private_data)
{
return TD_SUCCESS;
}
static td_s32 pwm_lowpower_enter(td_void *private_data)
{
return TD_SUCCESS;
}
static td_s32 pwm_lowpower_exit(td_void *private_data)
{
return TD_SUCCESS;
}
static osal_pmops g_pwm_pmops = {
.pm_suspend = pwm_suspend,
.pm_resume_early = pwm_resume_early,
.pm_resume = pwm_resume,
.pm_lowpower_enter = pwm_lowpower_enter,
.pm_lowpower_exit = pwm_lowpower_exit,
.pm_poweroff = TD_NULL, /* shutdown */
.private_data = &g_pwm_state,
};
osal_pmops* pwm_pm_get_instance(td_void)
{
return &g_pwm_pmops;
}