fix capture bug
This commit is contained in:
parent
709c257a43
commit
400d06e9ec
@ -871,7 +871,7 @@ static int stm32_cap_setchannel(FAR struct stm32_cap_dev_s *dev, uint8_t channel
|
||||
}
|
||||
|
||||
|
||||
static int stm32_cap_getcapture(FAR struct stm32_cap_dev_s *dev, uint8_t channel)
|
||||
static uint32_t stm32_cap_getcapture(FAR struct stm32_cap_dev_s *dev, uint8_t channel)
|
||||
{
|
||||
const struct stm32_cap_priv_s *priv = (const struct stm32_cap_priv_s *)dev;
|
||||
uint32_t offset;
|
||||
@ -881,6 +881,7 @@ static int stm32_cap_getcapture(FAR struct stm32_cap_dev_s *dev, uint8_t channel
|
||||
{
|
||||
case STM32_CAP_CHANNEL_COUNTER:
|
||||
offset = STM32_GTIM_CNT_OFFSET;
|
||||
break;
|
||||
#ifdef HAVE_CH1IN
|
||||
case 1:
|
||||
offset = STM32_GTIM_CCR1_OFFSET;
|
||||
|
@ -173,7 +173,7 @@ struct stm32_cap_ops_s
|
||||
{
|
||||
int (*setclock)( FAR struct stm32_cap_dev_s *dev, stm32_cap_clk_t clk, uint32_t prescaler, uint32_t max);
|
||||
int (*setchannel)(FAR struct stm32_cap_dev_s *dev, uint8_t channel, stm32_cap_ch_cfg_t cfg);
|
||||
int (*getcapture)(FAR struct stm32_cap_dev_s *dev, uint8_t channel);
|
||||
uint32_t (*getcapture)(FAR struct stm32_cap_dev_s *dev, uint8_t channel);
|
||||
int (*setisr)( FAR struct stm32_cap_dev_s *dev, xcpt_t handler);
|
||||
void (*enableint)( FAR struct stm32_cap_dev_s *dev, stm32_cap_flags_t src, bool on );
|
||||
void (*ackflags)( FAR struct stm32_cap_dev_s *dev, int flags);
|
||||
|
Loading…
Reference in New Issue
Block a user