File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,19 @@ typedef enum _BitOrder {
3939typedef BitOrder BusIOBitOrder;
4040#endif
4141
42- #if defined(__AVR__) || defined(TEENSYDUINO)
42+ #if defined(__IMXRT1062__) // Teensy 4.x
43+ // *Warning* I disabled the usage of FAST_PINIO as the set/clear operations
44+ // used in the cpp file are not atomic and can effect multiple IO pins
45+ // and if an interrupt happens in between the time the code reads the register
46+ // and writes out the updated value, that changes one or more other IO pins
47+ // on that same IO port, those change will be clobbered when the updated
48+ // values are written back. A fast version can be implemented that uses the
49+ // ports set and clear registers which are atomic.
50+ // typedef volatile uint32_t BusIO_PortReg;
51+ // typedef uint32_t BusIO_PortMask;
52+ // #define BUSIO_USE_FAST_PINIO
53+
54+ #elif defined(__AVR__) || defined(TEENSYDUINO)
4355typedef volatile uint8_t BusIO_PortReg;
4456typedef uint8_t BusIO_PortMask;
4557#define BUSIO_USE_FAST_PINIO
You can’t perform that action at this time.
0 commit comments