File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed
libraries/Wire/src/utility Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 4141#include " pins_arduino.h"
4242#include " twi.h"
4343
44- static volatile uint8_t twi_state;
44+ constexpr uint32_t TWI_FREQ = 100000L ;
45+
46+ enum TWI_STATE : uint8_t {
47+ TWI_READY = 0 ,
48+ TWI_MRX = 1 ,
49+ TWI_MTX = 2 ,
50+ TWI_SRX = 3 ,
51+ TWI_STX = 4 ,
52+ };
53+
54+ static volatile TWI_STATE twi_state;
4555static volatile uint8_t twi_slarw;
4656static volatile uint8_t twi_sendStop; // should the transaction end with a stop
4757static volatile uint8_t twi_inRepStart; // in the middle of a repeated start
Original file line number Diff line number Diff line change 2727 #include <inttypes.h>
2828 //#define ATMEGA8
2929
30- #ifndef TWI_FREQ
31- #define TWI_FREQ 100000L
32- #endif
33-
34- #define TWI_READY 0
35- #define TWI_MRX 1
36- #define TWI_MTX 2
37- #define TWI_SRX 3
38- #define TWI_STX 4
39-
40-
4130 void twi_init (void );
4231 void twi_disable (void );
4332 void twi_setAddress (uint8_t );
You can’t perform that action at this time.
0 commit comments