Commit 4fd552fc authored by Thomas Soëte's avatar Thomas Soëte
Browse files

Better timings for 160MHz too.

Values measured:
@80MHz:
	T0H: 337ns, Period: 1.274us
	T1H: 687ns, Period: 1.25us

@160MHz:
	T0H: 349ns, Period: 1.262us
	T1H: 700ns, Period: 1.276us
parent c2f12a3b
...@@ -31,8 +31,8 @@ static void ICACHE_RAM_ATTR ws2812_write(uint8_t pin, uint8_t *pixels, uint32_t ...@@ -31,8 +31,8 @@ static void ICACHE_RAM_ATTR ws2812_write(uint8_t pin, uint8_t *pixels, uint32_t
pixel = *p++; pixel = *p++;
mask = 0x80; mask = 0x80;
start_time = 0; start_time = 0;
t0h = (1000 * system_get_cpu_freq()) / 3526; // 0.35us (spec=0.35 +- 0.15) t0h = (1000 * system_get_cpu_freq()) / 3022; // 0.35us (spec=0.35 +- 0.15)
t1h = (1000 * system_get_cpu_freq()) / 1591; // 0.70us (spec=0.70 +- 0.15) t1h = (1000 * system_get_cpu_freq()) / 1477; // 0.70us (spec=0.70 +- 0.15)
ttot = (1000 * system_get_cpu_freq()) / 800; // 1.25us (MUST be >= 1.25) ttot = (1000 * system_get_cpu_freq()) / 800; // 1.25us (MUST be >= 1.25)
while (true) { while (true) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment