Feature/make pretty apps and ports (#80)

* Added pretty-apps and pretty-ports make targets

* pretty-fied apps folder C files

* Pretty-fied ports folder C and H files

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2020-04-30 10:13:11 -05:00
committed by GitHub
parent 0abcbea971
commit fdd49f1791
152 changed files with 9668 additions and 11674 deletions
+9 -7
View File
@@ -15,11 +15,10 @@
/* global variables */
unsigned long blinkcount;
void blinker(
unsigned char code)
void blinker(unsigned char code)
{
volatile AT91PS_PIO pPIO = AT91C_BASE_PIOA; /* pointer to PIO register structure */
volatile AT91PS_PIO pPIO =
AT91C_BASE_PIOA; /* pointer to PIO register structure */
volatile unsigned int j, k; /* loop counters */
/* endless loop */
@@ -29,14 +28,17 @@ void blinker(
/* turn LED1 (DS1) on */
pPIO->PIO_CODR = LED1;
/* wait 250 msec */
for (k = 600000; k != 0; k--);
for (k = 600000; k != 0; k--)
;
/* turn LED1 (DS1) off */
pPIO->PIO_SODR = LED1;
/* wait 250 msec */
for (k = 600000; k != 0; k--);
for (k = 600000; k != 0; k--)
;
}
/* wait 2 seconds */
for (k = 5000000; (code != 0) && (k != 0); k--);
for (k = 5000000; (code != 0) && (k != 0); k--)
;
blinkcount++;
}
}