multiple tests work now.
added blink code for all the leds.
This commit is contained in:
parent
583e00d2d9
commit
b77fb10e63
5 changed files with 62 additions and 8 deletions
26
tests/blink-red.c
Normal file
26
tests/blink-red.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
#define MBAR_GPIO 0x80000000
|
||||
#define GPIO_PAD_DIR0 0x80000000
|
||||
#define GPIO_DATA0 0x80000008
|
||||
#define UART1_DATA 0x80005008
|
||||
#define DELAY 400000
|
||||
|
||||
#include "embedded_types.h"
|
||||
|
||||
void main(void) {
|
||||
|
||||
*(volatile uint32_t *)GPIO_PAD_DIR0 = 0x00000100;
|
||||
|
||||
volatile uint32_t i;
|
||||
|
||||
while(1) {
|
||||
|
||||
*(volatile uint32_t *)GPIO_DATA0 = 0x00000100;
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
*(volatile uint32_t *)GPIO_DATA0 = 0x00000000;
|
||||
|
||||
for(i=0; i<DELAY; i++) { continue; }
|
||||
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue