update fsdev bsp for hil testing
This commit is contained in:
@@ -116,6 +116,19 @@ uint32_t board_button_read(void) {
|
|||||||
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
|
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t board_get_unique_id(uint8_t id[], size_t max_len) {
|
||||||
|
(void) max_len;
|
||||||
|
volatile uint32_t * stm32_uuid = (volatile uint32_t *) UID_BASE;
|
||||||
|
uint32_t* id32 = (uint32_t*) (uintptr_t) id;
|
||||||
|
uint8_t const len = 12;
|
||||||
|
|
||||||
|
id32[0] = stm32_uuid[0];
|
||||||
|
id32[1] = stm32_uuid[1];
|
||||||
|
id32[2] = stm32_uuid[2];
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
int board_uart_read(uint8_t* buf, int len) {
|
int board_uart_read(uint8_t* buf, int len) {
|
||||||
(void) buf;
|
(void) buf;
|
||||||
(void) len;
|
(void) len;
|
||||||
|
@@ -58,7 +58,7 @@
|
|||||||
#define configCPU_CLOCK_HZ SystemCoreClock
|
#define configCPU_CLOCK_HZ SystemCoreClock
|
||||||
#define configTICK_RATE_HZ ( 1000 )
|
#define configTICK_RATE_HZ ( 1000 )
|
||||||
#define configMAX_PRIORITIES ( 5 )
|
#define configMAX_PRIORITIES ( 5 )
|
||||||
#define configMINIMAL_STACK_SIZE ( 128 )
|
#define configMINIMAL_STACK_SIZE ( 200 )
|
||||||
#define configTOTAL_HEAP_SIZE ( configSUPPORT_DYNAMIC_ALLOCATION*4*1024 )
|
#define configTOTAL_HEAP_SIZE ( configSUPPORT_DYNAMIC_ALLOCATION*4*1024 )
|
||||||
#define configMAX_TASK_NAME_LEN 16
|
#define configMAX_TASK_NAME_LEN 16
|
||||||
#define configUSE_16_BIT_TICKS 0
|
#define configUSE_16_BIT_TICKS 0
|
||||||
|
@@ -126,6 +126,19 @@ uint32_t board_button_read(void) {
|
|||||||
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
|
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t board_get_unique_id(uint8_t id[], size_t max_len) {
|
||||||
|
(void) max_len;
|
||||||
|
volatile uint32_t * stm32_uuid = (volatile uint32_t *) UID_BASE;
|
||||||
|
uint32_t* id32 = (uint32_t*) (uintptr_t) id;
|
||||||
|
uint8_t const len = 12;
|
||||||
|
|
||||||
|
id32[0] = stm32_uuid[0];
|
||||||
|
id32[1] = stm32_uuid[1];
|
||||||
|
id32[2] = stm32_uuid[2];
|
||||||
|
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
int board_uart_read(uint8_t* buf, int len) {
|
int board_uart_read(uint8_t* buf, int len) {
|
||||||
(void) buf;
|
(void) buf;
|
||||||
(void) len;
|
(void) len;
|
||||||
|
Reference in New Issue
Block a user