Indented.

This commit is contained in:
skarg
2007-11-29 15:56:53 +00:00
parent c585241c03
commit 411d6c1b24
236 changed files with 17864 additions and 15724 deletions
+11 -9
View File
@@ -14,28 +14,30 @@
#include "board.h"
/* global variables */
unsigned long blinkcount;
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 unsigned int j,k; /* loop counters */
volatile unsigned int j, k; /* loop counters */
/* endless loop */
while (1) {
while (1) {
/* count out the proper number of blinks */
for (j = code; j != 0; j--) {
for (j = code; j != 0; j--) {
/* 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++;
}
}