diff options
| author | hathach <[email protected]> | 2023-11-29 17:09:52 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-11-29 17:09:52 +0700 |
| commit | 83840041a86d3893dc66e9a39cdace78158da011 (patch) | |
| tree | 90d5fda99c5296311f316a9ca7466ce994753c6d /hw | |
| parent | 9c9ebb342d2d3cb0396ff4ad8c7b09acd2aee75e (diff) | |
update esp32 to also be supported by hil test
test run locally well
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/espressif/boards/espressif_s3_devkitc/board.h | 8 | ||||
| -rw-r--r-- | hw/bsp/espressif/boards/family.c | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/hw/bsp/espressif/boards/espressif_s3_devkitc/board.h b/hw/bsp/espressif/boards/espressif_s3_devkitc/board.h index fe33b5c43..a319fbc61 100644 --- a/hw/bsp/espressif/boards/espressif_s3_devkitc/board.h +++ b/hw/bsp/espressif/boards/espressif_s3_devkitc/board.h @@ -36,6 +36,14 @@ #define BUTTON_PIN 0 #define BUTTON_STATE_ACTIVE 0 +// SPI for USB host shield +#define MAX3421_SPI_HOST SPI2_HOST +#define MAX3421_SCK_PIN 39 +#define MAX3421_MOSI_PIN 42 +#define MAX3421_MISO_PIN 21 +#define MAX3421_CS_PIN 15 +#define MAX3421_INTR_PIN 14 + #ifdef __cplusplus } #endif diff --git a/hw/bsp/espressif/boards/family.c b/hw/bsp/espressif/boards/family.c index 2029295dc..c32ccbc84 100644 --- a/hw/bsp/espressif/boards/family.c +++ b/hw/bsp/espressif/boards/family.c @@ -28,6 +28,7 @@ #include "board.h" #include "esp_rom_gpio.h" +#include "esp_mac.h" #include "hal/gpio_ll.h" #include "hal/usb_hal.h" #include "soc/usb_periph.h" @@ -149,6 +150,12 @@ static void configure_pins(usb_hal_context_t* usb) { // Board porting API //--------------------------------------------------------------------+ +size_t board_get_unique_id(uint8_t id[], size_t max_len) { + // use factory default MAC as serial ID + esp_efuse_mac_get_default(id); + return 6; +} + void board_led_write(bool state) { #ifdef NEOPIXEL_PIN strip->set_pixel(strip, 0, (state ? 0x88 : 0x00), 0x00, 0x00); |
