STM32CubeIDE conversion

This commit is contained in:
Attila Body 2020-11-26 00:39:02 +01:00
parent 48883e6e3d
commit 6db62d5607
89 changed files with 54760 additions and 43267 deletions

View file

@ -19,6 +19,7 @@
#include "Sparkle.h"
Sparkle g_s[NUMSPARKLES];
volatile uint8_t g_done = 0;
void convert(uint8_t *src, uint8_t *dst, uint16_t size)
{
@ -26,11 +27,10 @@ void convert(uint8_t *src, uint8_t *dst, uint16_t size)
while(size--) {
uint8_t byte=*src++;
uint8_t duo = 3;
do {
uint8_t mask = 3 << (duo<<1);
*dst++ = bits[(byte & (mask))>>(duo<<1)];
} while(duo--);
for(int8_t shift = 6; shift >= 0; shift -= 2) {
uint8_t mask = 3 << shift;
*dst++ = bits[ (byte & mask) >> shift ];
}
}
}

View file

@ -11,16 +11,7 @@
#include "Config.h"
#include "Pixel.h"
#ifdef __cplusplus
extern "C" {
#endif
extern Pixel_t g_pixels[NUMPIXELS];
uint8_t g_ledBits[sizeof(g_pixels) * 8 / 2 + 1];
#ifdef __cplusplus
}
#endif
extern uint8_t g_ledBits[sizeof(g_pixels) * 8 / 2 + 1];
#endif /* LEDBUFFERS_H_ */