avr: added NET_Interface_AddOrReleaseOutMsg and NET_Interface_GetNumOfOutgoingMsgNums
This commit is contained in:
@@ -58,6 +58,28 @@ NET_Interface_AddOutgoingMsgNum:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine NET_Interface_AddOrReleaseOutMsg @global
|
||||
;
|
||||
; Try to add given msg to the given interface's list of outbound messages,
|
||||
; if that fails release the given message (@ref NET_Buffer_ReleaseByNum)
|
||||
;
|
||||
; @return CFLAG on success, cleared on error
|
||||
; @param r16 byte to write
|
||||
; @param Y pointer to start of interface data
|
||||
; @clobbers R16, R17, R18, X
|
||||
|
||||
NET_Interface_AddOrReleaseOutMsg:
|
||||
rcall NET_Interface_AddOutgoingMsgNum ; (R17, R18, X)
|
||||
brcs NET_Interface_AddOrReleaseOutMsg_ret
|
||||
rcall NET_Buffer_ReleaseByNum ; (R16, X)
|
||||
clc
|
||||
NET_Interface_AddOrReleaseOutMsg_ret:
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine NET_Interface_GetNextOutgoingMsgNum @global
|
||||
;
|
||||
@@ -98,6 +120,21 @@ NET_Interface_PeekNextOutgoingMsgNum:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine NET_Interface_GetNumOfOutgoingMsgNums @global
|
||||
;
|
||||
; @return CFLAG on success, cleared on error
|
||||
; @return R16 byte read
|
||||
; @param Y pointer to start of interface data
|
||||
; @clobbers none
|
||||
|
||||
NET_Interface_GetNumOfOutgoingMsgNums:
|
||||
ldd r16, Y+(NET_IFACE_OFFS_OUTMSGRINGBUF+RINGBUFFERY_OFFS_USED)
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine NET_Interface_IncCounter16 @global
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user