mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-30 15:32:41 +00:00
mesh: use mesh_lower_transport_send_pdu instead of send segmented/unsegmented
This commit is contained in:
parent
0342f50b86
commit
2343b7d3c2
@ -598,17 +598,6 @@ static void mesh_lower_transport_send_segmented_pdu_once(mesh_transport_pdu_t *t
|
||||
mesh_lower_transport_send_next_segment();
|
||||
}
|
||||
|
||||
void mesh_lower_transport_send_segmented_pdu(mesh_transport_pdu_t *transport_pdu){
|
||||
// queue transport (= segmented pdu)
|
||||
btstack_linked_list_add_tail(&lower_transport_outgoing, (btstack_linked_item_t*) transport_pdu);
|
||||
mesh_lower_transport_run();
|
||||
}
|
||||
|
||||
void mesh_lower_transport_send_unsegmented_pdu(mesh_network_pdu_t *network_pdu){
|
||||
btstack_linked_list_add_tail(&lower_transport_outgoing, (btstack_linked_item_t*) network_pdu);
|
||||
mesh_lower_transport_run();
|
||||
}
|
||||
|
||||
void mesh_lower_transport_send_pdu(mesh_pdu_t *pdu){
|
||||
btstack_linked_list_add_tail(&lower_transport_outgoing, (btstack_linked_item_t*) pdu);
|
||||
mesh_lower_transport_run();
|
||||
|
@ -103,8 +103,6 @@ uint32_t mesh_lower_transport_peek_seq(void);
|
||||
|
||||
void mesh_lower_transport_message_processed_by_higher_layer(mesh_pdu_t * pdu);
|
||||
|
||||
void mesh_lower_transport_send_unsegmented_pdu(mesh_network_pdu_t *network_pdu);
|
||||
void mesh_lower_transport_send_segmented_pdu(mesh_transport_pdu_t *transport_pdu);
|
||||
void mesh_lower_transport_send_pdu(mesh_pdu_t * pdu);
|
||||
|
||||
// test
|
||||
|
@ -167,7 +167,7 @@ static uint8_t mesh_network_send(uint16_t netkey_index, uint8_t ctl, uint8_t ttl
|
||||
mesh_network_setup_pdu(network_pdu, netkey_index, network_key->nid, ctl, ttl, seq, src, dest, transport_pdu_data, transport_pdu_len);
|
||||
|
||||
// send network_pdu
|
||||
mesh_lower_transport_send_unsegmented_pdu(network_pdu);
|
||||
mesh_lower_transport_send_pdu((mesh_pdu_t *) network_pdu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -513,7 +513,7 @@ static void mesh_upper_transport_send_unsegmented_access_pdu_ccm(void * arg){
|
||||
mesh_print_hex("TransMIC", &upper_transport_pdu[upper_transport_pdu_len], 4);
|
||||
network_pdu->len += 4;
|
||||
// send network pdu
|
||||
mesh_lower_transport_send_unsegmented_pdu(network_pdu);
|
||||
mesh_lower_transport_send_pdu((mesh_pdu_t*) network_pdu);
|
||||
}
|
||||
|
||||
static void mesh_upper_transport_send_segmented_access_pdu_ccm(void * arg){
|
||||
@ -525,7 +525,7 @@ static void mesh_upper_transport_send_segmented_access_pdu_ccm(void * arg){
|
||||
btstack_crypto_ccm_get_authentication_value(&ccm, &transport_pdu->data[transport_pdu->len]);
|
||||
mesh_print_hex("TransMIC", &transport_pdu->data[transport_pdu->len], transport_pdu->transmic_len);
|
||||
transport_pdu->len += transport_pdu->transmic_len;
|
||||
mesh_lower_transport_send_segmented_pdu(transport_pdu);
|
||||
mesh_lower_transport_send_pdu((mesh_pdu_t*) transport_pdu);
|
||||
}
|
||||
|
||||
uint8_t mesh_upper_transport_setup_unsegmented_control_pdu(mesh_network_pdu_t * network_pdu, uint16_t netkey_index, uint8_t ttl, uint16_t src, uint16_t dest, uint8_t opcode,
|
||||
@ -665,11 +665,11 @@ uint8_t mesh_upper_transport_setup_segmented_access_pdu(mesh_transport_pdu_t * t
|
||||
}
|
||||
|
||||
void mesh_upper_transport_send_unsegmented_control_pdu(mesh_network_pdu_t * network_pdu){
|
||||
mesh_lower_transport_send_unsegmented_pdu(network_pdu);
|
||||
mesh_lower_transport_send_pdu((mesh_pdu_t*) network_pdu);
|
||||
}
|
||||
|
||||
void mesh_upper_transport_send_segmented_control_pdu(mesh_transport_pdu_t * transport_pdu){
|
||||
mesh_lower_transport_send_segmented_pdu(transport_pdu);
|
||||
mesh_lower_transport_send_pdu((mesh_pdu_t*) transport_pdu);
|
||||
}
|
||||
|
||||
void mesh_upper_transport_send_unsegmented_access_pdu_digest(void * arg){
|
||||
|
Loading…
x
Reference in New Issue
Block a user