; *************************************************************************** ; 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 .cseg ; --------------------------------------------------------------------------- ; Enqueue a DEVICE packet. ; ; IN: ; - R16: destination address ; OUT: ; - CFLAG: set if okay, clear otherwise ; MODIFIED REGS: R6, R16, R17, R18, R20 (R3, R4, R15, R19, R21, X) CPRO_EnqueueDevice: mov r6, r16 rcall COM_AllocBufferAndGetXY ; (r16, r17, r21) brcc CPRO_EnqueueDevice_error push xh push xl mov r16, r6 ldi r17, CPRO_PAYLOAD_FLAGS_UID | (6<