unleashed-firmware/firmware/targets/f3/api-hal/api-hal-tim.c
DrZlo13 9d8c36810e
IR RX simple app (#218)
* split falling and rising ir rx events
* fix irda
* simple irda rx function for app
* add extern timer
* fix timer num for f2
2020-11-11 10:36:27 +03:00

8 lines
No EOL
218 B
C

#include "cmsis_os.h"
#include "api-hal-tim.h"
void tim_irda_rx_init(void) {
HAL_NVIC_SetPriority(TIM2_IRQn, 5, 0);
HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_1);
HAL_TIM_IC_Start_IT(&htim2, TIM_CHANNEL_2);
}