IR transmit example (#180)

* DWT-based microsecond delay

* simple ir app (work only with NEC protocol and predefined address - command)

* remove space from file name, add delay_us_init_DWT header

* float-based delay us

* init tim2 by CubeMX

* fix simple pwm functions

* simple pwm timer based ir nec protocol

* ir gui test app

Co-authored-by: aanper <mail@s3f.ru>
This commit is contained in:
DrZlo13
2020-10-23 12:39:11 +03:00
committed by GitHub
parent 7205fa7ed7
commit 37fc47a24f
14 changed files with 531 additions and 55 deletions

View File

@@ -35,10 +35,11 @@ static inline bool app_gpio_read(GpioPin gpio) {
return false;
}
void delay_us(uint32_t time);
void delay_us_init_DWT(void);
void delay_us(float time);
void pwm_set(float value, float freq, TIM_HandleTypeDef* tim, uint32_t channel);
void pwm_stop(TIM_HandleTypeDef* tim, uint32_t channel);
extern TIM_HandleTypeDef htim8;

View File

@@ -30,6 +30,7 @@
/* USER CODE END Includes */
extern TIM_HandleTypeDef htim2;
extern TIM_HandleTypeDef htim5;
extern TIM_HandleTypeDef htim8;
extern TIM_HandleTypeDef htim15;
@@ -38,6 +39,7 @@ extern TIM_HandleTypeDef htim15;
/* USER CODE END Private defines */
void MX_TIM2_Init(void);
void MX_TIM5_Init(void);
void MX_TIM8_Init(void);
void MX_TIM15_Init(void);