Make functions visible to C++ code in Arduino.

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@50 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
follower 17 years ago
parent f6b6554d57
commit 47a0ac06f0

@ -8,6 +8,10 @@
#ifndef _SOCKET_H_ #ifndef _SOCKET_H_
#define _SOCKET_H_ #define _SOCKET_H_
#ifdef __cplusplus
extern "C" {
#endif
extern uint8 socket(SOCKET s, uint8 protocol, uint16 port, uint8 flag); // Opens a socket(TCP or UDP or IP_RAW mode) extern uint8 socket(SOCKET s, uint8 protocol, uint16 port, uint8 flag); // Opens a socket(TCP or UDP or IP_RAW mode)
extern void close(SOCKET s); // Close socket extern void close(SOCKET s); // Close socket
extern uint8 connect(SOCKET s, uint8 * addr, uint16 port); // Establish TCP connection (Active connection) extern uint8 connect(SOCKET s, uint8 * addr, uint16 port); // Establish TCP connection (Active connection)
@ -19,5 +23,10 @@ extern uint16 sendto(SOCKET s, const uint8 * buf, uint16 len, uint8 * addr, uint
extern uint16 recvfrom(SOCKET s, uint8 * buf, uint16 len, uint8 * addr, uint16 *port); // Receive data (UDP/IP RAW) extern uint16 recvfrom(SOCKET s, uint8 * buf, uint16 len, uint8 * addr, uint16 *port); // Receive data (UDP/IP RAW)
extern uint16 igmpsend(SOCKET s, const uint8 * buf, uint16 len); extern uint16 igmpsend(SOCKET s, const uint8 * buf, uint16 len);
#ifdef __cplusplus
} // extern "C"
#endif
#endif #endif
/* _SOCKET_H_ */ /* _SOCKET_H_ */

@ -248,6 +248,11 @@
/********************************************************* /*********************************************************
* iinchip access function * iinchip access function
*********************************************************/ *********************************************************/
#ifdef __cplusplus
extern "C" {
#endif
extern uint8 IINCHIP_READ(uint16 addr); extern uint8 IINCHIP_READ(uint16 addr);
extern uint8 IINCHIP_WRITE(uint16 addr,uint8 data); extern uint8 IINCHIP_WRITE(uint16 addr,uint8 data);
extern uint16 wiz_read_buf(uint16 addr, uint8* buf,uint16 len); extern uint16 wiz_read_buf(uint16 addr, uint8* buf,uint16 len);
@ -300,4 +305,8 @@ extern void recv_data_processing(SOCKET s, uint8 *data, uint16 len);
extern void read_data(SOCKET s, vuint8 * src, vuint8 * dst, uint16 len); extern void read_data(SOCKET s, vuint8 * src, vuint8 * dst, uint16 len);
extern void write_data(SOCKET s, vuint8 * src, vuint8 * dst, uint16 len); extern void write_data(SOCKET s, vuint8 * src, vuint8 * dst, uint16 len);
#ifdef __cplusplus
} // extern "C"
#endif
#endif #endif

Loading…
Cancel
Save