Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
embeddedOut.h
Go to the documentation of this file.
1// Copyright 2015 <>< Charles Lohr under the ColorChord License.
2
3#ifndef _EMBEDDED_OUT_H
4#define _EMBEDDED_OUT_H
5
6#include "hdw-led.h"
7#include "embeddedNf.h"
8
9// Controls brightness
10#ifndef NOTE_FINAL_AMP
11 #define NOTE_FINAL_AMP 12 // Number from 0...255
12#endif
13
14// Controls, basically, the minimum size of the splotches.
15#ifndef NERF_NOTE_PORP
16 #define NERF_NOTE_PORP 15 // value from 0 to 255
17#endif
18
19#ifndef USE_CONFIG_NUM_LEDS
20 #define USE_CONFIG_NUM_LEDS CONFIG_NUM_LEDS
21#endif
22
23#ifndef LIN_WRAPAROUND
24 // Whether the output lights wrap around.
25 //(Can't easily run on embedded systems)
26 #define LIN_WRAPAROUND 0
27#endif
28
29#ifndef SORT_NOTES
30 #define SORT_NOTES 0 // Whether the notes will be sorted. BUGGY Don't use.
31#endif
32
33typedef struct
34{
35 uint8_t ledOut[CONFIG_NUM_LEDS * 3];
36
37 uint16_t ledSpin;
38 uint16_t ledAmpOut[CONFIG_NUM_LEDS];
39 uint8_t ledFreqOut[CONFIG_NUM_LEDS];
40 uint8_t ledFreqOutOld[CONFIG_NUM_LEDS];
41
42 uint8_t RootNoteOffset; // Set to define what the root note is. 0 = A.
44
45// For doing the nice linear strip LED updates
47
48// For making all the LEDs the same and quickest. Good for solo instruments?
50
51uint32_t ECCtoHEX(uint8_t note, uint8_t sat, uint8_t val);
52
53#endif
Definition embeddedNf.h:91
void UpdateAllSameLEDs(embeddedOut_data *eod, embeddedNf_data *end)
TODO.
Definition embeddedOut.c:267
uint8_t RootNoteOffset
Definition embeddedOut.h:42
uint32_t ECCtoHEX(uint8_t note, uint8_t sat, uint8_t val)
TODO.
Definition embeddedOut.c:309
void UpdateLinearLEDs(embeddedOut_data *eod, embeddedNf_data *end)
TODO.
Definition embeddedOut.c:20
uint16_t ledSpin
Definition embeddedOut.h:37
Definition embeddedOut.h:34