From bb3bc8bc624dc7617707ea8d9354db84ea4af9f9 Mon Sep 17 00:00:00 2001 From: Andrew Makousky Date: Sat, 5 Sep 2020 15:03:01 -0500 Subject: [PATCH] Strip down to the bare minimum interrupt disables. This will hopefully prevent potential issues of not being able to update the 1-second counter correctly. --- firmware/rtc/MacRTC.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/firmware/rtc/MacRTC.c b/firmware/rtc/MacRTC.c index 54583ee..908ce37 100644 --- a/firmware/rtc/MacRTC.c +++ b/firmware/rtc/MacRTC.c @@ -113,12 +113,10 @@ volatile byte writeProtect = 0; void digitalWritePB(uint8_t pin, uint8_t val) { uint8_t bit = _BV(pin); - cli(); if (val == 0) PORTB &= ~bit; else PORTB |= bit; - sei(); } void setup(void) { @@ -336,9 +334,7 @@ void loop(void) { serialState = SENDING_DATA; serialBitNum = 0; // Set the pin to output mode - cli(); DDRB |= SERIAL_DATA_PIN; - sei(); break; case RECEIVING_DATA: @@ -415,9 +411,7 @@ void loop(void) { serialState = SENDING_DATA; serialBitNum = 0; // Set the pin to output mode - cli(); DDRB |= SERIAL_DATA_PIN; - sei(); break; case RECEIVING_XCMD_DATA: