From e6bec78b5841e6f456d846b35faebf829443c8e1 Mon Sep 17 00:00:00 2001 From: Manfred Steiner Date: Mon, 12 Aug 2024 17:34:48 +0200 Subject: [PATCH] ... --- .../arduino-nano-5v/test_2024-07-23/Makefile | 62 +++++++--- .../test_2024-07-23/src/adafruit/bme280.cpp | 16 +-- .../test_2024-07-23/src/adafruit/bme280.h | 16 +-- .../test_2024-07-23/src/adafruit/ens160.cpp | 12 +- .../test_2024-07-23/src/adafruit/ens160.h | 12 +- .../test_2024-07-23/src/units/cc1101.cpp | 11 +- .../test_2024-07-23/src/units/cc1101new.cpp | 111 ++++++++++++++++-- .../test_2024-07-23/src/units/cc1101new.hpp | 88 +++++++++++++- .../test_2024-07-23/src/units/rtc8563.cpp | 7 +- 9 files changed, 265 insertions(+), 70 deletions(-) diff --git a/software/arduino-nano-5v/test_2024-07-23/Makefile b/software/arduino-nano-5v/test_2024-07-23/Makefile index ec1725d..e4da4c1 100644 --- a/software/arduino-nano-5v/test_2024-07-23/Makefile +++ b/software/arduino-nano-5v/test_2024-07-23/Makefile @@ -5,8 +5,8 @@ $(shell mkdir -p sim >/dev/null) $(shell mkdir -p sim/build >/dev/null) NAME="test_2024-07-23_nano-5v" - -SRC= $(wildcard src/*.c src/*.cpp src/*/*.cpp) +SRC= $(wildcard src/*.c src/*.cpp src/*/*.c src/*/*.cpp) +HDR= $(wildcard src/*.h src/*.hpp src/*/*.h src/*/*.hpp) OBJ_CPP = $(SRC:src/%.cpp=build/%.o) OBJ = $(OBJ_CPP:src/%.c=build/%.o) OBJ_SIM_CPP = $(SRC:src/%.cpp=sim/build/%.o) @@ -18,26 +18,35 @@ CC= avr-g++ CFLAGS= -Wall -mmcu=$(DEVICE) -Os -DF_CPU=12000000 -c LFLAGS= -Wall -mmcu=$(DEVICE) -Os -DF_CPU=12000000 -Wl,-u,vfprintf -lprintf_flt -lm -CFLAGS_SIM= -Wall -mmcu=$(DEVICE) -Og -DF_CPU=12000000 -g -c +CFLAGS_SIM= -Wall -mmcu=$(DEVICE) -Og -DF_CPU=12000000 -g -c -c LFLAGS_SIM= -Wall -mmcu=$(DEVICE) -Og -DF_CPU=12000000 -g -Wl,-u,vfprintf -lprintf_flt -lm all: dist/$(NAME).elf dist/$(NAME).s dist/$(NAME).hex sim/$(NAME).elf sim/$(NAME).s info dbg: - @echo "OBJ_CPP" $(OBJ_CPP) - @echo "OBJ" $(OBJ) - @echo "OBJ_SIM_CPP" $(OBJ_SIM_CPP) - @echo "OBJ_SIM" $(OBJ_SIM) + @echo --HDR--------------------------------- + @echo $(HDR) + @echo --SRC--------------------------------- + @echo $(SRC) + @echo --OBJ--------------------------------- + @echo $(OBJ) + @echo --OBJ_CPP----------------------------- + @echo $(OBJ_CPP) + @echo --OBJ--------------------------------- + @echo $(OBJ) + @echo =================================== + @echo info: - @echo @avr-size --mcu=$(DEVICE) --format=avr dist/$(NAME).elf -.depend: $(SRC) - $(CC) -MM $(SRC) > .depend +.depend: $(SRC) $(HDR) + $(CC) -mmcu=$(DEVICE) -MM $(SRC) | sed --regexp-extended 's/^(.*\.o)\: src\/(.*)(\.cpp|\.c) (.*)/build\/\2\.o\: src\/\2\3 \4/g' > .depend + +-include .depend --include $(DEPENDFILE) +# .depend solte auch auf Header Files achten! dist/$(NAME).elf: .depend $(OBJ) $(CC) $(LFLAGS) -o $@ $(OBJ) @@ -77,6 +86,33 @@ simuc: sim/$(NAME).elf gdb: sim/$(NAME).elf avr-gdb $< + +flash: dist/$(NAME).elf all + avrdude -c arduino -P /dev/ttyUSB0 -p m328p -e -U flash:w:$< + +flash0: dist/$(NAME).elf all + avrdude -c arduino -P /dev/ttyUSB0 -p m328p -e -U flash:w:$< + +flash1: dist/$(NAME).elf all + avrdude -c arduino -P /dev/ttyUSB1 -p m328p -e -U flash:w:$< + +flash2: dist/$(NAME).elf all + avrdude -c arduino -P /dev/ttyUSB2 -p m328p -e -U flash:w:$< + +picocom: + # picocom sends CR for ENTER -> convert cr (\r) to lf (\n) + picocom -b 115200 --omap crlf --raise-dtr /dev/ttyUSB0 + +picocom0: + picocom -b 115200 --omap crlf --raise-dtr /dev/ttyUSB0 + +picocom1: + picocom -b 115200 --omap crlf --raise-dtr /dev/ttyUSB1 + +picocom2: + picocom -b 115200 --omap crlf --raise-dtr /dev/ttyUSB2 + + isp-644p: avrdude -c usbasp -p m644p @@ -87,10 +123,6 @@ flash-644p: dist/$(NAME).elf all avrdude -c arduino -p m644p -P /dev/ttyUSB0 -b 115200 -e -U flash:w:$< -picocom: - # picocom sends CR for ENTER -> convert cr (\r) to lf (\n) - picocom -b 115200 --omap crlf /dev/ttyUSB0 - isp-fuse-644p: avrdude -c usbasp -p m644p -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xFF:m -U lock:w:0xFF:m diff --git a/software/nano-644/test_2024-07-23/src/adafruit/bme280.cpp b/software/nano-644/test_2024-07-23/src/adafruit/bme280.cpp index 95a0f49..1836c56 100644 --- a/software/nano-644/test_2024-07-23/src/adafruit/bme280.cpp +++ b/software/nano-644/test_2024-07-23/src/adafruit/bme280.cpp @@ -87,8 +87,8 @@ void Adafruit_BME280::setSampling(sensor_mode mode, * @param reg the register address to write to * @param value the value to write to the register */ -void Adafruit_BME280::write8(byte reg, byte value) { - byte buffer[2]; +void Adafruit_BME280::write8(uint8_t reg, uint8_t value) { + uint8_t buffer[2]; buffer[1] = value; if (i2c_dev) { buffer[0] = reg; @@ -101,7 +101,7 @@ void Adafruit_BME280::write8(byte reg, byte value) { * @param reg the register address to read from * @returns the data byte read from the device */ -uint8_t Adafruit_BME280::read8(byte reg) { +uint8_t Adafruit_BME280::read8(uint8_t reg) { uint8_t buffer[1]; if (i2c_dev) { buffer[0] = uint8_t(reg); @@ -115,7 +115,7 @@ uint8_t Adafruit_BME280::read8(byte reg) { * @param reg the register address to read from * @returns the 16 bit data value read from the device */ -uint16_t Adafruit_BME280::read16(byte reg) { +uint16_t Adafruit_BME280::read16(uint8_t reg) { uint8_t buffer[2]; if (i2c_dev) { @@ -130,7 +130,7 @@ uint16_t Adafruit_BME280::read16(byte reg) { * @param reg the register address to read from * @returns the 16 bit data value read from the device */ -uint16_t Adafruit_BME280::read16_LE(byte reg) { +uint16_t Adafruit_BME280::read16_LE(uint8_t reg) { uint16_t temp = read16(reg); return (temp >> 8) | (temp << 8); } @@ -140,14 +140,14 @@ uint16_t Adafruit_BME280::read16_LE(byte reg) { * @param reg the register address to read from * @returns the 16 bit data value read from the device */ -int16_t Adafruit_BME280::readS16(byte reg) { return (int16_t)read16(reg); } +int16_t Adafruit_BME280::readS16(uint8_t reg) { return (int16_t)read16(reg); } /*! * @brief Reads a signed little endian 16 bit value over I2C or SPI * @param reg the register address to read from * @returns the 16 bit data value read from the device */ -int16_t Adafruit_BME280::readS16_LE(byte reg) { +int16_t Adafruit_BME280::readS16_LE(uint8_t reg) { return (int16_t)read16_LE(reg); } @@ -156,7 +156,7 @@ int16_t Adafruit_BME280::readS16_LE(byte reg) { * @param reg the register address to read from * @returns the 24 bit data value read from the device */ -uint32_t Adafruit_BME280::read24(byte reg) { +uint32_t Adafruit_BME280::read24(uint8_t reg) { uint8_t buffer[3]; if (i2c_dev) { diff --git a/software/nano-644/test_2024-07-23/src/adafruit/bme280.h b/software/nano-644/test_2024-07-23/src/adafruit/bme280.h index b842782..aa5aa72 100644 --- a/software/nano-644/test_2024-07-23/src/adafruit/bme280.h +++ b/software/nano-644/test_2024-07-23/src/adafruit/bme280.h @@ -32,7 +32,7 @@ #include "../i2cmaster.hpp" #include "../main.hpp" -#define byte uint8_t +// #define byte uint8_t @@ -256,13 +256,13 @@ protected: void readCoefficients(void); bool isReadingCalibration(void); - void write8(byte reg, byte value); - uint8_t read8(byte reg); - uint16_t read16(byte reg); - uint32_t read24(byte reg); - int16_t readS16(byte reg); - uint16_t read16_LE(byte reg); // little endian - int16_t readS16_LE(byte reg); // little endian + void write8(uint8_t reg, uint8_t value); + uint8_t read8(uint8_t reg); + uint16_t read16(uint8_t reg); + uint32_t read24(uint8_t reg); + int16_t readS16(uint8_t reg); + uint16_t read16_LE(uint8_t reg); // little endian + int16_t readS16_LE(uint8_t reg); // little endian uint8_t _i2caddr; //!< I2C addr for the TwoWire interface int32_t _sensorID; //!< ID of the BME Sensor diff --git a/software/nano-644/test_2024-07-23/src/adafruit/ens160.cpp b/software/nano-644/test_2024-07-23/src/adafruit/ens160.cpp index ef23404..29e3704 100644 --- a/software/nano-644/test_2024-07-23/src/adafruit/ens160.cpp +++ b/software/nano-644/test_2024-07-23/src/adafruit/ens160.cpp @@ -47,26 +47,26 @@ bool ScioSense_ENS160::begin () { } -bool ScioSense_ENS160::write8 (byte reg, byte value) { - byte buffer[2]; +bool ScioSense_ENS160::write8 (uint8_t reg, uint8_t value) { + uint8_t buffer[2]; buffer[1] = value; buffer[0] = reg; return i2cDevice.write(buffer, 2); } -bool ScioSense_ENS160::read8 (byte reg, byte *value) { +bool ScioSense_ENS160::read8 (uint8_t reg, uint8_t *value) { uint8_t buffer[1]; buffer[0] = uint8_t(reg); return i2cDevice.write_then_read(buffer, 1, value, 1); } -bool ScioSense_ENS160::read16 (byte reg, uint16_t *value) { +bool ScioSense_ENS160::read16 (uint8_t reg, uint16_t *value) { uint8_t buffer[1]; buffer[0] = uint8_t(reg); return i2cDevice.write_then_read(buffer, 1, (uint8_t *)value, 2); } -bool ScioSense_ENS160::read16LE (byte reg, uint16_t *value) { +bool ScioSense_ENS160::read16LE (uint8_t reg, uint16_t *value) { uint16_t tmp; if (read16(reg, &tmp)) { *value = ((tmp & 0xff) << 8) | (tmp >> 8); @@ -75,7 +75,7 @@ bool ScioSense_ENS160::read16LE (byte reg, uint16_t *value) { return false; } -bool ScioSense_ENS160::readBytes (byte reg, uint8_t *bytes, uint8_t len) { +bool ScioSense_ENS160::readBytes (uint8_t reg, uint8_t *bytes, uint8_t len) { uint8_t buffer[1]; buffer[0] = uint8_t(reg); return i2cDevice.write_then_read(buffer, 1, buffer, len); diff --git a/software/nano-644/test_2024-07-23/src/adafruit/ens160.h b/software/nano-644/test_2024-07-23/src/adafruit/ens160.h index fb6925d..7f26ba1 100644 --- a/software/nano-644/test_2024-07-23/src/adafruit/ens160.h +++ b/software/nano-644/test_2024-07-23/src/adafruit/ens160.h @@ -13,7 +13,7 @@ #include "../i2cmaster.hpp" #include -#define byte uint8_t +// #define byte uint8_t // #if (ARDUINO >= 100) // #include "Arduino.h" @@ -177,11 +177,11 @@ class ScioSense_ENS160 { uint8_t _seq_steps[1][8]; - bool write8(byte reg, byte value); - bool read8 (byte reg, byte *value); - bool read16 (byte reg, uint16_t *value); - bool read16LE (byte reg, uint16_t *value); - bool readBytes (byte reg, uint8_t *bytes, uint8_t len); + bool write8(uint8_t reg, uint8_t value); + bool read8 (uint8_t reg, uint8_t *value); + bool read16 (uint8_t reg, uint16_t *value); + bool read16LE (uint8_t reg, uint16_t *value); + bool readBytes (uint8_t reg, uint8_t *bytes, uint8_t len); }; diff --git a/software/nano-644/test_2024-07-23/src/units/cc1101.cpp b/software/nano-644/test_2024-07-23/src/units/cc1101.cpp index 968bb3d..9516b45 100644 --- a/software/nano-644/test_2024-07-23/src/units/cc1101.cpp +++ b/software/nano-644/test_2024-07-23/src/units/cc1101.cpp @@ -15,10 +15,10 @@ // ------------------------------------ // not available - void PortExp::init () {} - void PortExp::cleanup () {} - void PortExp::setChipEnable () {} - void PortExp::clearChipEnable () {} + void Cc1101::init () {} + void Cc1101::cleanup () {} + int8_t Cc1101::run (uint8_t subtest) { return -1; } + PGM_P Cc1101::getName () { return PSTR("?"); } #endif @@ -134,8 +134,6 @@ const uint8_t PMEM_CC1101_PA_TABLE[8] PROGMEM = { 0x60 ,0x60 ,0x60 ,0x60 ,0x60 , return (PINA & (1 << PA5)) != 0; } -#endif - uint8_t Cc1101::sendSpiByte (uint8_t b) { SPDR = b; while (!(SPSR & (1< "), addr, value); + if (ok) { + printf_P(PSTR("status=0x%02x]"), status.byte); + } else { + printf_P(PSTR("ERR]")); + } + + return ok; + } + + bool Cc1101New::readRegister (uint8_t addr, uint8_t *value) { + bool ok = true; + addr = (addr & 0x3f) | 0x80; + setChipEnableLow(); + ok &= waitForMisoLow(); + status.byte = sendSpiByte(addr); + *value = sendSpiByte(0); setChipEnableHigh(); + + printf_P(PSTR("\n [readRegister(0x%02x) -> "), addr & 0x3f); + if (ok) { + printf_P(PSTR("0x%02x,status=0x%02x]"), *value, status.byte); + } else { + printf_P(PSTR("ERR]")); + } return ok; } + void Cc1101New::printRegisters () { + const Register_t *regValues = &PMEM_CC1101_REGISTER_INIT; + printf_P(PSTR("\n")); + for (uint8_t addr = 0; addr < sizeof(Register_t); addr++) { + bool ok = true; + uint8_t regValue, value; + memcpy_P(®Value, ((const uint8_t *)regValues) + addr, 1); + ok &= readRegister(addr, &value); + if (value != regValue) { printf_P(PSTR(" != 0x%02x"), regValue); } + } + printf_P(PSTR("\n")); + } + bool Cc1101New::resetCC1101 () { bool ok = true; setChipEnableLow(); @@ -218,6 +302,9 @@ bool Cc1101New::initRegister () { const Register_t *regValues = &PMEM_CC1101_REGISTER_INIT; bool ok = true; + + printRegisters(); + triggerOn(); for (uint8_t addr = 0; ok && addr < sizeof(Register_t); addr++) { uint8_t regValue; @@ -225,6 +312,8 @@ ok &= writeRegister(addr, regValue); } triggerOff(); + + printRegisters(); return ok; } diff --git a/software/nano-644/test_2024-07-23/src/units/cc1101new.hpp b/software/nano-644/test_2024-07-23/src/units/cc1101new.hpp index 8b9a0cc..6afc8c4 100644 --- a/software/nano-644/test_2024-07-23/src/units/cc1101new.hpp +++ b/software/nano-644/test_2024-07-23/src/units/cc1101new.hpp @@ -9,10 +9,15 @@ class Cc1101New : public TestUnit { public: typedef enum { MHZ915, MHZ433, MHZ868 } InitFrequency; typedef enum { Test } Cc1101Mode; - + typedef enum { IDLE = 0, RX = 1, TX = 2, FSTXON = 3, CALIBRATE = 4, SETTLING = 5, RXFIFO_OVFL = 6, TXFIFO_UNFL = 7 } StatusState_t; + typedef struct { uint8_t fifoBytes:4; StatusState_t state:3; uint8_t chipNotReady:1; } Status_t; + union { + Status_t status; + uint8_t byte; + } status; public: - Cc1101New (Cc1101Mode mode) { timer = 0; this->mode = mode; }; + Cc1101New (Cc1101Mode mode) { timer = 0; this->mode = mode; status.byte = 0x80; } virtual void init (); virtual void cleanup (); virtual int8_t run (uint8_t subtest); @@ -35,6 +40,9 @@ class Cc1101New : public TestUnit { bool waitForMisoLow (); bool strobe (StrobeCommand_t strobe); bool writeRegister (uint8_t addr, uint8_t value); + bool readRegister (uint8_t addr, uint8_t *value); + void printRegisters (); + bool resetCC1101 (); bool initRegister (); @@ -43,11 +51,13 @@ class Cc1101New : public TestUnit { Cc1101Mode mode; uint8_t timer; - public: typedef enum { IOCFG2 = 0x00, IOCFG1 = 0x01, IOCFG0 = 0x02, - FIFOTHR = 0x03 + FIFOTHR = 0x03, + SYNC1 = 0x04, SYNC0 = 0x05, + PKTLEN = 0x06, + PKTCTRL1 = 0x07, PKTCTRL0 = 0x08 } RegisterAddress_t; typedef enum { @@ -98,18 +108,84 @@ class Cc1101New : public TestUnit { CLK_XOSC_DIV_192 = 0x3f } GDOx_CFG_t; + typedef enum { NO_ADDR_CHECK = 0, CHECK_NO_BROADCAST = 1, CHECK_WITH_BROADCAST_0 = 2, CHECK_WITH_BROADCAST_0_AND_255 = 3 } ADR_CHK_t; + typedef enum { FIXED = 0, VARIABLE = 1, INFINITE = 2 } LENGTH_CONFIG_t; + typedef enum { NORMAL_USE_FIFO = 0, SYNC_SERIAL = 1, RANDOM_TX = 2, ASYNC_SERIAL = 3 } PKT_FORMAT_t; + typedef enum { FSK2 = 0, GFSK = 1, ASK_OOK = 3, FSK4 = 4, MSK = 7 } MOD_FORMAT_t; + typedef enum { NO_SYNC = 0, SYNC_15_16 = 1, SYNC_16_16 = 2, SYNC_30_32 = 3, CARRIER_SENSE = 4, SYNC_15_16_CARRIER_SENSE = 5, SYNC_16_16_CARRIER_SENSE = 6 , SYNC_30_326_CARRIER_SENSE = 7} SYNC_MODE_t; + typedef enum { TWO = 0, THREE = 1, FOUR = 2, SIX = 3, EIGHT = 4, TWELVE = 5, SIXTEEN = 6, TWENTYFOUR = 7 } NUM_PREAMBLE_t; + typedef enum { TXOFF_IDLE = 0, TXOFF_FSTXON = 1, STAY_IN_TX = 2, TXOFF_RX = 3 } TXOFF_MODE_t; + typedef enum { RXOFF_IDLE = 0, RXOFF_FSTXON = 1, RXOFF_TX = 2, STAY_IN_RX = 3 } RXOFF_MODE_t; + typedef enum { ALWAYS = 0, RSSI_BELOW_THRESHOLD = 1, UNLESS_RECEIVE_PACKET = 2, RSSI_BELOW_THRESHOLD__UNLESS_RECEIVE_PACKET = 3 } CCA_MODE_t; + typedef enum { NEVER = 0, IDLE_TO_RX_OR_TX = 1, RX_OR_TX_TO_IDLE = 2, RX_OR_TX_TO_IDLE_EVERY_4_TIME = 3 } FS_AUTOCAL_t; + typedef struct { GDOx_CFG_t gdo0_cfg:6; uint8_t gdo0_inv:1; uint8_t bit7:1; } IOCFG0_t; typedef struct { GDOx_CFG_t gdo1_cfg:6; uint8_t gdo1_inv:1; uint8_t bit7:1; } IOCFG1_t; typedef struct { GDOx_CFG_t gdo2_cfg:6; uint8_t gdo2_inv:1; uint8_t bit7:1; } IOCFG2_t; typedef struct { uint8_t fifo_thr:4; uint8_t close_in_rx:2; uint8_t adc_retention:1; uint8_t bit7:1; } FIFOTHR_t; - typedef struct { uint8_t lowByte; uint8_t highByte; } SYNC_t; + typedef struct { ADR_CHK_t adr_chk:2; uint8_t append_status:1; uint8_t crc_autoflush:1; uint8_t bit4:1; uint8_t pqt:3; } PKTCTRL1_t; + typedef struct { LENGTH_CONFIG_t length_config:2; uint8_t crc_en:1; uint8_t bit3:1; PKT_FORMAT_t pkt_format:2; uint8_t white_data:1; uint8_t bit7:1; } PKTCTRL0_t; + typedef struct { uint8_t frequ_if:5; uint8_t bit5:1; uint8_t bit76:2; } FSCTRL1_t; + typedef struct { uint8_t frequoff:8; } FSCTRL0_t; + typedef struct { uint8_t drate_e:4; uint8_t chanbw_m:2; uint8_t chanbw_e:2; } MDMCFG4_t; + typedef struct { uint8_t drate_m:8; } MDMCFG3_t; + typedef struct { SYNC_MODE_t sync_mode:3; uint8_t manchester_en:1; MOD_FORMAT_t mod_format:3; uint8_t dem_dcfilt_off:1; } MDMCFG2_t; + typedef struct { uint8_t chanspc_e:2; uint8_t bit32:2; NUM_PREAMBLE_t num_preamble:3; uint8_t fec_en:1; } MDMCFG1_t; + typedef struct { uint8_t chanspc_m:8; } MDMCFG0_t; + typedef struct { uint8_t deviation_m:3; uint8_t bit3:1; uint8_t deviation_e:3; uint8_t bit7:1; } DEVIATN_t; + typedef struct { uint8_t rx_time:3; uint8_t rx_time_qual:1; uint8_t rx_time_rssi:1; uint8_t bit765:3; } MCSM2_t; + typedef struct { TXOFF_MODE_t txoff_mode:2; RXOFF_MODE_t rxoff_mode:2; CCA_MODE_t cca_mode:2; uint8_t bit76:2; } MCSM1_t; + typedef struct { uint8_t xosc_force_on:1; uint8_t pin_ctrl_en:1; uint8_t po_timeout:2; FS_AUTOCAL_t fs_autocal:2; uint8_t bit76:2; } MCSM0_t; typedef struct { IOCFG2_t iocfg2; IOCFG1_t iocfg1; IOCFG0_t iocfg0; FIFOTHR_t fifothr; - SYNC_t sync; + uint8_t sync1; + uint8_t sync0; + uint8_t pktlen; + PKTCTRL1_t pktctrl1; + PKTCTRL0_t pktctrl0; + uint8_t addr; + uint8_t channr; + FSCTRL1_t fsctrl1; + FSCTRL0_t fsctrl0; + uint8_t frequ2; + uint8_t frequ1; + uint8_t frequ0; + MDMCFG4_t mdmcfg4; + MDMCFG3_t mdmcfg3; + MDMCFG2_t mdmcfg2; + MDMCFG1_t mdmcfg1; + MDMCFG0_t mdmcfg0; + DEVIATN_t deviatn; + MCSM2_t mcsm2; + MCSM1_t mcsm1; + MCSM0_t mcsm0; + uint8_t foccfg; + uint8_t bscfg; + uint8_t agcctrl2; + uint8_t agcctrl1; + uint8_t agcctrl0; + uint8_t worevt1; + uint8_t worevt0; + uint8_t worctrl; + uint8_t frend1; + uint8_t frend0; + uint8_t fscal3; + uint8_t fscal2; + uint8_t fscal1; + uint8_t fscal0; + uint8_t rcctrl1; + uint8_t rcctrl0; + uint8_t fstest; + uint8_t ptest; + uint8_t agctest; + uint8_t test2; + uint8_t test1; + uint8_t test0; + } Register_t; diff --git a/software/nano-644/test_2024-07-23/src/units/rtc8563.cpp b/software/nano-644/test_2024-07-23/src/units/rtc8563.cpp index ab08131..6baab35 100644 --- a/software/nano-644/test_2024-07-23/src/units/rtc8563.cpp +++ b/software/nano-644/test_2024-07-23/src/units/rtc8563.cpp @@ -15,10 +15,9 @@ void Rtc8563::handleTwiIrq () { } #ifdef __AVR_ATmega328P__ -void Modbus::init () {} -void Modbus::cleanup () {} -int8_t Modbus::run (uint8_t subtest) { return -1; } -void Modbus::handleRxByte (uint8_t b) {} +void Rtc8563::init () {} +void Rtc8563::cleanup () {} +int8_t Rtc8563::run (uint8_t subtest) { return -1; } #endif #ifdef __AVR_ATmega644P__ -- 2.39.5