mirror of https://github.com/ARMmbed/mbed-os.git
passkey types fixed
parent
cc41857ab6
commit
f9ed3b2456
|
@ -82,7 +82,6 @@ typedef SecurityManager::Keypress_t Keypress_t;
|
||||||
|
|
||||||
/* please use typedef for porting not the types directly */
|
/* please use typedef for porting not the types directly */
|
||||||
|
|
||||||
typedef uint8_t passkey_t[3];
|
|
||||||
typedef uint8_t oob_data_t[16];
|
typedef uint8_t oob_data_t[16];
|
||||||
|
|
||||||
typedef uint8_t irk_t[16];
|
typedef uint8_t irk_t[16];
|
||||||
|
@ -149,7 +148,7 @@ public:
|
||||||
* Called when the application should display a passkey.
|
* Called when the application should display a passkey.
|
||||||
*/
|
*/
|
||||||
virtual void on_passkey_display(
|
virtual void on_passkey_display(
|
||||||
connection_handle_t connection, const passkey_t& passkey
|
connection_handle_t connection, const passkey_num_t passkey
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -452,7 +451,7 @@ public:
|
||||||
* Reply to a passkey request received from the SecurityManagerEventHandler.
|
* Reply to a passkey request received from the SecurityManagerEventHandler.
|
||||||
*/
|
*/
|
||||||
virtual ble_error_t passkey_request_reply(
|
virtual ble_error_t passkey_request_reply(
|
||||||
connection_handle_t connection, const passkey_t& passkey
|
connection_handle_t connection, const passkey_num_t passkey
|
||||||
) = 0;
|
) = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -182,7 +182,7 @@ public:
|
||||||
ble_error_t setPasskey(const Passkey_t passkeyASCI, bool isStatic = false) {
|
ble_error_t setPasskey(const Passkey_t passkeyASCI, bool isStatic = false) {
|
||||||
// FIXME: ADD API in the pal to set default passkey!
|
// FIXME: ADD API in the pal to set default passkey!
|
||||||
#if 0
|
#if 0
|
||||||
uint32_t passkey = 0;
|
passkey_num_t passkey = 0;
|
||||||
for (int i = 0, m = 1; i < 6; ++i, m *= 10) {
|
for (int i = 0, m = 1; i < 6; ++i, m *= 10) {
|
||||||
passkey += (passkeyASCI[i] - NUMBER_OFFSET) * m;
|
passkey += (passkeyASCI[i] - NUMBER_OFFSET) * m;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue