Skip to content

Commit

Permalink
add:luat_pwm增添参数
Browse files Browse the repository at this point in the history
  • Loading branch information
doudouladou committed Oct 31, 2023
1 parent 8718947 commit 24768b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion luat/include/luat_pwm.h
Expand Up @@ -6,13 +6,15 @@

typedef struct luat_pwm_conf {
int channel;
int stop_level;
size_t period;
size_t pulse;
size_t pnum;
size_t precision;
uint8_t reverse;
} luat_pwm_conf_t;

int luat_pwm_open(int channel, size_t period, size_t pulse, int pnum);
int luat_pwm_open(int channel, size_t period, size_t pulse, int pnum, uint8_t reverse, int stop_level);
int luat_pwm_setup(luat_pwm_conf_t* conf);
int luat_pwm_capture(int channel,int freq);
int luat_pwm_close(int channel);
Expand Down
2 changes: 1 addition & 1 deletion luat/weak/luat_pwm_weak.c
Expand Up @@ -3,5 +3,5 @@
#include "luat_pwm.h"

LUAT_WEAK int luat_pwm_setup(luat_pwm_conf_t* conf) {
return luat_pwm_open(conf->channel, conf->period, conf->pulse, conf->pnum);
return luat_pwm_open(conf->channel, conf->period, conf->pulse, conf->pnum, conf->reverse, conf->stop_level);
}

0 comments on commit 24768b1

Please sign in to comment.