diff --git a/ssd1306.c b/ssd1306.c --- a/ssd1306.c +++ b/ssd1306.c @@ -2,7 +2,7 @@ #include "ssd1306.h" // Write command to OLED -void WriteCommand(unsigned char command) +static void WriteCommand(unsigned char command) { SSD_CS_Low(); SSD_A0_Low(); @@ -11,7 +11,7 @@ void WriteCommand(unsigned char command) } // Write data to OLED -void WriteData(unsigned char data) +static void WriteData(unsigned char data) { SSD_CS_Low(); SSD_A0_High(); @@ -20,7 +20,7 @@ void WriteData(unsigned char data) } // Initialize OLED -void ssd1306_Init(void) +void ssd1306_init(void) { /* Generate a reset */ @@ -179,13 +179,13 @@ static const char fontData[][5] = }; -void setStartPage(unsigned char d) +static void setStartPage(unsigned char d) { WriteCommand(0xB0|d); // Set Page Start Address for Page Addressing Mode // Default => 0xB0 (0x00) } /* Below are functions used to configure the OLED */ -void setStartColumn(unsigned char d) +static void setStartColumn(unsigned char d) { WriteCommand(0x00+d%16); // Set Lower Column Start Address for Page Addressing Mode WriteCommand(0x10+d/16); // Set Higher Column Start Address for Page Addressing Mode @@ -259,7 +259,7 @@ void ssd1306_drawlogo() } /* Print a single character from font.cpp */ -void ssd1306_DrawChar(char ascii, unsigned char row, unsigned char xPos) +void ssd1306_drawchar(char ascii, unsigned char row, unsigned char xPos) { char *srcPointer = -1; unsigned char i; @@ -277,7 +277,7 @@ void ssd1306_DrawChar(char ascii, unsign WriteData(0x00); } -void ssd1306_DrawCharBig(char ascii, unsigned char row, unsigned char xPos) +void ssd1306_drawcharbig(char ascii, unsigned char row, unsigned char xPos) { char *srcPointer = -1; unsigned char i; @@ -340,16 +340,16 @@ void ssd1306_DrawCharBig(char ascii, uns } -void ssd1306_DrawString(const char *dataPtr, unsigned char row, unsigned char xPos) +void ssd1306_drawstring(const char *dataPtr, unsigned char row, unsigned char xPos) { char *srcPointer; srcPointer = (char*)dataPtr; - ssd1306_DrawChar(' ',row,xPos); // NBSP must be written first before the string start + ssd1306_drawchar(' ',row,xPos); // NBSP must be written first before the string start while(1) { - ssd1306_DrawChar(*srcPointer,row,xPos); + ssd1306_drawchar(*srcPointer,row,xPos); srcPointer++; xPos+=6; if(*srcPointer == 0) break; @@ -357,16 +357,16 @@ void ssd1306_DrawString(const char *data } -void ssd1306_DrawStringBig(const char *dataPtr, unsigned char row, unsigned char xPos) +void ssd1306_drawstringbig(const char *dataPtr, unsigned char row, unsigned char xPos) { char *srcPointer; srcPointer = (char*)dataPtr; - ssd1306_DrawCharBig(' ',row,xPos); // NBSP must be written first before the string start + ssd1306_drawcharbig(' ',row,xPos); // NBSP must be written first before the string start while(1) { - ssd1306_DrawCharBig(*srcPointer,row,xPos); + ssd1306_drawcharbig(*srcPointer,row,xPos); srcPointer++; xPos+=12; if(*srcPointer == 0) break;