; *************************************************************************** ; 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 AtMega 644P devices .cseg ; --------------------------------------------------------------------------- ; @routine systemInitHardware ; systemInitHardware: ; set all ports as inputs and enable internal pull-up resistors ldi r16, 0xff clr r17 out DDRA, r17 ; all input out PORTA, r16 ; enable pull-up on all out DDRB, r17 ; all input out PORTB, r16 ; enable pull-up on all out DDRC, r17 ; all input out PORTC, r16 ; enable pull-up on all out DDRD, r17 ; all input out PORTD, r16 ; enable pull-up on all ret ; @end ; --------------------------------------------------------------------------- ; @routine systemSetSpeed ; systemSetSpeed: ret ; @end ; --------------------------------------------------------------------------- ; @routine systemSleep ; systemSleep: ; only modify SE, SM2, SM1 and SM0 cli inr r16, SMCR cbr r16, (1<