; *************************************************************************** ; 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. * ; *************************************************************************** ; *************************************************************************** ; code .cseg ; --------------------------------------------------------------------------- ; @routine ioRawInit ; Send a message ; ; @clobbers r16, r17 ioRawInit: ; set baudrate .if clock == 8000000 ldi r16, 25 ; (19.2Kb/s at 8MHz) ldi r17, 0 .endif .if clock == 1000000 ldi r16, 3 ; (19.2Kb/s at 1MHz) ldi r17, 0 .endif sts UBRR1H, r17 sts UBRR1L, r16 ; set character format (asynchronous USART, 8-bit, one stop bit, no parity) ldi r16, (3< 7 per loop, max about 1000 clc ; 1 ret ; 4 ioRawWaitForData_gotit: sec ; 1 ret ; 4 ; @end