mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-25 13:31:37 +00:00
adding a test that blinks all the GPIO --- good for testing soldering
jobs.
This commit is contained in:
parent
e6d42dc4b2
commit
16f680544c
36
tests/blink-allio.c
Normal file
36
tests/blink-allio.c
Normal file
@ -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<DELAY; i++) { continue; }
|
||||||
|
|
||||||
|
*(volatile uint32_t *)GPIO_DATA0 = 0x00000000;
|
||||||
|
*(volatile uint32_t *)GPIO_DATA1 = 0x00000000;
|
||||||
|
|
||||||
|
for(i=0; i<DELAY; i++) { continue; }
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user