E698PM LED test.c
Revision as of 01:06, 22 December 2020 by 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(...")
#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; }