123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
-
-
- #ifndef TWIBUS_H
- #define TWIBUS_H
-
- #include "macros.h"
-
-
-
-
-
- class TWIBus {
- private:
-
-
- const int timeout = 5;
-
-
-
- uint8_t addr = 0;
-
-
-
- uint8_t buffer_s = 0;
-
-
-
- char buffer[30];
-
-
- public:
-
-
- TWIBus();
-
-
-
- void reset();
-
-
-
- void send();
-
-
-
- void addbyte(char c);
-
-
-
- void address(uint8_t addr);
-
-
-
- void reqbytes(uint8_t bytes);
-
- #if ENABLED(DEBUG_TWIBUS)
-
-
-
- static void debug(const char func[], int32_t val = -1);
-
- #endif
- };
-
- #endif
|