Skip to content

Commit

Permalink
Put Ethernet buffers in separate source file.
Browse files Browse the repository at this point in the history
Having the Ethernet buffers in a separate source file simplifies to override their location by the user of the library.
  • Loading branch information
oliverschmidt committed Jan 19, 2025
1 parent c98fdb5 commit ceb6200
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
1 change: 1 addition & 0 deletions ip65/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ IP65OBJS=\
download_c.o \
error.o \
eth.o \
eth_buffer.o \
eth_c.o \
http.o \
http_c.o \
Expand Down
8 changes: 3 additions & 5 deletions ip65/eth.s
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@
.exportzp eth_type
.exportzp eth_data

.export eth_outp
.import eth_outp
.export eth_outp_len
.export eth_inp
.import eth_inp
.export eth_inp_len

.import cfg_mac


.bss

; input and output buffers
; input and output buffer lengths
eth_inp_len: .res 2 ; input packet length
eth_inp: .res 1518 ; space for input packet
eth_outp_len: .res 2 ; output packet length
eth_outp: .res 1518 ; space for output packet

; ethernet packet offsets
eth_dest = 0 ; offset of destination address in ethernet packet
Expand Down
32 changes: 32 additions & 0 deletions ip65/eth_buffer.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
; Ethernet packet buffers

.export eth_outp
.export eth_inp


.bss

; input and output buffers
eth_inp: .res 1518 ; space for input packet
eth_outp: .res 1518 ; space for output packet



; -- LICENSE FOR eth_buffers.s --
; The contents of this file are subject to the Mozilla Public License
; Version 1.1 (the "License"); you may not use this file except in
; compliance with the License. You may obtain a copy of the License at
; http://www.mozilla.org/MPL/
;
; Software distributed under the License is distributed on an "AS IS"
; basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
; License for the specific language governing rights and limitations
; under the License.
;
; The Original Code is ip65.
;
; The Initial Developer of the Original Code is Per Olofsson,
; [email protected].
; Portions created by the Initial Developer are Copyright (C) 2009
; Per Olofsson. All Rights Reserved.
; -- LICENSE END --

0 comments on commit ceb6200

Please sign in to comment.