Changeset - 4b7449ab32bd
[Not reviewed]
default
0 1 0
Ethan Zonca - 10 years ago 2014-08-18 23:08:23
ez@ethanzonca.com
Add toggling fun text. Things seem to be working nicely.
1 file changed with 9 insertions and 1 deletions:
main.c
9
1
0 comments (0 inline, 0 general)
main.c
Show inline comments
 
@@ -71,6 +71,7 @@ int main(void)
 
    ssd1306_DrawString("Hello World!", 0, 10);
 
  //  ssd1306_block_write();
 
 
    uint8_t toggle = 0;
 
    while(1)
 
   {  
 
        //ssd1306_block_write();
 
@@ -91,7 +92,14 @@ int main(void)
 
 
        if(!sw_btn) {
 
            GPIO_ToggleBits(LED_STAT);
 
            ssd1306_DrawString("Douche!", 2, 10);
 
            if(!toggle) {
 
                ssd1306_DrawString("I freaking work!", 2, 10);
 
                toggle = ! toggle;
 
            }
 
            else  {
 
                ssd1306_block_write();
 
                toggle = ! toggle;
 
            }    
 
        }
 
 
        GPIO_SetBits(LED_POWER);
0 comments (0 inline, 0 general)