; *************************************************************************** ; 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. * ; *************************************************************************** #ifndef AVR_MODULES_COM2W_COM2W0_H #define AVR_MODULES_COM2W_COM2W0_H .dseg com2w0_iface: .byte COM2W_IFACE_SIZE .cseg ; --------------------------------------------------------------------------- ; @routine COM2W0_Init ; ; @clobbers COM2W0_Init: ldi yl, LOW(com2w0_iface) ldi yh, HIGH(com2w0_iface) rcall NET_Interface_Init ; (R16, R17, X) ldi r16, COM2W_MODE_IDLE rcall com2wSetMode ; (R17) ; setup CLK line (as input, disable internal pull-up resistor) cbi COM_CLK0_DDR, COM_CLK0_PIN ; set CLK as input .ifdef COM_CLK0_PUE inr r16, COM_CLK0_PUE cbr r16, (1<