Skip to content

Commit

Permalink
软件PWM 模块添加修改CCR接口;
Browse files Browse the repository at this point in the history
使用手册添加软件PWM 说明;
  • Loading branch information
chenhaimeng committed Dec 1, 2021
1 parent 456af26 commit 16eacf4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bos/modules/b_mod_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,16 @@ int bSoftPwmSetPeriod(bSoftPwmInstance_t *pPwmInstance, uint32_t ms)
return 0;
}

int bSoftPwmSetCcr(bSoftPwmInstance_t *pPwmInstance, uint32_t ms)
{
if (pPwmInstance == NULL)
{
return -1;
}
pPwmInstance->ccr = ms;
return 0;
}

/**
* \}
*/
Expand Down
1 change: 1 addition & 0 deletions bos/modules/inc/b_mod_pwm.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ int bSoftPwmStart(bSoftPwmInstance_t *pPwmInstance, pPwmHandler handler1, pPwmHa
int bSoftPwmStop(bSoftPwmInstance_t *pPwmInstance);
int bSoftPwmReset(bSoftPwmInstance_t *pPwmInstance);
int bSoftPwmSetPeriod(bSoftPwmInstance_t *pPwmInstance, uint32_t ms);
int bSoftPwmSetCcr(bSoftPwmInstance_t *pPwmInstance, uint32_t ms);
/**
* \}
*/
Expand Down
Binary file modified doc/BabyOS设计和使用手册.doc
Binary file not shown.
Binary file modified doc/BabyOS设计和使用手册.pdf
Binary file not shown.

0 comments on commit 16eacf4

Please sign in to comment.