Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
58b9ee41
Commit
58b9ee41
authored
8 years ago
by
Alexander Alashkin
Committed by
Cesanta Bot
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use LWIP in stm32/cube
PUBLISHED_FROM=da389ddabf96918fd1bc022e0696dbb4542c71c1
parent
d28d7a67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
58 deletions
+7
-58
mongoose.c
mongoose.c
+4
-1
mongoose.h
mongoose.h
+3
-57
No files found.
mongoose.c
View file @
58b9ee41
...
...
@@ -13727,7 +13727,9 @@ void mg_lwip_mgr_schedule_poll(struct mg_mgr *mgr);
#include <lwip/pbuf.h>
#include <lwip/tcp.h>
#if CS_PLATFORM != CS_P_STM32
#include <lwip/tcp_impl.h>
#endif
#include <lwip/udp.h>
/* Amalgamated: #include "common/cs_dbg.h" */
...
...
@@ -13949,7 +13951,8 @@ void mg_lwip_if_connect_tcp(struct mg_connection *nc,
* Lwip included in the SDKs for nRF5x chips has different type for the
* callback of `udp_recv()`
*/
#if CS_PLATFORM == CS_P_NRF51 || CS_PLATFORM == CS_P_NRF52
#if CS_PLATFORM == CS_P_NRF51 || CS_PLATFORM == CS_P_NRF52 || \
CS_PLATFORM == CS_P_STM32
static
void
mg_lwip_udp_recv_cb
(
void
*
arg
,
struct
udp_pcb
*
pcb
,
struct
pbuf
*
p
,
const
ip_addr_t
*
addr
,
u16_t
port
)
#else
...
...
This diff is collapsed.
Click to expand it.
mongoose.h
View file @
58b9ee41
...
...
@@ -1532,72 +1532,18 @@ char* inet_ntoa(struct in_addr in);
#define CS_COMMON_PLATFORMS_PLATFORM_STM32_H_
#if CS_PLATFORM == CS_P_STM32
#include <sys/types.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include <memory.h>
/*
* Fake declarations to get c_hello compiling w/out network
* TODO(alashkin): remove this during working on stm32/cude networking
*/
typedef
int
sock_t
;
struct
in_addr
{
int
s_addr
;
};
struct
sockaddr
{
int
sa_family
;
};
struct
sockaddr_in
{
int
sin_family
;
int
sin_port
;
struct
in_addr
sin_addr
;
};
#define INVALID_SOCKET -1
#define SOCK_DGRAM -1
#define SOCK_STREAM -1
#define AF_INET -1
#define to64(x) strtoll(x, NULL, 10)
#define INT64_FMT "ld"
#define INT64_FMT PRId64
#define SIZE_T_FMT "u"
#define htonl(x) (x)
#define htons(x) (x)
#define ntohs(x) (x)
#define ntohl(x) (x)
#define F_GETFL -1
#define F_SETFL -1
#define O_NONBLOCK -1
#define fcntl(x1, x2, x3) (-1)
#define socket(x1, x2, x3) (-1)
#define connect(x1, x2, x3) (-1)
#define setsockopt(x1, x2, x3, x4, x5) (-1)
#define closesocket(x)
typedef
int
socklen_t
;
#define accept(x1, x2, x3) (-1)
#define SOMAXCONN -1
#define listen(x1, x2) (-1)
#define bind(x1, x2, x3) (-1)
#define getsockname(x1, x2, x3) (-1)
#define sendto(x1, x2, x3, x4, x5, x6) (-1)
#define send(x1, x2, x3, x4) (-1)
#define recvfrom(x1, x2, x3, x4, x5, x6) (-1)
#define getsockopt(x1, x2, x3, x4, x5) (-1)
#define getpeername(x1, x2, x3) (-1)
#define recv(s, b, l, f) (-1)
#define select(x1, x2, x3, x4, x5) (0)
const
char
*
inet_ntop
(
int
af
,
const
void
*
src
,
char
*
dst
,
int
size
);
#endif
/* CS_PLATFORM == CS_P_STM32 */
#endif
/* CS_COMMON_PLATFORMS_PLATFORM_STM32_H_ */
#ifdef MG_MODULE_LINES
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment