diff options
author | Leo C | 2014-10-26 12:43:57 +0100 |
---|---|---|
committer | Leo C | 2014-10-26 12:43:57 +0100 |
commit | 8a7deceacd30529e5c32082b2c719eb055841d0d (patch) | |
tree | 19b22d5a0363847ad5e29dd2d8c726191b1b5c82 /avr/pin.c | |
parent | 889202c46ced1be4fc0db3faf63564722eba2865 (diff) | |
download | z180-stamp-8a7deceacd30529e5c32082b2c719eb055841d0d.zip |
working connect command, new sleep command
Diffstat (limited to 'avr/pin.c')
-rw-r--r-- | avr/pin.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -130,14 +130,14 @@ int pin_config(int pin, pinmode_t mode) switch (mode) { case INPUT: pin_timer_off(pinlist[pin].timer); - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { + ATOMIC_BLOCK(ATOMIC_FORCEON) { p->ddr &= ~bit; p->pout &= ~bit; } break; case INPUT_PULLUP: pin_timer_off(pinlist[pin].timer); - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { + ATOMIC_BLOCK(ATOMIC_FORCEON) { p->ddr &= ~bit; p->pout |= bit; } @@ -145,7 +145,7 @@ int pin_config(int pin, pinmode_t mode) case OUTPUT: pin_timer_off(pinlist[pin].timer); case OUTPUT_TIMER: - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { + ATOMIC_BLOCK(ATOMIC_FORCEON) { p->ddr |= bit; } break; @@ -162,7 +162,7 @@ void pin_write(int pin, uint8_t val) port_t *p = pinlist[pin].adr; uint8_t bit = pinlist[pin].mask; - ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { + ATOMIC_BLOCK(ATOMIC_FORCEON) { if (val) p->pout |= bit; else |