Move incBCD to sniffer; only used there

This commit is contained in:
Allen Hill
2023-09-03 19:04:08 -04:00
parent cedad9df9f
commit 82ab967b7c
3 changed files with 9 additions and 11 deletions
+9
View File
@@ -263,6 +263,15 @@ void general_GPIO_init() {
PORTC.PIN1CTRL = PORT_ISC_INPUT_DISABLE_gc; // WOD
}
/* Increment packed 2-digit BCD number.
WARNING: Overflow behavior is incorrect (e.g. `incBCD(0x99) != 0x00`) */
uint8_t incBCD(uint8_t data) {
if ((data & 0x9) == 0x9)
return (data + 7);
return (data + 1);
}
// Periodic interrupt with a 1 sec period
ISR(RTC_PIT_vect) {
if (CD_Mode == stPlay) {