migrate code to AS7, including fucked up arduino import
arduino as a library will not build with -flto. I can't figure it out. so we waste some space compared to what platformio was building. oh well. there's still over 1K of space left for programs.
This commit is contained in:
37
fw/HackSpaceCon_AS7/HSC_Wand/rgbled.h
Normal file
37
fw/HackSpaceCon_AS7/HSC_Wand/rgbled.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
hackspacecon wand firmware
|
||||
|
||||
rgb led control and programs
|
||||
*/
|
||||
|
||||
#ifndef __RGBLED_H__
|
||||
#define __RGBLED_H__
|
||||
|
||||
|
||||
|
||||
#include <tinyNeoPixel_Static.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
|
||||
#define RGB_COUNT 5
|
||||
#define PROG_COUNT 2
|
||||
|
||||
|
||||
|
||||
#define enable_rgb_timer() {TCB0.CNT = 0; TCB0.CTRLA |= 1;};
|
||||
#define disable_rgb_timer() {TCB0.CTRLA &= ~1;};
|
||||
|
||||
|
||||
|
||||
extern tinyNeoPixel rgb;
|
||||
|
||||
extern uint8_t rgbled[3 * RGB_COUNT];
|
||||
extern uint8_t (*rgb_program[PROG_COUNT])(uint8_t);
|
||||
|
||||
|
||||
|
||||
void conf_rgb_timer();
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user