From 16f680544c84e214e70b20b0f0389c5935082603 Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Mon, 7 Sep 2009 14:39:48 -0400 Subject: [PATCH] adding a test that blinks all the GPIO --- good for testing soldering jobs. --- tests/blink-allio.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/blink-allio.c diff --git a/tests/blink-allio.c b/tests/blink-allio.c new file mode 100644 index 000000000..55c6e6eca --- /dev/null +++ b/tests/blink-allio.c @@ -0,0 +1,36 @@ +#define MBAR_GPIO 0x80000000 +#define GPIO_PAD_DIR0 0x80000000 +#define GPIO_DATA0 0x80000008 +#define GPIO_PAD_DIR1 0x80000004 +#define GPIO_DATA1 0x8000000c +#define UART1_DATA 0x80005008 +#define DELAY 400000 + +#include "embedded_types.h" +#include "isr.h" +#include "led.h" + +#define LED_BITS LED_WHITE + +__attribute__ ((section ("startup"))) +void main(void) { + + *(volatile uint32_t *)GPIO_PAD_DIR0 = 0xffffffff; + *(volatile uint32_t *)GPIO_PAD_DIR1 = 0xffffffff; + + volatile uint32_t i; + + while(1) { + + *(volatile uint32_t *)GPIO_DATA0 = 0xffffffff; + *(volatile uint32_t *)GPIO_DATA1 = 0xffffffff; + + for(i=0; i