diff options
| author | hathach <[email protected]> | 2024-07-19 22:33:53 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-07-19 22:33:53 +0700 |
| commit | 6bb59eeb3f974f51fbc5c6a5e4c02f83e11567b8 (patch) | |
| tree | c6c44df568ccc48016d4ff14ffbde04aa6c8c2ee /hw | |
| parent | e9f9d43d67804dc853cd064e8c0e204f2758731f (diff) | |
add lpc11u37 for hil rpi
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/lpc11/family.c | 7 | ||||
| -rw-r--r-- | hw/bsp/lpc11/family.cmake | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/hw/bsp/lpc11/family.c b/hw/bsp/lpc11/family.c index bff7110b8..e75bc4919 100644 --- a/hw/bsp/lpc11/family.c +++ b/hw/bsp/lpc11/family.c @@ -90,6 +90,13 @@ void board_led_write(bool state) { Chip_GPIO_SetPinState(LPC_GPIO, LED_PORT, LED_PIN, state ? LED_STATE_ON : (1 - LED_STATE_ON)); } +size_t board_get_unique_id(uint8_t id[], size_t max_len) { + if ( max_len < 16 ) return 0; + uint32_t* id32 = (uint32_t*) (uintptr_t) id; + id32[0] = Chip_IAP_ReadUID(); + return 4; +} + uint32_t board_button_read(void) { return BUTTON_STATE_ACTIVE == Chip_GPIO_GetPinState(LPC_GPIO, BUTTON_PORT, BUTTON_PIN); } diff --git a/hw/bsp/lpc11/family.cmake b/hw/bsp/lpc11/family.cmake index f17a48dd7..818600656 100644 --- a/hw/bsp/lpc11/family.cmake +++ b/hw/bsp/lpc11/family.cmake @@ -30,6 +30,7 @@ function(add_board_target BOARD_TARGET) ${SDK_DIR}/../gcc/cr_startup_lpc${LPC_FAMILY}.c ${SDK_DIR}/src/chip_${LPC_FAMILY}.c ${SDK_DIR}/src/clock_${LPC_FAMILY}.c + ${SDK_DIR}/src/iap.c ${SDK_DIR}/src/iocon_${LPC_FAMILY}.c ${SDK_DIR}/src/sysinit_${LPC_FAMILY}.c ) |
