; *************************************************************************** ; copyright : (C) 2025 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. * ; *************************************************************************** ; Hardware routine for AtTiny 84 devices .cseg ; --------------------------------------------------------------------------- ; @routine systemInitHardware ; systemInitHardware: ; set all ports as inputs and enable internal pull-up resistors ldi r16, 0xff clr r17 .ifdef PORTA out DDRA, r17 ; all input out PORTA, r16 ; enable pull-up on all .endif .ifdef PORTB out DDRB, r17 ; all input out PORTB, r16 ; enable pull-up on all .endif .ifdef PORTC out DDRC, r17 ; all input out PORTC, r16 ; enable pull-up on all .endif .ifdef PORTD out DDRD, r17 ; all input out PORTD, r16 ; enable pull-up on all .endif .ifdef PORTE out DDRE, r17 ; all input out PORTE, r16 ; enable pull-up on all .endif ret ; @end ; --------------------------------------------------------------------------- ; @routine systemSetSpeed ; systemSetSpeed: ret ; @end ; --------------------------------------------------------------------------- ; @routine systemSleep ; systemSleep: ; only modify SE, SM2, SM1 and SM0 cli inr r16, MCUCR cbr r16, (1<