Swadge ESP32-S2
APIs to develop for the Magfest Swadge
Toggle main menu visibility
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
33
typedef
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.
43
}
embeddedOut_data
;
44
45
// For doing the nice linear strip LED updates
46
void
UpdateLinearLEDs
(
embeddedOut_data
* eod,
embeddedNf_data
* end);
47
48
// For making all the LEDs the same and quickest. Good for solo instruments?
49
void
UpdateAllSameLEDs
(
embeddedOut_data
* eod,
embeddedNf_data
* end);
50
51
uint32_t
ECCtoHEX
(uint8_t note, uint8_t sat, uint8_t val);
52
53
#endif
embeddedNf.h
embeddedNf_data
Definition
embeddedNf.h:91
UpdateAllSameLEDs
void UpdateAllSameLEDs(embeddedOut_data *eod, embeddedNf_data *end)
TODO.
Definition
embeddedOut.c:267
embeddedOut_data::RootNoteOffset
uint8_t RootNoteOffset
Definition
embeddedOut.h:42
embeddedOut_data::ledFreqOut
uint8_t ledFreqOut[CONFIG_NUM_LEDS]
Definition
embeddedOut.h:39
embeddedOut_data::ledFreqOutOld
uint8_t ledFreqOutOld[CONFIG_NUM_LEDS]
Definition
embeddedOut.h:40
embeddedOut_data::ledAmpOut
uint16_t ledAmpOut[CONFIG_NUM_LEDS]
Definition
embeddedOut.h:38
embeddedOut_data::ledOut
uint8_t ledOut[CONFIG_NUM_LEDS *3]
Definition
embeddedOut.h:35
ECCtoHEX
uint32_t ECCtoHEX(uint8_t note, uint8_t sat, uint8_t val)
TODO.
Definition
embeddedOut.c:309
UpdateLinearLEDs
void UpdateLinearLEDs(embeddedOut_data *eod, embeddedNf_data *end)
TODO.
Definition
embeddedOut.c:20
embeddedOut_data::ledSpin
uint16_t ledSpin
Definition
embeddedOut.h:37
embeddedOut_data
Definition
embeddedOut.h:34
hdw-led.h
main
utils
colorchord
embeddedOut.h
Generated by
1.17.0