@@ -97,15 +97,24 @@ static ledger_ble_profile_apdu_handle_t ledger_apdu_profile_handle;
97
97
static uint8_t ble_ledger_protocol_chunk_buffer [BLE_ATT_MAX_MTU_SIZE ];
98
98
99
99
// clang-format off
100
+ #ifdef TARGET_FLEX
101
+ const uint8_t charUuidTX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x01 ,0x00 ,0x04 ,0x30 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 };
102
+ const uint8_t charUuidRX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x02 ,0x00 ,0x04 ,0x30 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 };
103
+ const uint8_t charUuidRX2 [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x03 ,0x00 ,0x04 ,0x30 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 };
104
+ #else // !TARGET_FLEX
105
+
100
106
#ifdef TARGET_STAX
101
- const uint8_t charUuidTX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x01 ,0x00 ,0x04 ,0x60 ,0x97 ,0x2C ,0x00 ,0x34 ,0xD6 ,0x13 };
102
- const uint8_t charUuidRX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x02 ,0x00 ,0x04 ,0x60 ,0x97 ,0x2C ,0x00 ,0x34 ,0xD6 ,0x13 };
103
- const uint8_t charUuidRX2 [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x03 ,0x00 ,0x04 ,0x60 ,0x97 ,0x2C ,0x00 ,0x34 ,0xD6 ,0x13 };
104
- #else // ! TARGET_STAX
105
- const uint8_t charUuidTX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x01 ,0x00 ,0x04 ,0x00 ,0x97 ,0x2C ,0x00 ,0x34 ,0xD6 ,0x13 };
106
- const uint8_t charUuidRX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x02 ,0x00 ,0x04 ,0x00 ,0x97 ,0x2C ,0x00 ,0x34 ,0xD6 ,0x13 };
107
- const uint8_t charUuidRX2 [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x03 ,0x00 ,0x04 ,0x00 ,0x97 ,0x2C ,0x00 ,0x34 ,0xD6 ,0x13 };
107
+ const uint8_t charUuidTX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x01 ,0x00 ,0x04 ,0x60 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 };
108
+ const uint8_t charUuidRX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x02 ,0x00 ,0x04 ,0x60 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 };
109
+ const uint8_t charUuidRX2 [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x03 ,0x00 ,0x04 ,0x60 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 };
110
+ #else // !TARGET_FLEX && !TARGET_STAX
111
+
112
+ const uint8_t charUuidTX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x01 ,0x00 ,0x04 ,0x00 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 };
113
+ const uint8_t charUuidRX [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x02 ,0x00 ,0x04 ,0x00 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 };
114
+ const uint8_t charUuidRX2 [BLE_UUID_SIZE ] = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x03 ,0x00 ,0x04 ,0x00 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 };
115
+
108
116
#endif // ! TARGET_STAX
117
+ #endif // ! TARGET_FLEX
109
118
// clang-format on
110
119
static uint8_t BLE_LEDGER_apdu_buffer [OS_IO_BUFFER_SIZE + 1 ];
111
120
@@ -116,11 +125,17 @@ const ble_profile_info_t BLE_LEDGER_PROFILE_apdu_info = {
116
125
.service_uuid
117
126
= {.type = BLE_GATT_UUID_TYPE_128 ,
118
127
// clang-format off
128
+ #ifdef TARGET_FLEX
129
+ .value = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x00 ,0x00 ,0x04 ,0x30 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 }},
130
+ #else // !TARGET_FLEX
131
+
119
132
#ifdef TARGET_STAX
120
- .value = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x00 ,0x00 ,0x04 ,0x60 ,0x97 ,0x2C ,0x00 ,0x34 ,0xD6 ,0x13 }},
121
- #else // ! TARGET_STAX
122
- .value = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x00 ,0x00 ,0x04 ,0x00 ,0x97 ,0x2C ,0x00 ,0x34 ,0xD6 ,0x13 }},
133
+ .value = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x00 ,0x00 ,0x04 ,0x60 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 }},
134
+ #else // !TARGET_FLEX && !TARGET_STAX
135
+
136
+ .value = {0x72 ,0x65 ,0x67 ,0x64 ,0x65 ,0x4c ,0x00 ,0x00 ,0x04 ,0x00 ,0x97 ,0x2c ,0x00 ,0x34 ,0xd6 ,0x13 }},
123
137
#endif // ! TARGET_STAX
138
+ #endif // ! TARGET_FLEX
124
139
// clang-format on
125
140
126
141
.init = BLE_LEDGER_PROFILE_apdu_init ,
@@ -631,7 +646,7 @@ ble_profile_status_t BLE_LEDGER_PROFILE_apdu_send_packet(const uint8_t *packet,
631
646
bool BLE_LEDGER_PROFILE_apdu_is_busy (void * cookie )
632
647
{
633
648
ledger_ble_profile_apdu_handle_t * handle = (ledger_ble_profile_apdu_handle_t * ) PIC (cookie );
634
- bool busy = false;
649
+ bool busy = false;
635
650
636
651
if (handle -> state == LEDGER_BLE_PROFILE_APDU_BUSY ) {
637
652
busy = true;
0 commit comments