summaryrefslogtreecommitdiff
path: root/hw/bsp/nrf
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-12-12 11:59:37 +0700
committerhathach <[email protected]>2023-12-12 11:59:37 +0700
commitb5448a7987cc321607f0641ba3922c5b322e3bb4 (patch)
tree4a3a3f45f4a829d2927bc2e36c77d1ef71eb0cef /hw/bsp/nrf
parent24c5e6ab451a002d2e9a86a39acc11476250d1a5 (diff)
add feather nrf52840 express to hil pool
Diffstat (limited to 'hw/bsp/nrf')
-rw-r--r--hw/bsp/nrf/family.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/bsp/nrf/family.c b/hw/bsp/nrf/family.c
index 6e0cd85c3..5b0ddc69f 100644
--- a/hw/bsp/nrf/family.c
+++ b/hw/bsp/nrf/family.c
@@ -203,6 +203,18 @@ uint32_t board_button_read(void) {
return BUTTON_STATE_ACTIVE == nrf_gpio_pin_read(BUTTON_PIN);
}
+size_t board_get_unique_id(uint8_t id[], size_t max_len) {
+ (void) max_len;
+
+#ifdef NRF5340_XXAA
+ uintptr_t device_id = (uintptr_t) NRF_FICR->INFO.DEVICEID;
+#else
+ uintptr_t device_id = (uintptr_t) NRF_FICR->DEVICEID;
+#endif
+ memcpy(id, (void*) device_id, 8);
+ return 8;
+}
+
int board_uart_read(uint8_t* buf, int len) {
(void) buf;
(void) len;