[stm32f429-discovery] General sweep to fix style according to make stylecheck.

This commit is contained in:
Piotr Esden-Tempski
2015-02-04 20:39:32 -08:00
parent c06aba1603
commit 8c6eb9ca57
26 changed files with 1091 additions and 963 deletions

View File

@@ -32,7 +32,8 @@
* This is our example, the heavy lifing is actually in lcd-spi.c but
* this drives that code.
*/
int main(void) {
int main(void)
{
int p1, p2, p3;
clock_setup();
@@ -42,7 +43,7 @@ int main(void) {
console_puts("LCD Initialized\n");
console_puts("Should have a checker pattern, press any key to proceed\n");
msleep(2000);
// (void) console_getc(1);
/* (void) console_getc(1); */
gfx_init(lcd_draw_pixel, 240, 320);
gfx_fillScreen(LCD_GREY);
gfx_fillRoundRect(10, 10, 220, 220, 5, LCD_WHITE);
@@ -62,7 +63,7 @@ int main(void) {
console_puts("Now it has a bit of structured graphics.\n");
console_puts("Press a key for some simple animation.\n");
msleep(2000);
// (void) console_getc(1);
/* (void) console_getc(1); */
gfx_setTextColor(LCD_YELLOW, LCD_BLACK);
gfx_setTextSize(3);
p1 = 0;
@@ -72,17 +73,17 @@ int main(void) {
gfx_fillScreen(LCD_BLACK);
gfx_setCursor(15, 36);
gfx_puts("PLANETS!");
gfx_fillCircle( 120, 160, 40, LCD_YELLOW);
gfx_drawCircle( 120, 160, 55, LCD_GREY);
gfx_drawCircle( 120, 160, 75, LCD_GREY);
gfx_drawCircle( 120, 160, 100, LCD_GREY);
gfx_fillCircle(120, 160, 40, LCD_YELLOW);
gfx_drawCircle(120, 160, 55, LCD_GREY);
gfx_drawCircle(120, 160, 75, LCD_GREY);
gfx_drawCircle(120, 160, 100, LCD_GREY);
gfx_fillCircle( 120 + (sin(d2r(p1)) * 55),
160 + (cos(d2r(p1)) * 55), 5, LCD_RED);
gfx_fillCircle( 120 + (sin(d2r(p2)) * 75),
160 + (cos(d2r(p2)) * 75), 10, LCD_WHITE);
gfx_fillCircle( 120 + (sin(d2r(p3)) * 100),
160 + (cos(d2r(p3)) * 100), 8, LCD_BLUE);
gfx_fillCircle(120 + (sin(d2r(p1)) * 55),
160 + (cos(d2r(p1)) * 55), 5, LCD_RED);
gfx_fillCircle(120 + (sin(d2r(p2)) * 75),
160 + (cos(d2r(p2)) * 75), 10, LCD_WHITE);
gfx_fillCircle(120 + (sin(d2r(p3)) * 100),
160 + (cos(d2r(p3)) * 100), 8, LCD_BLUE);
p1 = (p1 + 3) % 360;
p2 = (p2 + 2) % 360;
p3 = (p3 + 1) % 360;