diff --git a/avr/att84_temp1.asm b/avr/att84_temp1.asm index 2ecf507..3f189b4 100644 --- a/avr/att84_temp1.asm +++ b/avr/att84_temp1.asm @@ -1,3 +1,15 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + + ; *************************************************************************** ; Source file for temperature sensor node on AtTiny 84 ; diff --git a/avr/bmp280.asm b/avr/bmp280.asm index 80d5744..055ce01 100644 --- a/avr/bmp280.asm +++ b/avr/bmp280.asm @@ -1,7 +1,12 @@ ; *************************************************************************** -; BMP280 module -; (c) 2023 Martin Preuss +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de ; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + ; *************************************************************************** diff --git a/avr/com.asm b/avr/com.asm index 900e5e1..0706d97 100644 --- a/avr/com.asm +++ b/avr/com.asm @@ -1,3 +1,11 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** diff --git a/avr/com_buffer.asm b/avr/com_buffer.asm index a7931f2..ef40ab9 100644 --- a/avr/com_buffer.asm +++ b/avr/com_buffer.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; code diff --git a/avr/com_crc.asm b/avr/com_crc.asm index 7ca2891..3eac6a4 100644 --- a/avr/com_crc.asm +++ b/avr/com_crc.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + #define COM_USE_CRC8 1 diff --git a/avr/com_lowlevel.asm b/avr/com_lowlevel.asm index 95db07a..f471e9a 100644 --- a/avr/com_lowlevel.asm +++ b/avr/com_lowlevel.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; code diff --git a/avr/com_recv.asm b/avr/com_recv.asm index 1dd2e93..59ceee5 100644 --- a/avr/com_recv.asm +++ b/avr/com_recv.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; code diff --git a/avr/com_send.asm b/avr/com_send.asm index bb3e744..bb5323d 100644 --- a/avr/com_send.asm +++ b/avr/com_send.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; code diff --git a/avr/com_twi.asm b/avr/com_twi.asm index 66b43ad..7f8291e 100644 --- a/avr/com_twi.asm +++ b/avr/com_twi.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; code diff --git a/avr/comproto.asm b/avr/comproto.asm index 49f9d85..57ed758 100644 --- a/avr/comproto.asm +++ b/avr/comproto.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + diff --git a/avr/comproto_addr.asm b/avr/comproto_addr.asm index 81daa5b..c155e3b 100644 --- a/avr/comproto_addr.asm +++ b/avr/comproto_addr.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; This sub-module contains code for cooperative address management. ; Because the network of nodes doen't have a central control unit the nodes diff --git a/avr/comproto_debug.asm b/avr/comproto_debug.asm index 77c6af4..650b8d8 100644 --- a/avr/comproto_debug.asm +++ b/avr/comproto_debug.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; code diff --git a/avr/comproto_device.asm b/avr/comproto_device.asm index 645e67d..d2d4afd 100644 --- a/avr/comproto_device.asm +++ b/avr/comproto_device.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; code diff --git a/avr/comproto_stats.asm b/avr/comproto_stats.asm index 0478a32..4800678 100644 --- a/avr/comproto_stats.asm +++ b/avr/comproto_stats.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; code diff --git a/avr/comproto_values.asm b/avr/comproto_values.asm index e4b0e13..4f8a36c 100644 --- a/avr/comproto_values.asm +++ b/avr/comproto_values.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; code diff --git a/avr/defs.asm b/avr/defs.asm index e34c781..b754be0 100644 --- a/avr/defs.asm +++ b/avr/defs.asm @@ -1,3 +1,11 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** diff --git a/avr/flash.asm b/avr/flash.asm index e911bc1..01f12e7 100644 --- a/avr/flash.asm +++ b/avr/flash.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** diff --git a/avr/flashproto.asm b/avr/flashproto.asm index 8a07459..c0c4240 100644 --- a/avr/flashproto.asm +++ b/avr/flashproto.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + diff --git a/avr/lcd.asm b/avr/lcd.asm index ab5aeb4..13a47b8 100644 --- a/avr/lcd.asm +++ b/avr/lcd.asm @@ -1,7 +1,14 @@ ; *************************************************************************** -; LCD module -; (c) 2023 Martin Preuss +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de ; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; Some code in this module is based on C-code in Tiny4kOLED (https://github.com/datacute/Tiny4kOLED/tree/master/src) ; by Stephen Denne (MIT license), rewritten in AVR assembler ; diff --git a/avr/main.asm b/avr/main.asm index bf47593..b1bfe32 100644 --- a/avr/main.asm +++ b/avr/main.asm @@ -1,3 +1,12 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + .cseg diff --git a/avr/ringbuffer.asm b/avr/ringbuffer.asm index e6b572d..7b953cd 100644 --- a/avr/ringbuffer.asm +++ b/avr/ringbuffer.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + .equ RINGBUFFER_OFFS_MAXSIZE = 0 diff --git a/avr/si7021.asm b/avr/si7021.asm index 6a387ee..d2dc863 100644 --- a/avr/si7021.asm +++ b/avr/si7021.asm @@ -1,7 +1,12 @@ ; *************************************************************************** -; SI7021 module -; (c) 2023 Martin Preuss +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de ; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + ; *************************************************************************** diff --git a/avr/test1.asm b/avr/test1.asm index 632345a..9890735 100644 --- a/avr/test1.asm +++ b/avr/test1.asm @@ -1,3 +1,15 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + + .nolist .include "include/tn84def.inc" ; Define device ATtiny84 .list diff --git a/avr/timer.asm b/avr/timer.asm index db8fce7..3608dff 100644 --- a/avr/timer.asm +++ b/avr/timer.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** @@ -213,22 +224,29 @@ timerCallFirstOnEveryHandlers: ldi zl, LOW(timerTable*2) ldi zh, HIGH(timerTable*2) + ldi xl, LOW(timerModuleDerivedCounters) ; points to first counter: timerModuleCounterFor10s + ldi xh, HIGH(timerModuleDerivedCounters) timerCallFirstOnEveryHandlers_loop: - lpm r17, Z ; overflow value - tst r17 ; 0? - breq timerCallFirstOnEveryHandlers_done ; yes: end of list - adiw zh:zl, 2 ; skip to handler address - lpm r20, Z+ ; read handler address - lpm r21, Z+ - push r16 ; call handler - push zl - push zh - rcall timerCallR21R20 - pop zh - pop zl - pop r16 - dec r16 + lpm r17, Z ; overflow value + tst r17 ; 0? + breq timerCallFirstOnEveryHandlers_done ; yes: end of list + adiw zh:zl, 2 ; skip to handler address + lpm r20, Z+ ; read handler address + lpm r21, Z+ + push r16 ; call handler + push xl + push xh + push zl + push zh + ld r16, X+ ; current counter value + rcall timerCallR21R20 + pop zh + pop zl + pop xh + pop xl + pop r16 + dec r16 brne timerCallFirstOnEveryHandlers_loop timerCallFirstOnEveryHandlers_done: diff --git a/avr/twimaster.asm b/avr/twimaster.asm index 8ad6c09..72c5a9d 100644 --- a/avr/twimaster.asm +++ b/avr/twimaster.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; *************************************************************************** ; defines @@ -212,7 +223,7 @@ twiReadBit_clockReleased: ; --------------------------------------------------------------------------- ; twiWriteBit ; -; Write a bit from the line (handling SCL and SDA line and possible clock stretching). +; Write a bit to the line (handling SCL and SDA line and possible clock stretching). ; ; IN: ; - R16: bit to send (either 0x00 or 0x01) diff --git a/avr/utils.asm b/avr/utils.asm index ae4b810..e087c22 100644 --- a/avr/utils.asm +++ b/avr/utils.asm @@ -1,3 +1,14 @@ +; *************************************************************************** +; copyright : (C) 2023 by Martin Preuss +; email : martin@libchipcard.de +; +; *************************************************************************** +; * This file is part of the project "AqHome". * +; * Please see toplevel file COPYING of that project for license details. * +; *************************************************************************** + + + ; ***************************************************************************