Difference between revisions of "E698PM LED test.c"
Jump to navigation
Jump to search
imported>Bkavanagh (Created page with " #include <stdlib.h> #include <stdio.h> #define GPIO_DIR_REG *(volatile unsigned int *)(0x80000608) // GPIO direction register int main(void) { int i,j; printf(...") |
(No difference)
|
Revision as of 01:06, 22 December 2020
#include <stdlib.h> #include <stdio.h>
#define GPIO_DIR_REG *(volatile unsigned int *)(0x80000608) // GPIO direction register
int main(void) {
int i,j;
printf("Hello world!!!");
while (1)
{
for (i=1; i<=0b10000; i<<=1)
{
GPIO_DIR_REG = i;
for (j=0; j<400000; j++); // delay
}
}
// should never reach here
return EXIT_SUCCESS;
}