mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Merge pull request #356 from bloqaudio/fix/config-post-race
httpd: buffer a configuration upload before touching the flash
This commit is contained in:
@@ -366,6 +366,32 @@ char strcmp(register __xdata const uint8_t *a, register __code const uint8_t *b)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* True when b is a prefix of a. Unlike strcmp() the byte after the match is not
|
||||
* compared, and unlike is_word_x() it need not be a separator.
|
||||
*/
|
||||
bool strstart(__xdata const uint8_t *a, __code const uint8_t *b)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
|
||||
while (b[i] && (b[i] == a[i]))
|
||||
i++;
|
||||
|
||||
return !b[i];
|
||||
}
|
||||
|
||||
|
||||
bool strstart_x(__xdata const uint8_t *a, __xdata const uint8_t *b)
|
||||
{
|
||||
uint8_t i = 0;
|
||||
|
||||
while (b[i] && (b[i] == a[i]))
|
||||
i++;
|
||||
|
||||
return !b[i];
|
||||
}
|
||||
|
||||
|
||||
void print_short(uint16_t a)
|
||||
{
|
||||
// allocating the registers first improves the sdcc code here
|
||||
|
||||
Reference in New Issue
Block a user