File tree Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Expand file tree Collapse file tree 3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,13 @@ uint32_t board_button_read(void) {
236
236
return BUTTON_STATE_ACTIVE == Chip_GPIO_GetPinState (LPC_GPIO_PORT , BUTTON_PORT , BUTTON_PIN );
237
237
}
238
238
239
+ size_t board_get_unique_id (uint8_t id [], size_t max_len ) {
240
+ if ( max_len < 16 ) return 0 ;
241
+ uint32_t * id32 = (uint32_t * ) (uintptr_t ) id ;
242
+ Chip_IAP_ReadUID (id32 );
243
+ return 16 ;
244
+ }
245
+
239
246
int board_uart_read (uint8_t * buf , int len ) {
240
247
return Chip_UART_Read (UART_DEV , buf , len );
241
248
}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ function(add_board_target BOARD_TARGET)
24
24
${SDK_DIR} /src/clock_18xx_43xx.c
25
25
${SDK_DIR} /src/fpu_init.c
26
26
${SDK_DIR} /src/gpio_18xx_43xx.c
27
+ ${SDK_DIR} /src/iap_18xx_43xx.c
27
28
${SDK_DIR} /src/sysinit_18xx_43xx.c
28
29
${SDK_DIR} /src/uart_18xx_43xx.c
29
30
)
Original file line number Diff line number Diff line change @@ -12,7 +12,11 @@ CFLAGS += \
12
12
-DCFG_TUSB_MCU=OPT_MCU_LPC43XX
13
13
14
14
# mcu driver cause following warnings
15
- CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes -Wno-error=cast-qual
15
+ CFLAGS += \
16
+ -Wno-error=unused-parameter \
17
+ -Wno-error=strict-prototypes \
18
+ -Wno-error=cast-qual \
19
+ -Wno-error=incompatible-pointer-types \
16
20
17
21
SRC_C += \
18
22
src/portable/chipidea/ci_hs/dcd_ci_hs.c \
@@ -21,12 +25,11 @@ SRC_C += \
21
25
${SDK_DIR}/../gcc/cr_startup_lpc43xx.c \
22
26
${SDK_DIR}/src/chip_18xx_43xx.c \
23
27
${SDK_DIR}/src/clock_18xx_43xx.c \
28
+ ${SDK_DIR}/src/fpu_init.c \
24
29
${SDK_DIR}/src/gpio_18xx_43xx.c \
30
+ ${SDK_DIR}/src/iap_18xx_43xx.c \
25
31
${SDK_DIR}/src/sysinit_18xx_43xx.c \
26
- ${SDK_DIR}/src/i2c_18xx_43xx.c \
27
- ${SDK_DIR}/src/i2cm_18xx_43xx.c \
28
32
${SDK_DIR}/src/uart_18xx_43xx.c \
29
- ${SDK_DIR}/src/fpu_init.c
30
33
31
34
INC += \
32
35
$(TOP ) /$(BOARD_PATH ) \
You can’t perform that action at this time.
0 commit comments