SPIPWM the LEDs
This commit is contained in:
24
Core/Inc/leds.h
Normal file
24
Core/Inc/leds.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef INC_LEDS_H
|
||||
#define INC_LEDS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "stm32h7xx_hal.h"
|
||||
|
||||
#define N_LEDS 9
|
||||
|
||||
#define PWM_CHANNEL_R TIM_CHANNEL_1
|
||||
#define PWM_CHANNEL_G TIM_CHANNEL_2
|
||||
#define PWM_CHANNEL_B TIM_CHANNEL_3
|
||||
|
||||
void led_init(SPI_HandleTypeDef *spi, TIM_HandleTypeDef *pwmtim);
|
||||
|
||||
void led_set(size_t idx, uint8_t r, uint8_t g, uint8_t b);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // INC_LEDS_H
|
||||
@ -54,9 +54,11 @@ void UsageFault_Handler(void);
|
||||
void DebugMon_Handler(void);
|
||||
void EXTI3_IRQHandler(void);
|
||||
void EXTI4_IRQHandler(void);
|
||||
void DMA1_Stream0_IRQHandler(void);
|
||||
void FDCAN1_IT0_IRQHandler(void);
|
||||
void FDCAN1_IT1_IRQHandler(void);
|
||||
void EXTI9_5_IRQHandler(void);
|
||||
void SPI3_IRQHandler(void);
|
||||
void TIM6_DAC_IRQHandler(void);
|
||||
void LTDC_IRQHandler(void);
|
||||
void TIM17_IRQHandler(void);
|
||||
|
||||
Reference in New Issue
Block a user