From e97a5c072023aeb0ed3d5bf5dba29883aed6bf58 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Thu, 16 Jan 2025 17:06:54 +0100 Subject: [PATCH] avr: added missing modules for device n20. --- avr/devices/n20/defs.asm | 8 ++++++++ avr/devices/n20/main.asm | 14 ++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/avr/devices/n20/defs.asm b/avr/devices/n20/defs.asm index bc014f8..9f29d73 100644 --- a/avr/devices/n20/defs.asm +++ b/avr/devices/n20/defs.asm @@ -125,3 +125,11 @@ +; --------------------------------------------------------------------------- +; CCS 811 +; + +.equ CCS811_ADDR = 0x5a ; or 0x5b + + + diff --git a/avr/devices/n20/main.asm b/avr/devices/n20/main.asm index 8ce4396..765f501 100644 --- a/avr/devices/n20/main.asm +++ b/avr/devices/n20/main.asm @@ -65,6 +65,7 @@ ;#define MODULES_OWI_MASTER ;#define MODULES_DS18B20 #define MODULES_MOTION +#define MODULES_CCS811 ; --------------------------------------------------------------------------- ; defines for values @@ -83,6 +84,8 @@ ;.equ VALUE_ID_REED_CONF = 0x81 +.equ VALUE_ID_DEBUG = 0x7f + ; *************************************************************************** @@ -201,6 +204,10 @@ firmwareStart: rjmp main .include "modules/motion/main.asm" #endif +#ifdef MODULES_CCS811 + .include "modules/ccs811/main.asm" +#endif + ; test ;#include "modules/uart_irq/defs.asm" ;#include "modules/uart_irq/iface.asm" @@ -241,6 +248,10 @@ programRamEnd: sramSendDs18b20TempTimer: .byte 2 #endif +#ifdef MODULES_CCS811 + sramCcs811Timer: .byte 2 +#endif + ; *************************************************************************** ; data in FLASH @@ -277,6 +288,9 @@ timerList: #ifdef MODULES_DS18B20 .dw sramDs18b20Timer, Ds18b20_OnTimer, 0, 300 ; every 30s .dw sramSendDs18b20TempTimer, sendDs18b20Temp, TIMER_FLAGS_IF_ADDR, 600 ; every 60s +#endif +#ifdef MODULES_CCS811 + .dw sramCcs811Timer, CCS811_OnTimer, 0, 10 ; every 1s #endif .dw 0 ; end of list