2010-02-26 19:04:10 +00:00
|
|
|
#ifndef TESTS_H
|
|
|
|
#define TESTS_H
|
|
|
|
|
|
|
|
#include "put.h"
|
2010-02-26 20:35:57 +00:00
|
|
|
#include "led.h"
|
2010-02-26 19:04:10 +00:00
|
|
|
|
2010-02-26 22:44:39 +00:00
|
|
|
#define NL "\033[K\r\n"
|
|
|
|
|
2010-02-26 19:21:46 +00:00
|
|
|
void uart1_init(uint16_t inc, uint16_t mod);
|
2010-02-26 19:04:10 +00:00
|
|
|
void print_welcome(char* testname);
|
2010-02-26 22:44:39 +00:00
|
|
|
void dump_regs(uint32_t base, uint32_t len);
|
2010-03-07 20:39:56 +00:00
|
|
|
void print_packet(volatile packet_t *p);
|
|
|
|
|
|
|
|
#define toggle_gpio0(x) do { \
|
|
|
|
if(bit_is_set(*GPIO_DATA0,x)) { \
|
|
|
|
*GPIO_DATA_RESET0 = (1 << x); \
|
|
|
|
} else { \
|
|
|
|
*GPIO_DATA_SET0 = (1 << x) ; \
|
|
|
|
} \
|
|
|
|
} while(0);
|
2010-02-26 19:04:10 +00:00
|
|
|
|
|
|
|
#endif
|