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:
@@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user