Use Canokey-STM32 as an example. You need to implement these functions in device.h: void device_delay(int ms); uint32_t device_get_tick(void); int device_spinlock_lock(volatile uint32_t *lock, uint32_t blocking); void device_spinlock_unlock(volatile uint32_t *lock); int device_atomic_compare_and_swap(volatile uint32_t *var, uint32_t expect, uint32_t update); void led_on(void); void led_off(void);
{{#tags}}- {{label}}
{{/tags}}