mmarchetti / DirectIO

Fast, simple I/O library for Arduino
GNU Lesser General Public License v3.0
116 stars 27 forks source link

DirectIO's use of SFR_ASM_COMPAT masks the usual register definitions #3

Closed mmarchetti closed 9 years ago

mmarchetti commented 9 years ago

DirectIO.h defines _SFR_ASM_COMPAT, which causes register definitions to be integer addresses instead of references to the actual port (e.g. SREG defined as 0x3F instead of *(uint8_t*) 0x3F). This breaks some other uses, e.g. the ATOMIC_RESTORESTATE macro in util/atomic.h. DirectIO should restore the normal definitions at the end of its include file.