update esp32 to also be supported by hil test

test run locally well
This commit is contained in:
hathach
2023-11-29 17:09:52 +07:00
parent 9c9ebb342d
commit 83840041a8
18 changed files with 99 additions and 33 deletions

View File

@@ -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

View File

@@ -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);