Responsible for receiving data from remote.
More...
#include <furi.h>
#include "../../service/target/ble_service_target.h"
Go to the source code of this file.
|
|
typedef struct BleReceiverContext | BleReceiverContext |
| | Opaque BleReceiverContext type declaration.
|
| |
Responsible for receiving data from remote.
◆ ble_receiver_alloc()
Allocate receiver instance.
- Parameters
-
| [in] | peer_addr | address of the connected remote device |
- Returns
- pointer to created instance
◆ ble_receiver_enable()
Enables receiver.
- Parameters
-
| [in] | instance | receiver instance |
◆ ble_receiver_free()
Free receiver instance.
- Parameters
-
| [in] | instance | receiver instance to be destroyed |
◆ ble_receiver_process_write_request()
| bool ble_receiver_process_write_request |
( |
BleReceiverContext * | instance, |
|
|
BleServiceObject * | service, |
|
|
const uint8_t | char_index, |
|
|
const uint16_t | handle, |
|
|
const size_t | data_size, |
|
|
const void * | data ) |
Processes write request from nwp.
- Parameters
-
| [in] | instance | receiver instance |
| [in] | service | service which characteristic is requested |
| [in] | char_index | index of characteristic in service |
| [in] | handle | handle of characteristic |
| [in] | data_size | size of data nwp wants to write into characteristic |
| [in] | data | data nwp wants to write into characteristic |
- Returns
- true if data were written, otherwise false
◆ ble_receiver_transfer_confirm()
| void ble_receiver_transfer_confirm |
( |
BleReceiverContext * | instance, |
|
|
uint16_t | handle, |
|
|
uint8_t | cccd_value ) |
Send confirmation that write request is done.
- Parameters
-
| [in] | instance | receiver instance |
| [in] | handle | handle of characteristic |
| [in] | cccd_value | property flags for characteristic |