mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-06-11 12:58:14 +02:00
Blink led three times to acknowledge proper commissioning.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
10
src/rescue.c
10
src/rescue.c
@@ -157,6 +157,14 @@ int cmd_keydev_sign() {
|
|||||||
return SW_OK();
|
return SW_OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Blocking CORE1
|
||||||
|
void led_3_blinks() {
|
||||||
|
uint32_t mode = led_get_mode();
|
||||||
|
led_set_mode(MODE_PROCESSING);
|
||||||
|
sleep_ms(500);
|
||||||
|
led_set_mode(mode);
|
||||||
|
}
|
||||||
|
|
||||||
int cmd_write() {
|
int cmd_write() {
|
||||||
if (apdu.nc < 2) {
|
if (apdu.nc < 2) {
|
||||||
return SW_WRONG_LENGTH();
|
return SW_WRONG_LENGTH();
|
||||||
@@ -172,6 +180,7 @@ int cmd_write() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
led_3_blinks();
|
||||||
return SW_OK();
|
return SW_OK();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,6 +234,7 @@ int cmd_secure() {
|
|||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
return SW_EXEC_ERROR();
|
return SW_EXEC_ERROR();
|
||||||
}
|
}
|
||||||
|
led_3_blinks();
|
||||||
return SW_OK();
|
return SW_OK();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user