![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
enrico, forno, prova
Dependencies: BSP_DISCO_F746NG LCD_DISCO_F746NG Shifter TS_DISCO_F746NG mbed
Fork of F746_DrawPixel by
main.cpp@0:d421f2c38453, 2016-06-12 (annotated)
- Committer:
- billycorgan123
- Date:
- Sun Jun 12 12:30:54 2016 +0000
- Revision:
- 0:d421f2c38453
- Child:
- 1:8a54b7de2617
basic example how to use DrawPixel with STM32F746
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
billycorgan123 | 0:d421f2c38453 | 1 | #include "mbed.h" |
billycorgan123 | 0:d421f2c38453 | 2 | #include "LCD_DISCO_F746NG.h" |
billycorgan123 | 0:d421f2c38453 | 3 | #include "prova.c" |
billycorgan123 | 0:d421f2c38453 | 4 | |
billycorgan123 | 0:d421f2c38453 | 5 | LCD_DISCO_F746NG lcd; |
billycorgan123 | 0:d421f2c38453 | 6 | |
billycorgan123 | 0:d421f2c38453 | 7 | int main() |
billycorgan123 | 0:d421f2c38453 | 8 | { |
billycorgan123 | 0:d421f2c38453 | 9 | while(1) { |
billycorgan123 | 0:d421f2c38453 | 10 | // Initial image |
billycorgan123 | 0:d421f2c38453 | 11 | int riga, colonna; |
billycorgan123 | 0:d421f2c38453 | 12 | unsigned long contatore=0; |
billycorgan123 | 0:d421f2c38453 | 13 | for (riga=480; riga>0; riga--) { |
billycorgan123 | 0:d421f2c38453 | 14 | for ( colonna=0; colonna<480; colonna++) { |
billycorgan123 | 0:d421f2c38453 | 15 | lcd.DrawPixel (colonna, 480-riga, _acprova[contatore]); |
billycorgan123 | 0:d421f2c38453 | 16 | contatore++; |
billycorgan123 | 0:d421f2c38453 | 17 | } |
billycorgan123 | 0:d421f2c38453 | 18 | colonna=0; |
billycorgan123 | 0:d421f2c38453 | 19 | } |
billycorgan123 | 0:d421f2c38453 | 20 | wait(3.0); |
billycorgan123 | 0:d421f2c38453 | 21 | }//close while(1) |
billycorgan123 | 0:d421f2c38453 | 22 | }//close main |