mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 22:20:37 +00:00
mesh: mvoe mesh_transport_pdu_t allocator/free to lower transport
This commit is contained in:
parent
bcf4b18c55
commit
d5f4cd5b52
@ -716,3 +716,17 @@ void mesh_lower_transport_init(){
|
||||
void mesh_lower_transport_set_higher_layer_handler(void (*pdu_handler)( mesh_transport_callback_type_t callback_type, mesh_transport_status_t status, mesh_pdu_t * pdu)){
|
||||
higher_layer_handler = pdu_handler;
|
||||
}
|
||||
|
||||
// buffer pool
|
||||
mesh_transport_pdu_t * mesh_transport_pdu_get(void){
|
||||
mesh_transport_pdu_t * transport_pdu = btstack_memory_mesh_transport_pdu_get();
|
||||
if (transport_pdu) {
|
||||
memset(transport_pdu, 0, sizeof(mesh_transport_pdu_t));
|
||||
transport_pdu->pdu_header.pdu_type = MESH_PDU_TYPE_TRANSPORT;
|
||||
}
|
||||
return transport_pdu;
|
||||
}
|
||||
|
||||
void mesh_transport_pdu_free(mesh_transport_pdu_t * transport_pdu){
|
||||
btstack_memory_mesh_transport_pdu_free(transport_pdu);
|
||||
}
|
||||
|
@ -941,17 +941,3 @@ static void mesh_transport_run(void){
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// buffer pool
|
||||
mesh_transport_pdu_t * mesh_transport_pdu_get(void){
|
||||
mesh_transport_pdu_t * transport_pdu = btstack_memory_mesh_transport_pdu_get();
|
||||
if (transport_pdu) {
|
||||
memset(transport_pdu, 0, sizeof(mesh_transport_pdu_t));
|
||||
transport_pdu->pdu_header.pdu_type = MESH_PDU_TYPE_TRANSPORT;
|
||||
}
|
||||
return transport_pdu;
|
||||
}
|
||||
|
||||
void mesh_transport_pdu_free(mesh_transport_pdu_t * transport_pdu){
|
||||
btstack_memory_mesh_transport_pdu_free(transport_pdu);
|
||||
}
|
||||
|
@ -79,10 +79,6 @@ void mesh_upper_transport_send_access_pdu(mesh_pdu_t * pdu);
|
||||
|
||||
void mesh_upper_transport_pdu_free(mesh_pdu_t * pdu);
|
||||
|
||||
// allocator
|
||||
mesh_transport_pdu_t * mesh_transport_pdu_get(void);
|
||||
void mesh_transport_pdu_free(mesh_transport_pdu_t * transport_pdu);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* end of extern "C" */
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user