Minor cleanup
This commit is contained in:
parent
7abafe7c8c
commit
d1caa51a89
9 changed files with 174 additions and 187 deletions
|
@ -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
14
App/Config.h
Normal 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_ */
|
|
@ -8,9 +8,9 @@
|
|||
#ifndef LEDBUFFERS_H_
|
||||
#define LEDBUFFERS_H_
|
||||
|
||||
#include "Config.h"
|
||||
#include "Pixel.h"
|
||||
|
||||
#define NUMPIXELS 144
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue