Skip to content

Commit f8361b8

Browse files
author
Ricky Cheung
committed
avr: Conserve memory with smallest data types
Signed-off-by: Ricky Cheung <[email protected]>
1 parent db49ea6 commit f8361b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Arduino_Code/Arduino_Code.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ for default settings use -O0. -O may be a good tradeoff between both */
3434
/* For 8-bit microcontrollers we should use 16 bit variables since the
3535
difficulty is low, for all the other cases should be 32 bits. */
3636
#if defined(ARDUINO_ARCH_AVR) || defined(ARDUINO_ARCH_MEGAAVR)
37-
typedef uint32_t uintDiff;
37+
typedef uint16_t uintDiff;
3838
#else
3939
typedef uint32_t uintDiff;
4040
#endif
@@ -48,7 +48,7 @@ typedef uint32_t uintDiff;
4848

4949
bool digitDrawn = false;
5050
bool matrixEnabled = true;
51-
int minedDigitCount = 0;
51+
byte minedDigitCount = 0;
5252

5353
Adafruit_Microbit_Matrix microbit;
5454
#endif

0 commit comments

Comments
 (0)