change hil board s3 devkitm (devkitc seems to have usb issue with cp2104)

This commit is contained in:
hathach
2024-04-24 16:17:33 +07:00
parent eaec0fb139
commit b67cb26e51
14 changed files with 56 additions and 51 deletions

View File

@@ -25,6 +25,14 @@
#include "board_api.h"
//--------------------------------------------------------------------+
// Board API
//--------------------------------------------------------------------+
int board_getchar(void) {
char c;
return (sys_read(0, &c, 1) > 0) ? (int) c : (-1);
}
//--------------------------------------------------------------------+
// newlib read()/write() retarget
//--------------------------------------------------------------------+
@@ -126,8 +134,3 @@ FILE *const stdin = &__stdio;
__strong_reference(stdin, stdout);
__strong_reference(stdin, stderr);
#endif
int board_getchar(void) {
char c;
return (sys_read(0, &c, 1) > 0) ? (int) c : (-1);
}

View File

@@ -142,6 +142,7 @@ static inline size_t board_usb_get_serial(uint16_t desc_str1[], size_t max_chars
uint8_t uid[16] TU_ATTR_ALIGNED(4);
size_t uid_len;
// TODO work with make, but not working with esp32s3 cmake
if ( board_get_unique_id ) {
uid_len = board_get_unique_id(uid, sizeof(uid));
}else {