mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Adding unique_id variable.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
633f005efd
commit
1630c7b52d
3 changed files with 9 additions and 1 deletions
|
|
@ -77,7 +77,7 @@ target_include_directories(hsm2040 PUBLIC
|
|||
)
|
||||
|
||||
pico_add_extra_outputs(hsm2040)
|
||||
target_link_libraries(hsm2040 PRIVATE pico_stdlib tinyusb_device tinyusb_board pico_multicore hardware_flash hardware_sync hardware_adc)
|
||||
target_link_libraries(hsm2040 PRIVATE pico_stdlib tinyusb_device tinyusb_board pico_multicore hardware_flash hardware_sync hardware_adc pico_unique_id)
|
||||
|
||||
#
|
||||
#project(flash_nuke C CXX ASM)
|
||||
|
|
|
|||
|
|
@ -1747,6 +1747,8 @@ void led_off_all()
|
|||
#include "hardware/sync.h"
|
||||
extern void neug_task();
|
||||
|
||||
pico_unique_board_id_t unique_id;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct apdu *a = &apdu;
|
||||
|
|
@ -1771,6 +1773,9 @@ int main(void)
|
|||
random_init();
|
||||
|
||||
low_flash_init();
|
||||
|
||||
pico_get_unique_board_id(&unique_id);
|
||||
DEBUG_PAYLOAD(unique_id.id,8);
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include "ccid.h"
|
||||
#include "tusb.h"
|
||||
#include "file.h"
|
||||
#include "pico/unique_id.h"
|
||||
|
||||
#define USB_REQ_CCID 0xA1
|
||||
|
||||
|
|
@ -111,4 +112,6 @@ void put_binary (const char *s, int len);
|
|||
|
||||
extern int flash_write_data_to_file(file_t *file, const uint8_t *data, uint16_t len);
|
||||
extern void low_flash_available();
|
||||
|
||||
extern pico_unique_board_id_t unique_id;
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue