25 lines
No EOL
449 B
C++
25 lines
No EOL
449 B
C++
#include "hal/hal.h"
|
|
|
|
|
|
#ifdef LINUX
|
|
#include "hal/linux.cpp"
|
|
#endif
|
|
|
|
#ifdef AVR
|
|
#include "hal/avr.cpp"
|
|
#endif
|
|
|
|
|
|
void debug(int n){
|
|
const char hex[]="0123456789ABCDEF";
|
|
char buf[]="0x00000000\n";
|
|
buf[2]=hex[(n>>28)&0xF];
|
|
buf[3]=hex[(n>>24)&0xF];
|
|
buf[4]=hex[(n>>20)&0xF];
|
|
buf[5]=hex[(n>>16)&0xF];
|
|
buf[6]=hex[(n>>12)&0xF];
|
|
buf[7]=hex[(n>>8)&0xF];
|
|
buf[8]=hex[(n>>4)&0xF];
|
|
buf[9]=hex[(n>>0)&0xF];
|
|
debug(buf);
|
|
} |