git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6654 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
6d6546dac1
commit
6cb1afbda0
|
@ -140,8 +140,10 @@ typedef void (*icucallback_t)(ICUDriver *icup);
|
|||
* @notapi
|
||||
*/
|
||||
#define _icu_isr_invoke_width_cb(icup) { \
|
||||
(icup)->state = ICU_IDLE; \
|
||||
(icup)->config->width_cb(icup); \
|
||||
if ((icup)->state != ICU_WAITING) { \
|
||||
(icup)->state = ICU_IDLE; \
|
||||
(icup)->config->width_cb(icup); \
|
||||
} \
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -604,6 +604,7 @@ void icu_lld_stop(ICUDriver *icup) {
|
|||
*/
|
||||
void icu_lld_enable(ICUDriver *icup) {
|
||||
|
||||
icup->tim->EGR |= STM32_TIM_EGR_UG;
|
||||
icup->tim->SR = 0; /* Clear pending IRQs (if any). */
|
||||
if (icup->config->channel == ICU_CHANNEL_1) {
|
||||
if (icup->config->period_cb != NULL)
|
||||
|
|
Loading…
Reference in New Issue