diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2020-04-07 14:58:50 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2020-04-29 16:45:40 +1000 |
commit | 8119ec07652d6525beba876a29649dfe9e5fd621 (patch) | |
tree | 3682b2906e6e4c986dcf5ab98e7a89ef4e5a4642 /extmod/modbluetooth.h | |
parent | 0da47ecc93d3d12095e8d2df2ed80597f2ff4dd4 (diff) |
extmod/modbluetooth: Don't hold atomic section during mp_sched_schedule.
Because, for example, on unix the atomic section isn't re-entrant, and
mp_sched_schedule() will try to re-acquire the atomic section.
Diffstat (limited to 'extmod/modbluetooth.h')
-rw-r--r-- | extmod/modbluetooth.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extmod/modbluetooth.h b/extmod/modbluetooth.h index 376d3f5ac..96c9c4b9a 100644 --- a/extmod/modbluetooth.h +++ b/extmod/modbluetooth.h @@ -263,9 +263,9 @@ void mp_bluetooth_gattc_on_descriptor_result(uint16_t conn_handle, uint16_t hand // Notify modbluetooth that a read has completed with data (or notify/indicate data available, use `event` to disambiguate). // Note: these functions are to be called in a group protected by MICROPY_PY_BLUETOOTH_ENTER/EXIT. // _start returns the number of bytes to submit to the calls to _chunk, followed by a call to _end. -size_t mp_bluetooth_gattc_on_data_available_start(uint16_t event, uint16_t conn_handle, uint16_t value_handle, size_t data_len); +size_t mp_bluetooth_gattc_on_data_available_start(uint16_t event, uint16_t conn_handle, uint16_t value_handle, size_t data_len, mp_uint_t *atomic_state_out); void mp_bluetooth_gattc_on_data_available_chunk(const uint8_t *data, size_t data_len); -void mp_bluetooth_gattc_on_data_available_end(void); +void mp_bluetooth_gattc_on_data_available_end(mp_uint_t atomic_state); // Notify modbluetooth that a write has completed. void mp_bluetooth_gattc_on_write_status(uint16_t conn_handle, uint16_t value_handle, uint16_t status); |