Rev 2 | Rev 5 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 3 | ||
|---|---|---|---|
| Line 34... | Line 34... | ||
| 34 | #include "evtimer.h" |
34 | #include "evtimer.h" |
| 35 | #include "chprintf.h" |
35 | #include "chprintf.h" |
| 36 | 36 | ||
| 37 | 37 | ||
| 38 | #include "hardware.h" |
38 | #include "hardware.h" |
| - | 39 | #include "spiInterface.h" |
|
| - | 40 | #include "SSD1306.h" |
|
| 39 | 41 | ||
| 40 | 42 | ||
| 41 | /*===========================================================================*/ |
43 | /*===========================================================================*/ |
| 42 | /* Command line related. */ |
44 | /* Command line related. */ |
| 43 | /*===========================================================================*/ |
45 | /*===========================================================================*/ |
| Line 141... | Line 143... | ||
| 141 | /* |
143 | /* |
| 142 | * Shell manager initialization. |
144 | * Shell manager initialization. |
| 143 | */ |
145 | */ |
| 144 | shellInit(); |
146 | shellInit(); |
| 145 | 147 | ||
| - | 148 | ||
| - | 149 | /* start the SPI hardware for display */ |
|
| - | 150 | ssd1306spiInit(); |
|
| - | 151 | ||
| - | 152 | ssd1306_begin( SSD1306_SWITCHCAPVCC, 0) ; |
|
| - | 153 | ||
| - | 154 | int x = 0; |
|
| - | 155 | while(1) |
|
| - | 156 | { |
|
| - | 157 | /* initialise the display */ |
|
| - | 158 | if(x==0) |
|
| - | 159 | clearDisplay(); |
|
| - | 160 | ||
| - | 161 | dim(x); |
|
| - | 162 | ||
| - | 163 | ||
| - | 164 | font_puts("Hello !\r\nDisplay\r\n"); |
|
| - | 165 | ||
| - | 166 | drawLine(x, 0, x, 63 , 1); |
|
| - | 167 | x++; |
|
| - | 168 | if (x==128) |
|
| - | 169 | x=0; |
|
| - | 170 | ||
| - | 171 | ||
| - | 172 | display(); |
|
| - | 173 | ||
| - | 174 | invertDisplay(x & 32); |
|
| - | 175 | ||
| - | 176 | chThdSleep(MS2ST(100)); |
|
| - | 177 | } |
|
| - | 178 | ||
| 146 | /* |
179 | /* |
| 147 | * Creates the blinker thread. |
180 | * Creates the blinker thread. |
| 148 | */ |
181 | */ |
| 149 | chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); |
182 | chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); |
| 150 | 183 | ||
| 151 | /* |
184 | /* |