Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
7ef1711e
Commit
7ef1711e
authored
Nov 11, 2015
by
Johny Mattsson
Browse files
Merge pull request #740 from Alkorin/ws2812
Better timings for WS2812 (measured 345ns/695ns, instead of 340ns/600ns)
parents
63fad194
4fd552fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/ws2812.c
View file @
7ef1711e
...
...
@@ -31,8 +31,8 @@ static void ICACHE_RAM_ATTR ws2812_write(uint8_t pin, uint8_t *pixels, uint32_t
pixel
=
*
p
++
;
mask
=
0x80
;
start_time
=
0
;
t0h
=
(
1000
*
system_get_cpu_freq
())
/
3
333
;
// 0.3
0
us (spec=0.35 +- 0.15)
t1h
=
(
1000
*
system_get_cpu_freq
())
/
1
666
;
// 0.
6
0us (spec=0.70 +- 0.15)
t0h
=
(
1000
*
system_get_cpu_freq
())
/
3
022
;
// 0.3
5
us (spec=0.35 +- 0.15)
t1h
=
(
1000
*
system_get_cpu_freq
())
/
1
477
;
// 0.
7
0us (spec=0.70 +- 0.15)
ttot
=
(
1000
*
system_get_cpu_freq
())
/
800
;
// 1.25us (MUST be >= 1.25)
while
(
true
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment