Consistently use banked externally visible functions

This commit is contained in:
logicog
2026-01-17 17:54:31 +01:00
parent 892920a627
commit d1d5d5e18f
2 changed files with 10 additions and 62 deletions
+5 -5
View File
@@ -401,7 +401,7 @@ uip_init(void) __banked
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#if UIP_ACTIVE_OPEN #if UIP_ACTIVE_OPEN
__xdata struct uip_conn * __xdata struct uip_conn *
uip_connect(register __xdata uip_ipaddr_t *ripaddr, __xdata u16_t rport) uip_connect(register __xdata uip_ipaddr_t *ripaddr, __xdata u16_t rport) __banked
{ {
__xdata struct uip_conn *conn, *cconn; __xdata struct uip_conn *conn, *cconn;
@@ -467,7 +467,7 @@ uip_connect(register __xdata uip_ipaddr_t *ripaddr, __xdata u16_t rport)
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#if UIP_UDP #if UIP_UDP
struct uip_udp_conn * struct uip_udp_conn *
uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport) uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport) __banked
{ {
register struct uip_udp_conn *conn; register struct uip_udp_conn *conn;
@@ -512,7 +512,7 @@ uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport)
#endif /* UIP_UDP */ #endif /* UIP_UDP */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
uip_unlisten(u16_t port) uip_unlisten(u16_t port) __banked
{ {
for(c = 0; c < UIP_LISTENPORTS; ++c) { for(c = 0; c < UIP_LISTENPORTS; ++c) {
if(uip_listenports[c] == port) { if(uip_listenports[c] == port) {
@@ -523,7 +523,7 @@ uip_unlisten(u16_t port)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
uip_listen(u16_t port) uip_listen(u16_t port) __banked
{ {
for(c = 0; c < UIP_LISTENPORTS; ++c) { for(c = 0; c < UIP_LISTENPORTS; ++c) {
if(uip_listenports[c] == 0) { if(uip_listenports[c] == 0) {
@@ -1901,7 +1901,7 @@ htons(u16_t val)
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
void void
uip_send(register __xdata const void *data, register uint16_t len) uip_send(register __xdata const void *data, register uint16_t len) __banked
{ {
if(len > 0) { if(len > 0) {
uip_slen = len; uip_slen = len;
+5 -57
View File
@@ -447,7 +447,7 @@ void uip_setipid(u16_t id);
* *
* \param port A 16-bit port number in network byte order. * \param port A 16-bit port number in network byte order.
*/ */
void uip_listen(u16_t port); void uip_listen(u16_t port) __banked;
/** /**
* Stop listening to the specified port. * Stop listening to the specified port.
@@ -461,7 +461,7 @@ void uip_listen(u16_t port);
* *
* \param port A 16-bit port number in network byte order. * \param port A 16-bit port number in network byte order.
*/ */
void uip_unlisten(u16_t port); void uip_unlisten(u16_t port) __banked;
/** /**
* Connect to a remote host using TCP. * Connect to a remote host using TCP.
@@ -495,7 +495,7 @@ void uip_unlisten(u16_t port);
* or NULL if no connection could be allocated. * or NULL if no connection could be allocated.
* *
*/ */
__xdata struct uip_conn *uip_connect(register __xdata uip_ipaddr_t *ripaddr, __xdata u16_t port); __xdata struct uip_conn *uip_connect(register __xdata uip_ipaddr_t *ripaddr, __xdata u16_t port) __banked;
@@ -535,7 +535,7 @@ __xdata struct uip_conn *uip_connect(register __xdata uip_ipaddr_t *ripaddr, __x
* *
* \hideinitializer * \hideinitializer
*/ */
void uip_send(register __xdata const void *data, register uint16_t len); void uip_send(register __xdata const void *data, register uint16_t len) __banked;
/** /**
* The length of any incoming data that is currently avaliable (if avaliable) * The length of any incoming data that is currently avaliable (if avaliable)
@@ -763,7 +763,7 @@ void uip_send(register __xdata const void *data, register uint16_t len);
* \return The uip_udp_conn structure for the new connection or NULL * \return The uip_udp_conn structure for the new connection or NULL
* if no connection could be allocated. * if no connection could be allocated.
*/ */
struct uip_udp_conn *uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport); struct uip_udp_conn *uip_udp_new(uip_ipaddr_t *ripaddr, u16_t rport) __banked;
/** /**
* Removed a UDP connection. * Removed a UDP connection.
@@ -1538,58 +1538,6 @@ extern __xdata uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
extern __xdata uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr; extern __xdata uip_ipaddr_t uip_hostaddr, uip_netmask, uip_draddr;
#endif /* UIP_FIXEDADDR */ #endif /* UIP_FIXEDADDR */
/**
* Calculate the Internet checksum over a buffer.
*
* The Internet checksum is the one's complement of the one's
* complement sum of all 16-bit words in the buffer.
*
* See RFC1071.
*
* \param buf A pointer to the buffer over which the checksum is to be
* computed.
*
* \param len The length of the buffer over which the checksum is to
* be computed.
*
* \return The Internet checksum of the buffer.
*/
u16_t uip_chksum(u16_t *buf, u16_t len);
/**
* Calculate the IP header checksum of the packet header in uip_buf.
*
* The IP header checksum is the Internet checksum of the 20 bytes of
* the IP header.
*
* \return The IP header checksum of the IP header in the uip_buf
* buffer.
*/
u16_t uip_ipchksum(void);
/**
* Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
*
* The TCP checksum is the Internet checksum of data contents of the
* TCP segment, and a pseudo-header as defined in RFC793.
*
* \return The TCP checksum of the TCP segment in uip_buf and pointed
* to by uip_appdata.
*/
u16_t uip_tcpchksum(void);
/**
* Calculate the UDP checksum of the packet in uip_buf and uip_appdata.
*
* The UDP checksum is the Internet checksum of data contents of the
* UDP segment, and a pseudo-header as defined in RFC768.
*
* \return The UDP checksum of the UDP segment in uip_buf and pointed
* to by uip_appdata.
*/
u16_t uip_udpchksum(void);
#endif /* __UIP_H__ */ #endif /* __UIP_H__ */