7 //#define SERIAL_OUTPUT_DEVICE Serial // comment out if no debugging required
9 #ifdef SERIAL_OUTPUT_DEVICE
11 extern HardwareSerial Serial
;
12 #define log_i SERIAL_OUTPUT_DEVICE.println
13 #define log_e SERIAL_OUTPUT_DEVICE.println
15 #else // No Debug Output
17 #define log_i(...) do { } while (0)
18 #define log_e(...) do { } while (0)
22 #define __no_operation() __asm__("nop\n\t") // emit AVR no-op
25 #define _EXTERN_ATTRIB extern "C"
27 #define _EXTERN_ATTRIB
30 _EXTERN_ATTRIB
int shim_i2c_write(unsigned char slave_addr
, unsigned char reg_addr
,unsigned char length
, unsigned char const *data
);
31 _EXTERN_ATTRIB
int shim_i2c_read(unsigned char slave_addr
, unsigned char reg_addr
,unsigned char length
, unsigned char *data
);
32 _EXTERN_ATTRIB
int shim_i2c_writeByte( unsigned char reg_addr
, unsigned char data
) ;
33 _EXTERN_ATTRIB
void shim_get_ms(unsigned long *count
);
34 _EXTERN_ATTRIB
int shim_i2c_writeBlock( unsigned char reg_addr
,unsigned char length
, unsigned char const *data
) ;