|
|
|
|
@ -1,78 +1,11 @@
|
|
|
|
|
#include <avr/io.h>
|
|
|
|
|
#include <util/atomic.h>
|
|
|
|
|
#include "io-helper.h"
|
|
|
|
|
|
|
|
|
|
volatile uint8_t outStates[nrOfOutputs/8];
|
|
|
|
|
volatile uint8_t inStatesRaw[nrOfInputs/8];
|
|
|
|
|
volatile uint8_t inStates[nrOfInputs/8];
|
|
|
|
|
|
|
|
|
|
volatile uint8_t outStatesBlinking[nrOfOutputs/8];
|
|
|
|
|
|
|
|
|
|
volatile uint8_t oldInstates[nrOfInputs/8];
|
|
|
|
|
volatile uint8_t inStatesBothEdges[nrOfInputs/8];
|
|
|
|
|
volatile uint8_t inStatesRisingEdge[nrOfInputs/8];
|
|
|
|
|
volatile uint8_t inStatesFallingEdge[nrOfInputs/8];
|
|
|
|
|
|
|
|
|
|
uint8_t read_Input(uint8_t nr, uint8_t type) {
|
|
|
|
|
uint8_t state = 0;
|
|
|
|
|
switch (type) {
|
|
|
|
|
case LEVEL:
|
|
|
|
|
state = ioHelperReadBit(inStates, nr);
|
|
|
|
|
break;
|
|
|
|
|
case EDGE:
|
|
|
|
|
state = ioHelperReadBit(inStatesBothEdges, nr);
|
|
|
|
|
ioHelperSetBit(inStatesBothEdges, nr, 0);
|
|
|
|
|
break;
|
|
|
|
|
case RISING:
|
|
|
|
|
state = ioHelperReadBit(inStatesRisingEdge, nr);
|
|
|
|
|
ioHelperSetBit(inStatesRisingEdge, nr, 0);
|
|
|
|
|
break;
|
|
|
|
|
case FALLING:
|
|
|
|
|
state = ioHelperReadBit(inStatesFallingEdge, nr);
|
|
|
|
|
ioHelperSetBit(inStatesFallingEdge, nr, 0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return state;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void set_Output(uint8_t nr, uint8_t state) {
|
|
|
|
|
switch (state) {
|
|
|
|
|
case BLINK:
|
|
|
|
|
ioHelperSetBit(outStatesBlinking, nr, ON);
|
|
|
|
|
break;
|
|
|
|
|
case TOGGLE:
|
|
|
|
|
ioHelperSetBit(outStatesBlinking, nr, OFF);
|
|
|
|
|
if (ioHelperReadBit(outStates, nr)) {
|
|
|
|
|
ioHelperSetBit(outStates, nr, OFF);
|
|
|
|
|
} else {
|
|
|
|
|
ioHelperSetBit(outStates, nr, ON);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case ON:
|
|
|
|
|
ioHelperSetBit(outStates, nr, ON);
|
|
|
|
|
ioHelperSetBit(outStatesBlinking, nr, OFF);
|
|
|
|
|
break;
|
|
|
|
|
case OFF:
|
|
|
|
|
ioHelperSetBit(outStates, nr, OFF);
|
|
|
|
|
ioHelperSetBit(outStatesBlinking, nr, OFF);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ioHelperEdgeDetector(void){
|
|
|
|
|
for (uint8_t i = 0; i < nrOfInputs/8; i++){
|
|
|
|
|
inStatesBothEdges[i] = oldInstates[i] ^ inStates[i];
|
|
|
|
|
inStatesRisingEdge[i] = inStatesBothEdges[i] & inStates[i];
|
|
|
|
|
inStatesFallingEdge[i] = inStatesBothEdges[i] & oldInstates[i];
|
|
|
|
|
oldInstates[i] = inStates[i];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void ioHelperBlinkOuts(){
|
|
|
|
|
for(uint8_t i=0; i<nrOfOutputs/8; i++)
|
|
|
|
|
outStates[i] ^= outStatesBlinking[i];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* @brief: copies a single bit from one char to another char (or arrays thereof)
|
|
|
|
|
*
|
|
|
|
|
@ -148,7 +81,6 @@ void ioHelperIoConf(void) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef DDRA
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRA|=0
|
|
|
|
|
#ifdef BitPA0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -175,12 +107,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRB
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRB|=0
|
|
|
|
|
#ifdef BitPB0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -207,12 +138,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRC
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRC|=0
|
|
|
|
|
#ifdef BitPC0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -239,12 +169,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRD
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRD|=0
|
|
|
|
|
#ifdef BitPD0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -271,12 +200,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRE
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRE|=0
|
|
|
|
|
#ifdef BitPE0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -303,12 +231,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRF
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRF|=0
|
|
|
|
|
#ifdef BitPF0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -335,12 +262,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRG
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRG|=0
|
|
|
|
|
#ifdef BitPG0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -367,12 +293,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRH
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRH|=0
|
|
|
|
|
#ifdef BitPH0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -399,12 +324,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRI
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRI|=0
|
|
|
|
|
#ifdef BitPI0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -431,12 +355,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRJ
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRJ|=0
|
|
|
|
|
#ifdef BitPJ0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -463,12 +386,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRK
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRK|=0
|
|
|
|
|
#ifdef BitPK0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -495,12 +417,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRL
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRL|=0
|
|
|
|
|
#ifdef BitPL0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -527,12 +448,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRM
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRM|=0
|
|
|
|
|
#ifdef BitPM0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -559,12 +479,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRN
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRN|=0
|
|
|
|
|
#ifdef BitPN0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -591,12 +510,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRO
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRO|=0
|
|
|
|
|
#ifdef BitPO0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -623,12 +541,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRP
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRP|=0
|
|
|
|
|
#ifdef BitPP0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -655,12 +572,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRQ
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRQ|=0
|
|
|
|
|
#ifdef BitPQ0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -687,12 +603,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRR
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRR|=0
|
|
|
|
|
#ifdef BitPR0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -719,12 +634,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRS
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRS|=0
|
|
|
|
|
#ifdef BitPS0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -751,12 +665,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRT
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRT|=0
|
|
|
|
|
#ifdef BitPT0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -783,12 +696,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRU
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRU|=0
|
|
|
|
|
#ifdef BitPU0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -815,12 +727,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRV
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRV|=0
|
|
|
|
|
#ifdef BitPV0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -847,12 +758,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRW
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRW|=0
|
|
|
|
|
#ifdef BitPW0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -879,12 +789,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRX
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRX|=0
|
|
|
|
|
#ifdef BitPX0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -911,12 +820,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRY
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRY|=0
|
|
|
|
|
#ifdef BitPY0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -943,12 +851,11 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DDRZ
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
DDRZ|=0
|
|
|
|
|
#ifdef BitPZ0
|
|
|
|
|
|(1<<0)
|
|
|
|
|
@ -975,14 +882,15 @@ void ioHelperIoConf(void) {
|
|
|
|
|
|(1<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ioHelperSetOuts(void) {
|
|
|
|
|
#ifdef PORTA
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTA|=0
|
|
|
|
|
#ifdef BitPA0
|
|
|
|
|
|(getBit1(BitPA0)<<0)
|
|
|
|
|
@ -1009,9 +917,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPA7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTA&=~(0
|
|
|
|
|
#ifdef BitPA0
|
|
|
|
|
|(getBit0(BitPA0)<<0)
|
|
|
|
|
@ -1038,13 +944,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPA7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTB
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTB|=0
|
|
|
|
|
#ifdef BitPB0
|
|
|
|
|
|(getBit1(BitPB0)<<0)
|
|
|
|
|
@ -1071,9 +975,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPB7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTB&=~(0
|
|
|
|
|
#ifdef BitPB0
|
|
|
|
|
|(getBit0(BitPB0)<<0)
|
|
|
|
|
@ -1100,13 +1002,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPB7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTC
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTC|=0
|
|
|
|
|
#ifdef BitPC0
|
|
|
|
|
|(getBit1(BitPC0)<<0)
|
|
|
|
|
@ -1133,9 +1033,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPC7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTC&=~(0
|
|
|
|
|
#ifdef BitPC0
|
|
|
|
|
|(getBit0(BitPC0)<<0)
|
|
|
|
|
@ -1162,13 +1060,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPC7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTD
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTD|=0
|
|
|
|
|
#ifdef BitPD0
|
|
|
|
|
|(getBit1(BitPD0)<<0)
|
|
|
|
|
@ -1195,9 +1091,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPD7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTD&=~(0
|
|
|
|
|
#ifdef BitPD0
|
|
|
|
|
|(getBit0(BitPD0)<<0)
|
|
|
|
|
@ -1224,13 +1118,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPD7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTE
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTE|=0
|
|
|
|
|
#ifdef BitPE0
|
|
|
|
|
|(getBit1(BitPE0)<<0)
|
|
|
|
|
@ -1257,9 +1149,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPE7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTE&=~(0
|
|
|
|
|
#ifdef BitPE0
|
|
|
|
|
|(getBit0(BitPE0)<<0)
|
|
|
|
|
@ -1286,13 +1176,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPE7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTF
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTF|=0
|
|
|
|
|
#ifdef BitPF0
|
|
|
|
|
|(getBit1(BitPF0)<<0)
|
|
|
|
|
@ -1319,9 +1207,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPF7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTF&=~(0
|
|
|
|
|
#ifdef BitPF0
|
|
|
|
|
|(getBit0(BitPF0)<<0)
|
|
|
|
|
@ -1348,13 +1234,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPF7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTG
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTG|=0
|
|
|
|
|
#ifdef BitPG0
|
|
|
|
|
|(getBit1(BitPG0)<<0)
|
|
|
|
|
@ -1381,9 +1265,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPG7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTG&=~(0
|
|
|
|
|
#ifdef BitPG0
|
|
|
|
|
|(getBit0(BitPG0)<<0)
|
|
|
|
|
@ -1410,13 +1292,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPG7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTH
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTH|=0
|
|
|
|
|
#ifdef BitPH0
|
|
|
|
|
|(getBit1(BitPH0)<<0)
|
|
|
|
|
@ -1443,9 +1323,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPH7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTH&=~(0
|
|
|
|
|
#ifdef BitPH0
|
|
|
|
|
|(getBit0(BitPH0)<<0)
|
|
|
|
|
@ -1472,13 +1350,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPH7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTI
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTI|=0
|
|
|
|
|
#ifdef BitPI0
|
|
|
|
|
|(getBit1(BitPI0)<<0)
|
|
|
|
|
@ -1505,9 +1381,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPI7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTI&=~(0
|
|
|
|
|
#ifdef BitPI0
|
|
|
|
|
|(getBit0(BitPI0)<<0)
|
|
|
|
|
@ -1534,13 +1408,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPI7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTJ
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTJ|=0
|
|
|
|
|
#ifdef BitPJ0
|
|
|
|
|
|(getBit1(BitPJ0)<<0)
|
|
|
|
|
@ -1567,9 +1439,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPJ7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTJ&=~(0
|
|
|
|
|
#ifdef BitPJ0
|
|
|
|
|
|(getBit0(BitPJ0)<<0)
|
|
|
|
|
@ -1596,13 +1466,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPJ7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTK
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTK|=0
|
|
|
|
|
#ifdef BitPK0
|
|
|
|
|
|(getBit1(BitPK0)<<0)
|
|
|
|
|
@ -1629,9 +1497,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPK7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTK&=~(0
|
|
|
|
|
#ifdef BitPK0
|
|
|
|
|
|(getBit0(BitPK0)<<0)
|
|
|
|
|
@ -1658,13 +1524,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPK7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTL
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTL|=0
|
|
|
|
|
#ifdef BitPL0
|
|
|
|
|
|(getBit1(BitPL0)<<0)
|
|
|
|
|
@ -1691,9 +1555,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPL7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTL&=~(0
|
|
|
|
|
#ifdef BitPL0
|
|
|
|
|
|(getBit0(BitPL0)<<0)
|
|
|
|
|
@ -1720,13 +1582,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPL7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTM
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTM|=0
|
|
|
|
|
#ifdef BitPM0
|
|
|
|
|
|(getBit1(BitPM0)<<0)
|
|
|
|
|
@ -1753,9 +1613,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPM7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTM&=~(0
|
|
|
|
|
#ifdef BitPM0
|
|
|
|
|
|(getBit0(BitPM0)<<0)
|
|
|
|
|
@ -1782,13 +1640,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPM7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTN
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTN|=0
|
|
|
|
|
#ifdef BitPN0
|
|
|
|
|
|(getBit1(BitPN0)<<0)
|
|
|
|
|
@ -1815,9 +1671,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPN7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTN&=~(0
|
|
|
|
|
#ifdef BitPN0
|
|
|
|
|
|(getBit0(BitPN0)<<0)
|
|
|
|
|
@ -1844,13 +1698,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPN7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTO
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTO|=0
|
|
|
|
|
#ifdef BitPO0
|
|
|
|
|
|(getBit1(BitPO0)<<0)
|
|
|
|
|
@ -1877,9 +1729,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPO7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTO&=~(0
|
|
|
|
|
#ifdef BitPO0
|
|
|
|
|
|(getBit0(BitPO0)<<0)
|
|
|
|
|
@ -1906,13 +1756,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPO7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTP
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTP|=0
|
|
|
|
|
#ifdef BitPP0
|
|
|
|
|
|(getBit1(BitPP0)<<0)
|
|
|
|
|
@ -1939,9 +1787,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPP7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTP&=~(0
|
|
|
|
|
#ifdef BitPP0
|
|
|
|
|
|(getBit0(BitPP0)<<0)
|
|
|
|
|
@ -1968,13 +1814,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPP7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTQ
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTQ|=0
|
|
|
|
|
#ifdef BitPQ0
|
|
|
|
|
|(getBit1(BitPQ0)<<0)
|
|
|
|
|
@ -2001,9 +1845,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPQ7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTQ&=~(0
|
|
|
|
|
#ifdef BitPQ0
|
|
|
|
|
|(getBit0(BitPQ0)<<0)
|
|
|
|
|
@ -2030,13 +1872,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPQ7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTR
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTR|=0
|
|
|
|
|
#ifdef BitPR0
|
|
|
|
|
|(getBit1(BitPR0)<<0)
|
|
|
|
|
@ -2063,9 +1903,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPR7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTR&=~(0
|
|
|
|
|
#ifdef BitPR0
|
|
|
|
|
|(getBit0(BitPR0)<<0)
|
|
|
|
|
@ -2092,13 +1930,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPR7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTS
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTS|=0
|
|
|
|
|
#ifdef BitPS0
|
|
|
|
|
|(getBit1(BitPS0)<<0)
|
|
|
|
|
@ -2125,9 +1961,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPS7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTS&=~(0
|
|
|
|
|
#ifdef BitPS0
|
|
|
|
|
|(getBit0(BitPS0)<<0)
|
|
|
|
|
@ -2154,13 +1988,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPS7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTT
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTT|=0
|
|
|
|
|
#ifdef BitPT0
|
|
|
|
|
|(getBit1(BitPT0)<<0)
|
|
|
|
|
@ -2187,9 +2019,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPT7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTT&=~(0
|
|
|
|
|
#ifdef BitPT0
|
|
|
|
|
|(getBit0(BitPT0)<<0)
|
|
|
|
|
@ -2216,13 +2046,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPT7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTU
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTU|=0
|
|
|
|
|
#ifdef BitPU0
|
|
|
|
|
|(getBit1(BitPU0)<<0)
|
|
|
|
|
@ -2249,9 +2077,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPU7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTU&=~(0
|
|
|
|
|
#ifdef BitPU0
|
|
|
|
|
|(getBit0(BitPU0)<<0)
|
|
|
|
|
@ -2278,13 +2104,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPU7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTV
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTV|=0
|
|
|
|
|
#ifdef BitPV0
|
|
|
|
|
|(getBit1(BitPV0)<<0)
|
|
|
|
|
@ -2311,9 +2135,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPV7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTV&=~(0
|
|
|
|
|
#ifdef BitPV0
|
|
|
|
|
|(getBit0(BitPV0)<<0)
|
|
|
|
|
@ -2340,13 +2162,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPV7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTW
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTW|=0
|
|
|
|
|
#ifdef BitPW0
|
|
|
|
|
|(getBit1(BitPW0)<<0)
|
|
|
|
|
@ -2373,9 +2193,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPW7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTW&=~(0
|
|
|
|
|
#ifdef BitPW0
|
|
|
|
|
|(getBit0(BitPW0)<<0)
|
|
|
|
|
@ -2402,13 +2220,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPW7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTX
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTX|=0
|
|
|
|
|
#ifdef BitPX0
|
|
|
|
|
|(getBit1(BitPX0)<<0)
|
|
|
|
|
@ -2435,9 +2251,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPX7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTX&=~(0
|
|
|
|
|
#ifdef BitPX0
|
|
|
|
|
|(getBit0(BitPX0)<<0)
|
|
|
|
|
@ -2464,13 +2278,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPX7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTY
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTY|=0
|
|
|
|
|
#ifdef BitPY0
|
|
|
|
|
|(getBit1(BitPY0)<<0)
|
|
|
|
|
@ -2497,9 +2309,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPY7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTY&=~(0
|
|
|
|
|
#ifdef BitPY0
|
|
|
|
|
|(getBit0(BitPY0)<<0)
|
|
|
|
|
@ -2526,13 +2336,11 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPY7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef PORTZ
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTZ|=0
|
|
|
|
|
#ifdef BitPZ0
|
|
|
|
|
|(getBit1(BitPZ0)<<0)
|
|
|
|
|
@ -2559,9 +2367,7 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit1(BitPZ7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
|
|
|
|
|
PORTZ&=~(0
|
|
|
|
|
#ifdef BitPZ0
|
|
|
|
|
|(getBit0(BitPZ0)<<0)
|
|
|
|
|
@ -2588,10 +2394,10 @@ void ioHelperSetOuts(void) {
|
|
|
|
|
|(getBit0(BitPZ7)<<7)
|
|
|
|
|
#endif
|
|
|
|
|
|0);
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|