corrections (#769)

This commit is contained in:
Michael Miller
2024-02-16 11:08:37 -08:00
committed by GitHub
parent 3119b8a7df
commit 35910a2376
4 changed files with 10 additions and 8 deletions

View File

@@ -249,10 +249,12 @@ struct HtmlColor
return Parse<T_HTMLCOLORNAMES>(name, MAX_HTML_COLOR_NAME_LEN + 1); return Parse<T_HTMLCOLORNAMES>(name, MAX_HTML_COLOR_NAME_LEN + 1);
} }
#if !defined(ARDUINO_AVR_DIGISPARK)
template <typename T_HTMLCOLORNAMES> size_t Parse(String const &name) template <typename T_HTMLCOLORNAMES> size_t Parse(String const &name)
{ {
return Parse<T_HTMLCOLORNAMES>(name.c_str(), name.length() + 1); return Parse<T_HTMLCOLORNAMES>(name.c_str(), name.length() + 1);
} }
#endif
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Converts this color code to its HTML4/CSS3 name // Converts this color code to its HTML4/CSS3 name

View File

@@ -223,7 +223,7 @@ public:
// rather than stalling for the latch. // rather than stalling for the latch.
while (!IsReadyToUpdate()) while (!IsReadyToUpdate())
{ {
#if !defined(ARDUINO_TEEONARDU_LEO) && !defined(ARDUINO_TEEONARDU_FLORA) #if !defined(ARDUINO_TEEONARDU_LEO) && !defined(ARDUINO_TEEONARDU_FLORA) && !defined(ARDUINO_AVR_DIGISPARK)
yield(); // allows for system yield if needed yield(); // allows for system yield if needed
#endif #endif
} }
@@ -292,7 +292,7 @@ public:
// rather than stalling for the latch. // rather than stalling for the latch.
while (!NeoAvrMethodBase<T_SPEED>::IsReadyToUpdate()) while (!NeoAvrMethodBase<T_SPEED>::IsReadyToUpdate())
{ {
#if !defined(ARDUINO_TEEONARDU_LEO) && !defined(ARDUINO_TEEONARDU_FLORA) #if !defined(ARDUINO_TEEONARDU_LEO) && !defined(ARDUINO_TEEONARDU_FLORA) && !defined(ARDUINO_AVR_DIGISPARK)
yield(); // allows for system yield if needed yield(); // allows for system yield if needed
#endif #endif
} }

View File

@@ -678,7 +678,7 @@ void send_data_16mhz_600(uint8_t* data,
bit = 8; bit = 8;
asm volatile( asm volatile(
"head40:" "\n\t" // Clk Pseudocode (T = 0) "head60:" "\n\t" // Clk Pseudocode (T = 0)
"st %a[port], %[hi]" "\n\t" // 2 PORT = hi (T = 2) "st %a[port], %[hi]" "\n\t" // 2 PORT = hi (T = 2)
"sbrc %[byte] , 7" "\n\t" // 1-2 if(b & 0b10000000) "sbrc %[byte] , 7" "\n\t" // 1-2 if(b & 0b10000000)
"mov %[next] , %[hi]" "\n\t" // 0-1 next = hi (T = 4) "mov %[next] , %[hi]" "\n\t" // 0-1 next = hi (T = 4)
@@ -689,18 +689,18 @@ void send_data_16mhz_600(uint8_t* data,
"rjmp .+0" "\n\t" // 2 nop nop (T = 13) "rjmp .+0" "\n\t" // 2 nop nop (T = 13)
"rjmp .+0" "\n\t" // 2 nop nop (T = 15) "rjmp .+0" "\n\t" // 2 nop nop (T = 15)
"dec %[bit]" "\n\t" // 1 bit-- (T = 16) "dec %[bit]" "\n\t" // 1 bit-- (T = 16)
"breq nextbyte40" "\n\t" // 1-2 if(bit == 0) "breq nextbyte60" "\n\t" // 1-2 if(bit == 0)
"st %a[port], %[lo]" "\n\t" // 2 PORT = lo (T = 18) duplicate here improves high length for non byte boundary "st %a[port], %[lo]" "\n\t" // 2 PORT = lo (T = 18) duplicate here improves high length for non byte boundary
"rol %[byte]" "\n\t" // 1 b <<= 1 (T = 21) "rol %[byte]" "\n\t" // 1 b <<= 1 (T = 21)
"nop" "\n\t" // 1 nop (T = 22) "nop" "\n\t" // 1 nop (T = 22)
"rjmp .+0" "\n\t" // 2 nop nop (T = 24) "rjmp .+0" "\n\t" // 2 nop nop (T = 24)
"rjmp head40" "\n\t" // 2 -> head40 (next bit out) "rjmp head60" "\n\t" // 2 -> head40 (next bit out)
"nextbyte40:" "\n\t" // (T = 18) "nextbyte60:" "\n\t" // (T = 18)
"st %a[port], %[lo]" "\n\t" // 2 PORT = lo (T = 20) duplicate here improves high length while reducing interbyte "st %a[port], %[lo]" "\n\t" // 2 PORT = lo (T = 20) duplicate here improves high length while reducing interbyte
"ldi %[bit] , 8" "\n\t" // 1 bit = 8 (T = 21) "ldi %[bit] , 8" "\n\t" // 1 bit = 8 (T = 21)
"ld %[byte] , %a[ptr]+" "\n\t" // 2 b = *ptr++ (T = 23) "ld %[byte] , %a[ptr]+" "\n\t" // 2 b = *ptr++ (T = 23)
"sbiw %[count], 1" "\n\t" // 2 i-- (T = 25) "sbiw %[count], 1" "\n\t" // 2 i-- (T = 25)
"brne head40" "\n" // 1-2 if(i != 0) -> (next byte) "brne head60" "\n" // 1-2 if(i != 0) -> (next byte)
: [port] "+e" (port), : [port] "+e" (port),
[byte] "+r" (b), [byte] "+r" (b),
[bit] "+r" (bit), [bit] "+r" (bit),

View File

@@ -86,7 +86,7 @@ public:
{ {
while (!IsReadyToUpdate()) while (!IsReadyToUpdate())
{ {
#if !defined(ARDUINO_TEEONARDU_LEO) && !defined(ARDUINO_TEEONARDU_FLORA) #if !defined(ARDUINO_TEEONARDU_LEO) && !defined(ARDUINO_TEEONARDU_FLORA) && !defined(ARDUINO_AVR_DIGISPARK)
yield(); // allows for system yield if needed yield(); // allows for system yield if needed
#endif #endif
} }