Finally! 1st LED ok (h/w # must match!)
parent
abf378b94a
commit
6dd830daa5
|
@ -69,7 +69,7 @@ static void boot_sequence(void)
|
|||
}
|
||||
|
||||
//------------------- Illumination demo --------------------------------
|
||||
extern void busy_wait(unsigned int ms);
|
||||
extern void busy_wait(unsigned int ms); // Worx!
|
||||
#define MAXTABLES 3 // 1..16 MUST match h/w!
|
||||
#define MAXLEDS 27 // 1..256 MUST match h/w!
|
||||
static int32_t arLEDBuffer[MAXTABLES][MAXLEDS]; // GRB values
|
||||
|
|
|
@ -333,8 +333,8 @@ class BaseSoC(SoCCore):
|
|||
|
||||
platform.add_extension(_gpios) # General LED outputs
|
||||
|
||||
max_TABLES = 16 # 1..16
|
||||
max_LEDS_per_chain = 32 # 1..256
|
||||
max_TABLES = 3 # 1..16
|
||||
max_LEDS_per_chain = 27 # 1..256
|
||||
self.submodules.npe = NeoPixelEngine(n_TABLES=max_TABLES, n_LEDs=max_LEDS_per_chain)
|
||||
self.add_csr("npe")
|
||||
for i in range(42,56+2): # Do output on J4 (14) & J5 (2)
|
||||
|
|
|
@ -237,7 +237,7 @@ class NeoPixelEngine(Module, AutoCSR, AutoDoc, ModuleDoc):
|
|||
)
|
||||
|
||||
fsm.act("NEXTTABLE",
|
||||
If(self.b4Table < 16,
|
||||
If(self.b4Table < n_TABLES,
|
||||
NextValue(self.b8Offset, 0), # Start @ 1st 24-bit data
|
||||
NextState("IDLE1")
|
||||
).Else(
|
||||
|
|
Loading…
Reference in New Issue