; ***************************************************************************
; 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_UART_HW2_DEFS_H
#define AVR_MODULES_UART_HW2_DEFS_H


;.equ UART_HW2_BUFFER_SIZE = NET_BUFFERS_SIZE
.equ UART_HW2_BUFFER_SIZE = NET_BUFFERS_SIZE-1


.equ UART_HW2_MODE_IDLE            = 0
.equ UART_HW2_MODE_READING         = 1
.equ UART_HW2_MODE_SKIPPING        = 2
.equ UART_HW2_MODE_WRITING         = 3
.equ UART_HW2_MODE_NUM             = 4



.equ UART_HW2_IFACE_OFFS_BEGIN        = NET_IFACE_SIZE
.equ UART_HW2_IFACE_OFFS_MODE         = UART_HW2_IFACE_OFFS_BEGIN
.equ UART_HW2_IFACE_OFFS_MODECOUNTER  = UART_HW2_IFACE_OFFS_BEGIN+1
.equ UART_HW2_IFACE_OFFS_BUFPOS_LOW   = UART_HW2_IFACE_OFFS_BEGIN+2
.equ UART_HW2_IFACE_OFFS_BUFPOS_HIGH  = UART_HW2_IFACE_OFFS_BEGIN+3
.equ UART_HW2_IFACE_OFFS_BUFUSED      = UART_HW2_IFACE_OFFS_BEGIN+4
.equ UART_HW2_IFACE_OFFS_BUFLEFT      = UART_HW2_IFACE_OFFS_BEGIN+5
.equ UART_HW2_IFACE_OFFS_BUFFER       = UART_HW2_IFACE_OFFS_BEGIN+6

.equ UART_HW2_IFACE_SIZE              = UART_HW2_IFACE_OFFS_BUFFER+UART_HW2_BUFFER_SIZE



; comOnUart1Init          UART_HW2_FN_INIT           =0
; comOnUart1Fini          UART_HW2_FN_FINI           =1
; comOnUart1StartRx       UART_HW2_FN_STARTRX        =2
; comOnUart1StopRx        UART_HW2_FN_STOPRX         =3
; comOnUart1StartTx       UART_HW2_FN_STARTTX        =4
; comOnUart1StopTx        UART_HW2_FN_STOPTX         =5
; comOnUart1AcquireAttn   UART_HW2_FN_ACQATTN        =6
; comOnUart1SetAttnInput  UART_HW2_FN_SETATTNINPUT   =7
; comOnUart1SetAttnLow    UART_HW2_FN_SETATTNLOW     =8
; comOnUart1IsAttnLow     UART_HW2_FN_ISATTNLOW      =9


#endif ; AVR_MODULES_UART_HW2_DEFS_H

