Minor cleanup

This commit is contained in:
Attila BODY 2018-12-17 09:37:38 +01:00
parent 7abafe7c8c
commit d1caa51a89
9 changed files with 174 additions and 187 deletions

View file

@ -13,11 +13,11 @@
#include <string.h>
#include <stdlib.h>
#include "Config.h"
#include "Pixel.h"
#include "LedBuffers.h"
#include "Sparkle.h"
#define NUMSPARKLES 10
Sparkle g_s[NUMSPARKLES];
void convert(uint8_t *src, uint8_t *dst, uint16_t size)
@ -75,7 +75,10 @@ extern "C" void App()
}
convert((uint8_t*)g_pixels, g_ledBits, sizeof(g_pixels));
g_done = false;
GPIOC->BSRR = 1 << (13+16);
HAL_SPI_Transmit_DMA(&hspi1, g_ledBits, sizeof(g_ledBits));
GPIOC->BSRR = 1 << 13;
while(!g_done);
HAL_Delay(5);
}

14
App/Config.h Normal file
View file

@ -0,0 +1,14 @@
/*
* Config.h
*
* Created on: Dec 17, 2018
* Author: abody
*/
#ifndef CONFIG_H_
#define CONFIG_H_
#define NUMPIXELS 300
#define NUMSPARKLES 25
#endif /* CONFIG_H_ */

View file

@ -8,9 +8,9 @@
#ifndef LEDBUFFERS_H_
#define LEDBUFFERS_H_
#include "Config.h"
#include "Pixel.h"
#define NUMPIXELS 144
#ifdef __cplusplus
extern "C" {