micromenu/src/hal.cpp

25 lines
449 B
C++
Raw Normal View History

2018-11-05 20:09:01 +00:00
#include "hal/hal.h"
2018-10-19 11:49:11 +00:00
2018-11-01 13:37:30 +00:00
#ifdef LINUX
#include "hal/linux.cpp"
2018-10-28 19:06:26 +00:00
#endif
2018-10-19 11:49:11 +00:00
2018-11-01 13:37:30 +00:00
#ifdef AVR
#include "hal/avr.cpp"
2018-10-19 11:49:11 +00:00
#endif
2018-12-04 12:20:42 +00:00
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);
}