Skip to content

Commit 0dfb05a

Browse files
committed
Recompile target
1 parent 582bc89 commit 0dfb05a

File tree

40 files changed

+14769
-240
lines changed

40 files changed

+14769
-240
lines changed

cores/arduino/mbed/connectivity/FEATURE_BLE/include/ble/GattServer.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,18 +316,14 @@ class GattServer {
316316
*
317317
* The process assigns a unique attribute handle to all the elements added
318318
* into the attribute table. This handle is an ID that must be used for
319-
* subsequent interactions with the elements.
319+
* subsequent interractions with the elements.
320320
*
321321
* @note There is no mirror function that removes a single service.
322322
* Application code can remove all the registered services by calling
323323
* reset().
324324
*
325-
* @attention GattServer allocates its own memory for all the attributes.
326-
* The GattServer will set the handles on the service passed in and the
327-
* characteristics it contains. You may record the handles you want to
328-
* interact with in the future. After that the service and characteristics
329-
* you passed in as the parameter may be freed. To write to the GattServer
330-
* instances of the characteristics you have to use the saved handles.
325+
* @attention Service, characteristics and descriptors objects registered
326+
* within the GattServer must remain reachable until reset() is called.
331327
*
332328
* @param[in] service The service to be added; attribute handle of services,
333329
* characteristic and characteristic descriptors are updated by the

cores/arduino/mbed/connectivity/FEATURE_BLE/include/ble/gatt/GattCallbackParamTypes.h

Lines changed: 36 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -213,101 +213,61 @@ enum GattAuthCallbackReply_t {
213213
*/
214214
AUTH_CALLBACK_REPLY_SUCCESS = 0x00,
215215

216-
/** The attribute handle given was not valid on this server. */
217-
AUTH_CALLBACK_REPLY_ATTERR_INVALID_HANDLE = 0x01,
218-
219-
/** The attribute cannot be read. */
220-
AUTH_CALLBACK_REPLY_ATTERR_READ_NOT_PERMITTED = 0x02,
221-
222-
/** The attribute cannot be written. */
223-
AUTH_CALLBACK_REPLY_ATTERR_WRITE_NOT_PERMITTED = 0x03,
224-
225-
/** The attribute PDU was invalid. */
226-
AUTH_CALLBACK_REPLY_ATTERR_INVALID_PDU = 0x04,
227-
228-
/** The attribute requires authentication before it can be read or
229-
* written.
216+
/**
217+
* ATT Error: Invalid attribute handle.
230218
*/
231-
AUTH_CALLBACK_REPLY_ATTERR_INSUFFICIENT_AUTHENTICATION = 0x05,
232-
AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHENTICATION = 0x05,
219+
AUTH_CALLBACK_REPLY_ATTERR_INVALID_HANDLE = 0x0101,
233220

234-
/** Attribute server does not support the request received from the
235-
* client.
221+
/**
222+
* ATT Error: Read not permitted.
236223
*/
237-
AUTH_CALLBACK_REPLY_ATTERR_REQUEST_NOT_SUPPORTED = 0x06,
238-
239-
/** Offset specified was past the end of the attribute. */
240-
AUTH_CALLBACK_REPLY_ATTERR_INVALID_OFFSET = 0x07,
224+
AUTH_CALLBACK_REPLY_ATTERR_READ_NOT_PERMITTED = 0x0102,
241225

242-
/** The attribute requires authorization before it can be read or written. */
243-
AUTH_CALLBACK_REPLY_ATTERR_INSUFFICIENT_AUTHORIZATION = 0x08,
244-
AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION = 0x08,
245-
246-
/** Too many prepare writes have been queued. */
247-
AUTH_CALLBACK_REPLY_ATTERR_PREPARE_QUEUE_FULL = 0x09,
248-
249-
/** No attribute found within the given attribute handle range. */
250-
AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_FOUND = 0x0A,
251-
252-
/** The attribute cannot be read using the Read Blob Request. */
253-
AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_LONG = 0x0B,
254-
255-
/** The Encryption Key Size used for encrypting this link is
256-
* insufficient.
226+
/**
227+
* ATT Error: Write not permitted.
257228
*/
258-
AUTH_CALLBACK_REPLY_ATTERR_INSUFFICIENT_ENCRYPTION_KEY_SIZE = 0x0C,
259-
260-
/** The attribute value length is invalid for the operation. */
261-
AUTH_CALLBACK_REPLY_ATTERR_INVALID_ATTRIBUTE_VALUE_LENGTH = 0x0D,
262-
AUTH_CALLBACK_REPLY_ATTERR_INVALID_ATT_VAL_LENGTH = 0x0D,
229+
AUTH_CALLBACK_REPLY_ATTERR_WRITE_NOT_PERMITTED = 0x0103,
263230

264-
/** The attribute request that was requested has encountered an error
265-
* that was unlikely, and therefore could not be completed as requested.
231+
/**
232+
* ATT Error: Authenticated link required.
266233
*/
267-
AUTH_CALLBACK_REPLY_ATTERR_UNLIKELY_ERROR = 0x0E,
234+
AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHENTICATION = 0x0105,
268235

269-
/** The attribute requires encryption before it can be read or written. */
270-
AUTH_CALLBACK_REPLY_ATTERR_INSUFFICIENT_ENCRYPTION = 0x0F,
271-
272-
/** The attribute type is not a supported grouping attribute as defined
273-
* by a higher layer specification.
236+
/**
237+
* ATT Error: The specified offset was past the end of the attribute.
274238
*/
275-
AUTH_CALLBACK_REPLY_ATTERR_UNSUPPORTED_GROUP_TYPE = 0x10,
276-
277-
/** Insufficient Resources to complete the request. */
278-
AUTH_CALLBACK_REPLY_ATTERR_INSUFFICIENT_RESOURCES = 0x11,
279-
AUTH_CALLBACK_REPLY_ATTERR_INSUF_RESOURCES = 0x11,
280-
281-
/* 0x12 - 0x7F => reserved for future use */
239+
AUTH_CALLBACK_REPLY_ATTERR_INVALID_OFFSET = 0x0107,
282240

283-
/* 0x80 - 0x9F => Application Error */
284-
285-
/* 0xA0 0xDF => Reserved for future use */
241+
/**
242+
* ATT Error: Used in ATT as "insufficient authorization".
243+
*/
244+
AUTH_CALLBACK_REPLY_ATTERR_INSUF_AUTHORIZATION = 0x0108,
286245

287-
/* 0xE0 - 0xFF Common Profile and service Error Codes */
246+
/**
247+
* ATT Error: Used in ATT as "prepare queue full".
248+
*/
249+
AUTH_CALLBACK_REPLY_ATTERR_PREPARE_QUEUE_FULL = 0x0109,
288250

289-
/** The Write Request Rejected error code is used when a requested write
290-
* operation cannot be fulfilled for reasons other than permissions.
251+
/**
252+
* ATT Error: Used in ATT as "attribute not found".
291253
*/
292-
AUTH_CALLBACK_REPLY_ATTERR_WRITE_REQUEST_REJECTED = 0xFC,
254+
AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_FOUND = 0x010A,
293255

294-
/** The Client Characteristic Configuration Descriptor Improperly
295-
* Configured error code is used when a Client Characteristic
296-
* Configuration descriptor is not configured according to the
297-
* requirements of the profile or service.
256+
/**
257+
* ATT Error: Attribute cannot be read or written using read/write blob
258+
* requests.
298259
*/
299-
AUTH_CALLBACK_REPLY_ATTERR_CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR_IMPROPERLY_CONFIGURED = 0xFD,
260+
AUTH_CALLBACK_REPLY_ATTERR_ATTRIBUTE_NOT_LONG = 0x010B,
300261

301-
/** The Procedure Already in Progress error code is used when a profile
302-
* or service request cannot be serviced because an operation that has
303-
* been previously triggered is still in progress
262+
/**
263+
* ATT Error: Invalid value size.
304264
*/
305-
AUTH_CALLBACK_REPLY_ATTERR_PROCEDURE_ALREADY_IN_PROGRESS = 0xFE,
265+
AUTH_CALLBACK_REPLY_ATTERR_INVALID_ATT_VAL_LENGTH = 0x010D,
306266

307-
/** The Out of Range error code is used when an attribute value is out
308-
* of range as defined by a profile or service specification.
267+
/**
268+
* ATT Error: Encrypted link required.
309269
*/
310-
AUTH_CALLBACK_REPLY_ATTERR_OUT_OF_RANGE = 0xFF,
270+
AUTH_CALLBACK_REPLY_ATTERR_INSUF_RESOURCES = 0x0111,
311271
};
312272

313273
/**

cores/arduino/mbed/connectivity/FEATURE_BLE/source/cordio/source/GattServerImpl.h

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -185,19 +185,6 @@ class GattServer : public PalSigningMonitor {
185185
GapAdvertisingData::Appearance getAppearance();
186186

187187
#endif // Disabled until reworked and reintroduced to GattServer API
188-
private:
189-
struct char_auth_callback {
190-
/** The registered callback handler for read authorization reply. */
191-
FunctionPointerWithContext<GattReadAuthCallbackParams *> read_cb;
192-
/** The registered callback handler for write authorization reply. */
193-
FunctionPointerWithContext<GattWriteAuthCallbackParams *> write_cb;
194-
/** built in list */
195-
char_auth_callback *_next = nullptr;
196-
/** Characteristic handle the callbacks belong to. */
197-
ble::attribute_handle_t handle = 0;
198-
/** security requirement of update operations */
199-
ble::att_security_requirement_t update_security = ble::att_security_requirement_t::NONE;
200-
};
201188

