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
This commit is contained in:
@@ -43,9 +43,9 @@ void hal_pwmn_stop(TIM_HandleTypeDef* tim, uint32_t channel) {
|
||||
}
|
||||
|
||||
void irda_pwm_set(float value, float freq){
|
||||
hal_pwm_set(value, freq, &IRDA_TIM, IRDA_CH);
|
||||
hal_pwm_set(value, freq, &IRDA_TX_TIM, IRDA_TX_CH);
|
||||
}
|
||||
|
||||
void irda_pwm_stop(){
|
||||
hal_pwm_stop(&IRDA_TIM, IRDA_CH);
|
||||
hal_pwm_stop(&IRDA_TX_TIM, IRDA_TX_CH);
|
||||
}
|
5
firmware/targets/f2/api-hal/api-hal-tim.c
Normal file
5
firmware/targets/f2/api-hal/api-hal-tim.c
Normal file
@@ -0,0 +1,5 @@
|
||||
#include "cmsis_os.h"
|
||||
#include "api-hal-tim.h"
|
||||
|
||||
void tim_irda_rx_init(void) {
|
||||
}
|
4
firmware/targets/f2/api-hal/api-hal-tim.h
Normal file
4
firmware/targets/f2/api-hal/api-hal-tim.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
#include "main.h"
|
||||
|
||||
void tim_irda_rx_init(void);
|
@@ -4,3 +4,4 @@
|
||||
#include "api-hal-delay.h"
|
||||
#include "api-hal-pwm.h"
|
||||
#include "api-hal-task.h"
|
||||
#include "api-hal-tim.h"
|
||||
|
Reference in New Issue
Block a user