Use explicitly sized types from stdint
Replace bare int types with stdint types. This was done with: grep -rwl 'int' src/ | xargs sed -i 's/\<int\>/int16_t/g' grep -rwl 'unsigned long' src/ | xargs sed -i 's/\<unsigned long\>/uint32_t/g' grep -rwl 'unsigned char' src/ | xargs sed -i 's/\<unsigned char\>/uint8_t/g' Then reverted for *main(), putchar(), and getchar(). The Arduino declarations for parallel_main() were also corrected to match their definitions. SDCC does *not* generate the same code in all instances, due to `int` being treated different than `short int`. Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Jeremy Soller
parent
38b2a628f9
commit
99af8a35f5
@ -3,7 +3,7 @@
|
||||
#include <board/kbled.h>
|
||||
#include <common/macro.h>
|
||||
|
||||
static int LEVEL_I = 1;
|
||||
static int16_t LEVEL_I = 1;
|
||||
static const uint8_t __code LEVELS[] = {
|
||||
48,
|
||||
72,
|
||||
@ -13,7 +13,7 @@ static const uint8_t __code LEVELS[] = {
|
||||
255
|
||||
};
|
||||
|
||||
static int COLOR_I = 0;
|
||||
static int16_t COLOR_I = 0;
|
||||
static const uint32_t __code COLORS[] = {
|
||||
0xFFFFFF,
|
||||
0x0000FF,
|
||||
|
Reference in New Issue
Block a user