202189
public:
203190
/**
@@ -287,7 +274,7 @@ class GattServer : public PalSigningMonitor {
287274

288275
void *alloc_block(size_t block_size);
289276

290-
char_auth_callback *get_auth_callback(uint16_t value_handle);
277+
GattCharacteristic *get_auth_char(uint16_t value_handle);
291278

292279
bool get_cccd_index_by_cccd_handle(GattAttribute::Handle_t cccd_handle, uint8_t &idx) const;
293280

@@ -367,8 +354,8 @@ class GattServer : public PalSigningMonitor {
367354
uint16_t cccd_handles[MBED_CONF_BLE_API_IMPLEMENTATION_MAX_CCCD_COUNT];
368355
uint8_t cccd_cnt;
369356

370-
char_auth_callback *_auth_callbacks;
371-
uint8_t _auth_callbacks_count;
357+
GattCharacteristic *_auth_char[MBED_CONF_BLE_API_IMPLEMENTATION_MAX_CHARACTERISTIC_AUTHORISATION_COUNT];
358+
uint8_t _auth_char_count;
372359

373360
struct {
374361
attsGroup_t service;

cores/arduino/mbed/connectivity/FEATURE_BLE/source/cordio/source/PalGapImpl.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,18 +401,30 @@ class PalGap final : public ble::PalGap {
401401

402402
static GapConnectionCompleteEvent convert(const hciLeConnCmplEvt_t *conn_evt)
403403
{
404+
const bdAddr_t *peer_rpa = &conn_evt->peerRpa;
405+
const bdAddr_t *peer_address = &conn_evt->peerAddr;
406+
407+
#if defined(TARGET_MCU_STM32WB55xx)
408+
const bdAddr_t invalidAddress = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
409+
if (conn_evt->addrType == DM_ADDR_RANDOM &&
410+
memcmp(peer_address, invalidAddress, sizeof(invalidAddress)) == 0 &&
411+
memcmp(peer_rpa, invalidAddress, sizeof(invalidAddress) != 0)
412+
) {
413+
std::swap(peer_rpa, peer_address);
414+
}
415+
#endif
404416
return GapConnectionCompleteEvent(
405417
conn_evt->status,
406418
// note the usage of the stack handle, not the HCI handle
407419
conn_evt->hdr.param,
408420
(connection_role_t::type) conn_evt->role,
409421
(peer_address_type_t::type) conn_evt->addrType,
410-
conn_evt->peerAddr,
422+
*peer_address,
411423
conn_evt->connInterval,
412424
conn_evt->connLatency,
413425
conn_evt->supTimeout,
414426
conn_evt->localRpa,
415-
conn_evt->peerRpa
427+
*peer_rpa
416428
);
417429
}
418430
};

cores/arduino/mbed/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.h

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <stdint.h>
2424
#include "ble/driver/CordioHCITransportDriver.h"
2525
#include "drivers/DigitalInOut.h"
26-
#include "drivers/InterruptIn.h"
2726
#include "drivers/UnbufferedSerial.h"
2827

2928
namespace ble {
@@ -41,9 +40,9 @@ class CyH4TransportDriver : public CordioHCITransportDriver {
4140
* Initialize the transport driver.
4241
*
4342
*/
44-
CyH4TransportDriver(PinName tx, PinName rx, PinName cts, PinName rts, PinName bt_power_name, int baud, PinName bt_host_wake_name, PinName bt_device_wake_name,
43+
CyH4TransportDriver(PinName tx, PinName rx, PinName cts, PinName rts, int baud, PinName bt_host_wake_name, PinName bt_device_wake_name,
4544
uint8_t host_wake_irq = 0, uint8_t dev_wake_irq = 0);
46-
CyH4TransportDriver(PinName tx, PinName rx, PinName cts, PinName rts, PinName bt_power_name, int baud);
45+
CyH4TransportDriver(PinName tx, PinName rx, PinName cts, PinName rts, int baud);
4746

4847
/**
4948
* Destructor
@@ -93,26 +92,19 @@ class CyH4TransportDriver : public CordioHCITransportDriver {
9392
mbed::UnbufferedSerial uart;
9493
PinName cts;
9594
PinName rts;
96-
PinName tx;
97-
PinName rx;
9895
PinName bt_host_wake_name;
9996
PinName bt_device_wake_name;
10097

101-
mbed::DigitalInOut bt_power;
10298
mbed::DigitalInOut bt_host_wake;
10399
mbed::DigitalInOut bt_device_wake;
104-
105100
bool bt_host_wake_active;
106101

107-
#if (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER)
108-
mbed::InterruptIn *host_wake_pin;
109-
#endif
110-
111102
bool enabled_powersave;
112103
uint8_t host_wake_irq_event;
113104
uint8_t dev_wake_irq_event;
114105

115106
bool holding_deep_sleep_lock;
107+
116108
};
117109

118110
} // namespace cypress

cores/arduino/mbed/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
4444
ModuleBGS2,
4545
ModuleEMS31,
4646
ModuleEHS5E,
47-
ModuleTX62,
4847
};
4948
static Module get_module();
5049

@@ -61,7 +60,6 @@ class GEMALTO_CINTERION : public AT_CellularDevice {
6160
void init_module_els61();
6261
void init_module_ems31();
6362
void init_module_ehs5e();
64-
void init_module_tx62();
6563
};
6664

6765
} // namespace mbed

cores/arduino/mbed/connectivity/netsocket/include/netsocket/nsapi.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@
3434
#include "netsocket/NetworkInterface.h"
3535
#include "netsocket/EthInterface.h"
3636
#include "netsocket/WiFiInterface.h"
37-
#if MBED_CONF_CELLULAR_PRESENT
3837
#include "netsocket/CellularInterface.h"
39-
#endif
4038
#include "netsocket/MeshInterface.h"
4139

4240
#include "netsocket/Socket.h"

0 commit comments

Comments
 (0)