platform/lwip: add getter for netif provided by bnep

BNEP adds an interface to lwip. Add an accessor to allow us to get
access to it.
This commit is contained in:
Peter Harper 2023-01-18 11:28:30 +00:00 committed by Matthias Ringwald
parent 052e5e4278
commit abb61bc22a
2 changed files with 11 additions and 1 deletions

View File

@ -41,7 +41,6 @@
* bnep_lwip_lwip_.c
*/
#include "lwip/netif.h"
#include "lwip/sys.h"
#include "lwip/arch.h"
#include "lwip/api.h"
@ -556,3 +555,7 @@ uint8_t bnep_lwip_connect(bd_addr_t addr, uint16_t l2cap_psm, uint16_t uuid_src,
return ERROR_CODE_SUCCESS;
}
}
struct netif *bnep_lwip_get_interface(void){
return &btstack_netif;
}

View File

@ -49,6 +49,8 @@
#include "bluetooth.h"
#include "btstack_defines.h"
#include "lwip/netif.h"
#if defined __cplusplus
extern "C" {
#endif
@ -80,6 +82,11 @@ uint8_t bnep_lwip_register_service(uint16_t service_uuid, uint16_t max_frame_siz
*/
uint8_t bnep_lwip_connect(bd_addr_t addr, uint16_t l2cap_psm, uint16_t uuid_src, uint16_t uuid_dest);
/**
* @brief Get the Bluetooth lwIP network interface
*/
struct netif *bnep_lwip_get_interface(void);
#if defined __cplusplus
}
#endif