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:
Tim Crawford
2021-07-28 07:36:42 -06:00
committed by Jeremy Soller
parent 38b2a628f9
commit 99af8a35f5
41 changed files with 169 additions and 167 deletions

View File

@ -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,