#49 Adding support for C++
This commit is contained in:
@ -45,6 +45,10 @@
|
||||
#ifndef _DHCP_H_
|
||||
#define _DHCP_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @brief
|
||||
* @details If you want to display debug & procssing message, Define _DHCP_DEBUG_
|
||||
@ -149,4 +153,8 @@ void getDNSfromDHCP(uint8_t* ip);
|
||||
*/
|
||||
uint32_t getDHCPLeasetime(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DHCP_H_ */
|
||||
|
@ -51,6 +51,10 @@
|
||||
#ifndef _DNS_H_
|
||||
#define _DNS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
/*
|
||||
* @brief Define it for Debug & Monitor DNS processing.
|
||||
@ -98,4 +102,8 @@ int8_t DNS_run(uint8_t * dns_ip, uint8_t * name, uint8_t * ip_from_dns);
|
||||
*/
|
||||
void DNS_time_handler(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _DNS_H_ */
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef _FTPC_H_
|
||||
#define _FTPC_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
@ -116,4 +120,8 @@ char proc_ftpc(char * buf);
|
||||
int pportc(char * arg);
|
||||
uint8_t* User_Keyboard_MSG();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _FTPC_H_
|
||||
|
@ -29,6 +29,10 @@
|
||||
|
||||
/* $Id: stdio_private.h,v 1.6 2003/01/07 22:17:24 joerg_wunsch Exp $ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@ -65,3 +69,7 @@ struct __file {
|
||||
#define SCANF_MIN 1
|
||||
#define SCANF_STD 2
|
||||
#define SCANF_FLT 3
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef _FTPD_H_
|
||||
#define _FTPD_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Wiznet.
|
||||
* (c) Copyright 2002, Wiznet.
|
||||
@ -142,4 +146,9 @@ long recvfile(uint8_t s);
|
||||
#if defined(F_FILESYSTEM)
|
||||
void print_filedsc(FIL *fil);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _FTPD_H_
|
||||
|
@ -28,6 +28,9 @@
|
||||
*/
|
||||
|
||||
/* $Id: stdio_private.h,v 1.6 2003/01/07 22:17:24 joerg_wunsch Exp $ */
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
@ -65,3 +68,7 @@ struct __file {
|
||||
#define SCANF_MIN 1
|
||||
#define SCANF_STD 2
|
||||
#define SCANF_FLT 3
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -212,6 +212,11 @@ int main(void)
|
||||
#ifndef __MQTT_INTERFACE_H_
|
||||
#define __MQTT_INTERFACE_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* @brief MQTT MilliTimer handler
|
||||
* @note MUST BE register to your system 1m Tick timer handler
|
||||
@ -257,4 +262,8 @@ void w5x00_disconnect(Network*);
|
||||
void NewNetwork(Network* n, int sn);
|
||||
int ConnectNetwork(Network*, char*, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //__MQTT_INTERFACE_H_
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef _SNMP_H_
|
||||
#define _SNMP_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
// SNMP Debug Message (dump) Enable
|
||||
#define _SNMP_DEBUG_
|
||||
|
||||
@ -111,4 +115,8 @@ void SNMP_time_handler(void);
|
||||
uint32_t getSNMPTimeTick(void);
|
||||
void currentUptime(void *ptr, uint8_t *len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,6 +1,10 @@
|
||||
#ifndef _SNMP_CUSTOM_H_
|
||||
#define _SNMP_CUSTOM_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
@ -30,4 +34,8 @@ void initTable();
|
||||
/* SNMP Trap: warmStart(1) */
|
||||
void initial_Trap(uint8_t * managerIP, uint8_t * agentIP);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -8,6 +8,10 @@
|
||||
#ifndef SNTP_H_
|
||||
#define SNTP_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
@ -65,4 +69,8 @@ int8_t SNTP_run(datetime *time);
|
||||
tstamp changedatetime_to_seconds(void);
|
||||
void calcdatetime(tstamp seconds);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* SNTP_H_ */
|
||||
|
@ -2,6 +2,10 @@
|
||||
#ifndef __NETUTIL_H__
|
||||
#define __NETUTIL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define SYSTEM_LITTLE_ENDIAN
|
||||
@ -16,4 +20,8 @@ uint32_t htonl(uint32_t hostlong);
|
||||
uint32_t ntohs(uint16_t netshort);
|
||||
uint32_t ntohl(uint32_t netlong);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -7,6 +7,10 @@
|
||||
#ifndef __TFTP_H__
|
||||
#define __TFTP_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define F_APP_TFTP
|
||||
@ -90,4 +94,8 @@ int TFTP_run(void);
|
||||
void TFTP_read_request(uint32_t server_ip, uint8_t *filename);
|
||||
void tftp_timeout_handler(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__TFTP_H__ */
|
||||
|
@ -8,6 +8,10 @@
|
||||
#ifndef __HTTPPARSER_H__
|
||||
#define __HTTPPARSER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
//#define _HTTPPARSER_DEBUG_
|
||||
|
||||
#define HTTP_SERVER_PORT 80 /**< HTTP server well-known port number */
|
||||
@ -147,4 +151,8 @@ uint16_t ATOI(uint8_t * str, uint8_t base);
|
||||
void mid(char* src, char* s1, char* s2, char* sub);
|
||||
void inet_addr_(uint8_t * addr, uint8_t * ip);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end of __HTTPPARSER_H__ */
|
||||
|
@ -8,6 +8,10 @@
|
||||
#ifndef __HTTPSERVER_H__
|
||||
#define __HTTPSERVER_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
// HTTP Server debug message enable
|
||||
#define _HTTPSERVER_DEBUG_
|
||||
|
||||
@ -100,4 +104,8 @@ uint8_t display_reg_webContent_list(void);
|
||||
void httpServer_time_handler(void);
|
||||
uint32_t get_httpServer_timecount(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -12,6 +12,10 @@
|
||||
#ifndef __HTTPUTIL_H__
|
||||
#define __HTTPUTIL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern <EFBFBD><EFBFBD>C<EFBFBD><EFBFBD> {
|
||||
#endif
|
||||
|
||||
#include "httpServer.h"
|
||||
#include "httpParser.h"
|
||||
|
||||
@ -21,4 +25,8 @@ uint8_t http_post_cgi_handler(uint8_t * uri_name, st_http_request * p_http_reque
|
||||
uint8_t predefined_get_cgi_processor(uint8_t * uri_name, uint8_t * buf, uint16_t * len);
|
||||
uint8_t predefined_set_cgi_processor(uint8_t * uri_name, uint8_t * uri, uint8_t * buf, uint16_t * len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user