Don't initialize global variables to zero
The C89 standard dictates that global variables be initialized to zero by default. By explicitly defining a global to be zero, previous flash memory is wasted. See: http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_varinit Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
This commit is contained in:
parent
2f545041c9
commit
0f269a6d33
4
lcdLib.c
4
lcdLib.c
|
@ -27,8 +27,8 @@
|
||||||
#include "lcdLib.h"
|
#include "lcdLib.h"
|
||||||
|
|
||||||
// Globals
|
// Globals
|
||||||
volatile uint8_t currentLineNum = 0;
|
volatile uint8_t currentLineNum;
|
||||||
volatile uint8_t currentLineChars = 0;
|
volatile uint8_t currentLineChars;
|
||||||
|
|
||||||
const uint8_t lineBeginnings[LCD_NUMBER_OF_LINES] = { LCD_LINE_BEGINNINGS };
|
const uint8_t lineBeginnings[LCD_NUMBER_OF_LINES] = { LCD_LINE_BEGINNINGS };
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue