26 lines
440 B
C
26 lines
440 B
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
|
|
#define DEBUG(x) { \
|
|
uart_puts(#x " = "); \
|
|
uart_hex((unsigned int)(unsigned long)x); \
|
|
uart_puts(ENDL); \
|
|
}
|
|
|
|
#define DEBUG_s(x) { \
|
|
uart_puts(#x " = "); \
|
|
uart_puts(x); \
|
|
uart_puts(ENDL); \
|
|
}
|
|
|
|
void uart_init();
|
|
void uart_send(unsigned int c);
|
|
uint8_t uart_getb();
|
|
char uart_getc();
|
|
void uart_puts(const char *s);
|
|
void uart_hex(unsigned int d);
|
|
void uart_int(int d);
|
|
|
|
extern int is_uart_init;
|