allow correct building/syntax highlighting on desktop

This commit is contained in:
Jeff Wang
2019-03-31 19:32:36 -04:00
parent 4ed3d1654e
commit d1ec11cad8
4 changed files with 42 additions and 7 deletions

View File

@ -18,6 +18,7 @@ void _delay_us(uint8_t us);
#define _delay_us(x) _delay_ms(1)
#endif
void backlight_off(void);
char* u32str(uint32_t x, char* buf, uint8_t base);
@ -30,5 +31,18 @@ char* u32str(uint32_t x, char* buf, uint8_t base);
#define DESKTOP
#endif
#if defined(DESKTOP) || defined(IS_ECLIPSE)
#define __xdata
#define __sfr
#define __at uint8_t*
#define SDCC_ISR(isr, reg)
#define BACKLIGHT_ON()
#define TURN_OFF()
#else
#define SDCC_ISR(isr, reg) __interrupt (isr) __using (reg)
#define BACKLIGHT_ON() P3_4 = 0
#define TURN_OFF() P3_2 = 0
#endif
#endif /* SRC_UTILS_H_ */