/drivers/hdf_core/framework/support/platform/src/pwm/ |
D | pwm_core.c | 15 int32_t PwmDeviceGet(struct PwmDev *pwm) in PwmDeviceGet() argument 19 if (pwm == NULL) { in PwmDeviceGet() 24 (void)OsalSpinLock(&(pwm->lock)); in PwmDeviceGet() 25 if (pwm->busy) { in PwmDeviceGet() 26 (void)OsalSpinUnlock(&(pwm->lock)); in PwmDeviceGet() 27 HDF_LOGE("PwmDeviceGet: pwm%u is busy!", pwm->num); in PwmDeviceGet() 30 if (pwm->method != NULL && pwm->method->open != NULL) { in PwmDeviceGet() 31 ret = pwm->method->open(pwm); in PwmDeviceGet() 33 (void)OsalSpinUnlock(&(pwm->lock)); in PwmDeviceGet() 39 pwm->busy = true; in PwmDeviceGet() [all …]
|
D | pwm_if.c | 21 void *pwm = NULL; in PwmGetDevByNum() local 33 pwm = (void *)DevSvcManagerClntGetService(name); in PwmGetDevByNum() 34 if (pwm == NULL) { in PwmGetDevByNum() 40 return pwm; in PwmGetDevByNum() 46 void *pwm = PwmGetDevByNum(num); in PwmOpen() local 48 if (pwm == NULL) { in PwmOpen() 53 ret = PwmDeviceGet((struct PwmDev *)pwm); in PwmOpen() 58 return (DevHandle)pwm; in PwmOpen() 192 struct PwmDev *pwm = NULL; in PwmGetConfig() local 202 pwm = (struct PwmDev *)handle; in PwmGetConfig() [all …]
|
D | pwm_if_u.c | 21 void *pwm = NULL; in PwmGetDevByNum() local 29 pwm = (void *)HdfIoServiceBind(name); in PwmGetDevByNum() 30 if (pwm == NULL) { in PwmGetDevByNum() 35 return pwm; in PwmGetDevByNum() 51 void *pwm = PwmGetDevByNum(num); in PwmOpen() local 53 if (pwm == NULL) { in PwmOpen() 58 struct HdfIoService *service = (struct HdfIoService *)pwm; in PwmOpen() 61 PwmPutObjByPointer(pwm); in PwmOpen() 68 PwmPutObjByPointer(pwm); in PwmOpen() 72 return (DevHandle)pwm; in PwmOpen()
|
/drivers/hdf_core/adapter/khdf/linux/platform/pwm/ |
D | pwm_adapter.c | 27 static int32_t HdfPwmOpen(struct PwmDev *pwm) in HdfPwmOpen() argument 31 if (pwm == NULL) { in HdfPwmOpen() 35 device = pwm_request(pwm->num, NULL); in HdfPwmOpen() 37 HDF_LOGE("HdfPwmOpen: pwm_request pwm%d fail!", pwm->num); in HdfPwmOpen() 40 pwm->cfg.period = device->state.period; in HdfPwmOpen() 41 pwm->cfg.duty = device->state.duty_cycle; in HdfPwmOpen() 42 pwm->cfg.polarity = device->state.polarity; in HdfPwmOpen() 43 pwm->cfg.status = device->state.enabled ? PWM_ENABLE_STATUS : PWM_DISABLE_STATUS; in HdfPwmOpen() 44 pwm->priv = device; in HdfPwmOpen() 48 static int32_t HdfPwmClose(struct PwmDev *pwm) in HdfPwmClose() argument [all …]
|
D | pwm_hi35xx_linux.c | 39 static int Hi35xxPwmApply(struct pwm_chip *chip, struct pwm_device *pwm, const struct pwm_state *st… in Hi35xxPwmApply() argument 41 static int Hi35xxPwmApply(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state) in Hi35xxPwmApply() 47 if (hi35xxChip == NULL || pwm == NULL || state == NULL) { in Hi35xxPwmApply() 69 if (pwm->state.polarity != state->polarity) { in Hi35xxPwmApply() 71 …HDF_LOGI("Hi35xxPwmApply: [HiPwmSetPolarity] done, polarity: %u -> %u!", pwm->state.polarity, stat… in Hi35xxPwmApply() 73 if (pwm->state.period != state->period) { in Hi35xxPwmApply() 75 …HDF_LOGI("Hi35xxPwmApply: [HiPwmSetPeriod] done, period: %llu -> %llu!", pwm->state.period, state-… in Hi35xxPwmApply() 77 if (pwm->state.duty_cycle != state->duty_cycle) { in Hi35xxPwmApply() 79 …HDF_LOGI("Hi35xxPwmApply: [HiPwmSetDuty] done, duty: %llu -> %llu!", pwm->state.duty_cycle, state-… in Hi35xxPwmApply() 93 static void Hi35xxGetState(struct pwm_chip *chip, struct pwm_device *pwm, struct pwm_state *state) in Hi35xxGetState() argument [all …]
|
D | Makefile | 16 obj-$(CONFIG_DRIVERS_HDF_PLATFORM_PWM) += $(HDF_PLATFORM_FRAMEWORKS_ROOT)/src/pwm/pwm_core.o \ 17 $(HDF_PLATFORM_FRAMEWORKS_ROOT)/src/pwm/pwm_if.o \
|
/drivers/hdf_core/framework/support/platform/include/pwm/ |
D | pwm_core.h | 27 int32_t (*setConfig)(struct PwmDev *pwm, struct PwmConfig *config); 28 int32_t (*open)(struct PwmDev *pwm); 29 int32_t (*close)(struct PwmDev *pwm); 43 int32_t PwmDeviceGet(struct PwmDev *pwm); 44 int32_t PwmDevicePut(struct PwmDev *pwm); 45 int32_t PwmDeviceSetConfig(struct PwmDev *pwm, struct PwmConfig *config); 46 int32_t PwmDeviceGetConfig(struct PwmDev *pwm, struct PwmConfig *config); 47 void *PwmGetPriv(const struct PwmDev *pwm); 48 int32_t PwmSetPriv(struct PwmDev *pwm, void *priv); 49 int32_t PwmDeviceAdd(struct HdfDeviceObject *obj, struct PwmDev *pwm); [all …]
|
/drivers/hdf_core/framework/test/unittest/platform/virtual/ |
D | pwm_virtual.c | 26 int32_t VirtualPwmDeviceGet(struct PwmDev *pwm) in VirtualPwmDeviceGet() argument 28 if (pwm == NULL) { in VirtualPwmDeviceGet() 35 int32_t VirtualPwmDevicePut(struct PwmDev *pwm) in VirtualPwmDevicePut() argument 37 if (pwm == NULL) { in VirtualPwmDevicePut() 45 int32_t VirtualPwmSetConfig(struct PwmDev *pwm, struct PwmConfig *config) in VirtualPwmSetConfig() argument 47 if (pwm == NULL || config == NULL) { in VirtualPwmSetConfig() 64 pwm->cfg = *config; in VirtualPwmSetConfig()
|
/drivers/hdf_core/adapter/platform/pwm/ |
D | pwm_bes.c | 49 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config); 50 static int32_t PwmDevOpen(struct PwmDev *pwm); 51 static int32_t PwmDevClose(struct PwmDev *pwm); 278 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config) argument 284 if (pwm == NULL || config == NULL || (config->period > UNTIL_NAN0SECONDS)) { 289 prvPwm = (struct PwmDevice *)PwmGetPriv(pwm); 310 static int32_t PwmDevOpen(struct PwmDev *pwm) argument 312 if (pwm == NULL) { 320 static int32_t PwmDevClose(struct PwmDev *pwm) argument 325 if (pwm == NULL) { [all …]
|
D | pwm_stm32f4xx.c | 137 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config); 138 static int32_t PwmDevOpen(struct PwmDev *pwm); 139 static int32_t PwmDevClose(struct PwmDev *pwm); 514 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config) argument 522 if (pwm == NULL || config == NULL || (config->period > PER_SEC_NSEC)) { 527 prvPwm = (struct PwmDevice *)PwmGetPriv(pwm); 560 static int32_t PwmDevOpen(struct PwmDev *pwm) argument 562 if (pwm == NULL) { 570 static int32_t PwmDevClose(struct PwmDev *pwm) argument 575 if (pwm == NULL) { [all …]
|
D | pwm_wm.c | 29 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config); 35 static int32_t PwmDevSetConfig(struct PwmDev *pwm, struct PwmConfig *config) in PwmDevSetConfig() argument 41 if (pwm == NULL || config == NULL) { in PwmDevSetConfig() 46 prvPwm = (struct PwmDevice *)PwmGetPriv(pwm); in PwmDevSetConfig()
|
/drivers/hdf_core/adapter/khdf/linux/ |
D | README_zh.md | 36 │ ├── pwm #pwm接口
|
D | README.md | 36 │ ├── pwm # PWM APIs
|
/drivers/hdf_core/adapter/khdf/linux/platform/ |
D | Makefile | 21 obj-$(CONFIG_DRIVERS_HDF_PLATFORM_PWM) += pwm/
|
D | Kconfig | 51 bool "Enable HDF platform pwm driver" 54 Answer Y to enable HDF platform pwm driver. 98 bool "hi35xx pwm driver" 101 Answer Y to enable hi35xx pwm driver
|
D | platform.mk | 27 -I$(srctree)/drivers/hdf/framework/support/platform/include/pwm \
|
/drivers/hdf_core/adapter/platform/ |
D | BUILD.gn | 15 "pwm",
|
/drivers/hdf_core/adapter/khdf/uniproton/platform/ |
D | BUILD.gn | 68 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_core.c", 69 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_if.c", 137 include_dirs += [ "$HDF_FRAMEWORKS_PATH/support/platform/include/pwm" ]
|
/drivers/hdf_core/adapter/uhdf/platform/ |
D | BUILD.gn | 37 "$hdf_framework_path/support/platform/include/pwm", 66 "$hdf_framework_path/support/platform/src/pwm/pwm_if_u.c",
|
/drivers/hdf_core/adapter/khdf/liteos_m/platform/ |
D | BUILD.gn | 70 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_core.c", 71 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_if.c", 139 include_dirs += [ "$HDF_FRAMEWORKS_PATH/support/platform/include/pwm" ]
|
/drivers/hdf_core/framework/model/display/driver/lcdkit/ |
D | lite_lcdkit.c | 66 panelCfg->pwmHandle = PwmOpen(panelCfg->info.pwm.dev); in LcdkitInit() 207 duty = (level * panelCfg->info.pwm.period) / panelCfg->info.blk.maxLevel; in SetBacklightByPwm()
|
/drivers/hdf_core/framework/model/display/driver/ |
D | hdf_disp.h | 90 struct PwmCfg pwm; member
|
/drivers/hdf_core/adapter/uhdf2/platform/ |
D | BUILD.gn | 42 "$HDF_FRAMEWORKS/support/platform/src/pwm/pwm_if_u.c",
|
/drivers/hdf_core/adapter/khdf/liteos/platform/ |
D | BUILD.gn | 128 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_core.c", 129 "$HDF_FRAMEWORKS_PATH/support/platform/src/pwm/pwm_if.c", 253 "$HDF_FRAMEWORKS_PATH/support/platform/include/pwm",
|
D | Makefile | 105 LOCAL_SRCS += $(HDF_FRAMEWORKS)/support/platform/src/pwm/pwm_if.c \ 106 $(HDF_FRAMEWORKS)/support/platform/src/pwm/pwm_core.c
|