Skip to content

Commit aa40fa4

Browse files
comments
1 parent 57c7e1d commit aa40fa4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

gap_nrf51.go

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package bluetooth
55
/*
66
#include "ble_gap.h"
77
8+
// Workaround wrapper function to avoid pointer arguments escaping to heap
89
static inline uint32_t sd_ble_gap_adv_start_noescape(ble_gap_adv_params_t const p_adv_params) {
910
return sd_ble_gap_adv_start(&p_adv_params);
1011
}

gatts_sd.go

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package bluetooth
66
#include "ble_gap.h"
77
#include "ble_gatts.h"
88
9+
// Workaround wrapper functions which prevent pointer arguments escaping to heap
910
static inline uint32_t sd_ble_gatts_hvx_noescape(uint16_t conn_handle, uint16_t handle, uint8_t type, uint16_t offset, uint16_t len, uint8_t *p_data) {
1011
ble_gatts_hvx_params_t p_hvx_params = {handle, type, offset, &len, p_data};
1112
return sd_ble_gatts_hvx(conn_handle, &p_hvx_params);

0 commit comments

Comments
 (0)