Led strip handling moved to a separate class
This commit is contained in:
parent
a7a7443d0a
commit
e7fdc831a4
10 changed files with 195 additions and 493 deletions
12
Src/main.c
12
Src/main.c
|
@ -26,8 +26,6 @@
|
|||
/* Private includes ----------------------------------------------------------*/
|
||||
/* USER CODE BEGIN Includes */
|
||||
#include <string.h>
|
||||
#include "App/Pixel.h"
|
||||
#include "App/LedBuffers.h"
|
||||
|
||||
/* USER CODE END Includes */
|
||||
|
||||
|
@ -49,6 +47,7 @@
|
|||
|
||||
/* USER CODE BEGIN PV */
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
volatile uint32_t g_tick = 0;
|
||||
|
||||
/* USER CODE END PV */
|
||||
|
||||
|
@ -61,6 +60,11 @@ void App();
|
|||
|
||||
/* Private user code ---------------------------------------------------------*/
|
||||
/* USER CODE BEGIN 0 */
|
||||
void DoNothing()
|
||||
{
|
||||
static volatile uint32_t cntr = 0;
|
||||
++ cntr;
|
||||
}
|
||||
|
||||
/* USER CODE END 0 */
|
||||
|
||||
|
@ -106,12 +110,14 @@ int main(void)
|
|||
MX_SPI1_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
|
||||
LL_SYSTICK_EnableIT();
|
||||
|
||||
/* USER CODE END 2 */
|
||||
|
||||
/* Infinite loop */
|
||||
/* USER CODE BEGIN WHILE */
|
||||
while(1) {
|
||||
App();
|
||||
App();
|
||||
/* USER CODE END WHILE */
|
||||
|
||||
/* USER CODE BEGIN 3 */
|
||||
|
|
|
@ -184,7 +184,7 @@ void PendSV_Handler(void)
|
|||
void SysTick_Handler(void)
|
||||
{
|
||||
/* USER CODE BEGIN SysTick_IRQn 0 */
|
||||
HandleSystick();
|
||||
++g_tick;
|
||||
/* USER CODE END SysTick_IRQn 0 */
|
||||
|
||||
/* USER CODE BEGIN SysTick_IRQn 1 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue