2010-02-26 20:04:10 +01:00
|
|
|
#ifndef TESTS_H
|
|
|
|
#define TESTS_H
|
|
|
|
|
|
|
|
#include "put.h"
|
2010-02-26 21:35:57 +01:00
|
|
|
#include "led.h"
|
2010-02-26 20:04:10 +01:00
|
|
|
|
2010-02-26 23:44:39 +01:00
|
|
|
#define NL "\033[K\r\n"
|
|
|
|
|
2010-02-26 20:21:46 +01:00
|
|
|
void uart1_init(uint16_t inc, uint16_t mod);
|
2010-02-26 20:04:10 +01:00
|
|
|
void print_welcome(char* testname);
|
2010-02-26 23:44:39 +01:00
|
|
|
void dump_regs(uint32_t base, uint32_t len);
|
2010-03-07 21:39:56 +01: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 20:04:10 +01:00
|
|
|
|
|
|
|
#endif
|