Skip to content

Commit 6968b9a

Browse files
authored
Merge pull request #4 from openlab-vn-ua/main
Minor fixes to make code compile for VSCODE
2 parents 3aedaad + da25a1d commit 6968b9a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

ArduinoCore-API/api/Common.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,14 @@ typedef void (*voidFuncPtrParam)(void*);
7272
#define bit(b) (1UL << (b))
7373
#endif
7474

75+
#ifdef SKIP_LEGACY_TYPES
7576
/* TODO: request for removal */
76-
// typedef bool boolean;
77-
// typedef uint8_t byte;
78-
// typedef uint16_t word;
77+
#else
78+
// Keep these legacy types as they expected to be defined by Arduino.h and may be used by user code
79+
typedef bool boolean;
80+
typedef uint8_t byte;
81+
typedef uint16_t word;
82+
#endif
7983

8084
void init(void);
8185
void initVariant(void);

ArduinoCore-API/api/Stream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ int Stream::peekNextDigit(LookaheadMode lookahead, bool detectDecimal)
8686
// Public Methods
8787
//////////////////////////////////////////////////////////////
8888

89-
void Stream::setTimeout(unsigned long timeout) // sets the maximum number of milliseconds to wait
89+
void Stream::setTimeout(size_t timeout) // sets the maximum number of milliseconds to wait
9090
{
9191
_timeout = timeout;
9292
}

0 commit comments

Comments
 (0)