mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-27 23:37:25 +00:00
lwip: fix compile in OS config
This commit is contained in:
parent
81624f6562
commit
0be141ae50
@ -236,7 +236,11 @@ static void network_setup(void){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// init lwIP stack
|
// init lwIP stack
|
||||||
|
#if NO_SYS
|
||||||
lwip_init();
|
lwip_init();
|
||||||
|
#else
|
||||||
|
tcpip_init(NULL, NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
// start DHCP Server
|
// start DHCP Server
|
||||||
dhserv_init(&dhcp_config);
|
dhserv_init(&dhcp_config);
|
||||||
|
@ -50,8 +50,12 @@
|
|||||||
#include "lwip/ip.h"
|
#include "lwip/ip.h"
|
||||||
#include "lwip/dhcp.h"
|
#include "lwip/dhcp.h"
|
||||||
#include "lwip/sockets.h"
|
#include "lwip/sockets.h"
|
||||||
#include "netif/etharp.h"
|
|
||||||
#include "lwip/prot/dhcp.h"
|
#include "lwip/prot/dhcp.h"
|
||||||
|
#include "netif/etharp.h"
|
||||||
|
|
||||||
|
#if LWIP_IPV6
|
||||||
|
#include "lwip/ethip6.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "bnep_lwip.h"
|
#include "bnep_lwip.h"
|
||||||
|
|
||||||
@ -88,10 +92,12 @@ static btstack_ring_buffer_t bnep_lwip_outgoing_queue;
|
|||||||
static QueueHandle_t bnep_lwip_outgoing_queue;
|
static QueueHandle_t bnep_lwip_outgoing_queue;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if NO_SYS
|
||||||
|
static btstack_timer_source_t bnep_lwip_timer;
|
||||||
|
#endif
|
||||||
|
|
||||||
// bnep data
|
// bnep data
|
||||||
static uint16_t bnep_cid;
|
static uint16_t bnep_cid;
|
||||||
static btstack_timer_source_t bnep_lwip_timer;
|
|
||||||
static btstack_packet_handler_t client_handler;
|
static btstack_packet_handler_t client_handler;
|
||||||
|
|
||||||
// next packet only modified from btstack context
|
// next packet only modified from btstack context
|
||||||
@ -281,6 +287,7 @@ static void bnep_lwip_outgoing_process(void * arg){
|
|||||||
bnep_request_can_send_now_event(bnep_cid);
|
bnep_request_can_send_now_event(bnep_cid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if NO_SYS
|
||||||
static void bnep_lwip_timeout_handler(btstack_timer_source_t * ts){
|
static void bnep_lwip_timeout_handler(btstack_timer_source_t * ts){
|
||||||
|
|
||||||
// process lwIP timers
|
// process lwIP timers
|
||||||
@ -293,10 +300,12 @@ static void bnep_lwip_timeout_handler(btstack_timer_source_t * ts){
|
|||||||
btstack_run_loop_set_timer(ts, LWIP_TIMER_INTERVAL_MS);
|
btstack_run_loop_set_timer(ts, LWIP_TIMER_INTERVAL_MS);
|
||||||
btstack_run_loop_add_timer(ts);
|
btstack_run_loop_add_timer(ts);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void bnep_lwip_send_packet(void){
|
static void bnep_lwip_send_packet(void){
|
||||||
if (bnep_lwip_outgoing_next_packet == NULL){
|
if (bnep_lwip_outgoing_next_packet == NULL){
|
||||||
log_error("CAN SEND NOW, but now packet queued");
|
log_error("CAN SEND NOW, but now packet queued");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// flatten into our buffer
|
// flatten into our buffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user