File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
host/embedded/esp32-app/main Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,12 @@ task waits for this semaphore to be given before queueing a transmission.
53
53
Pins in use. The SPI Master can use the GPIO mux, so feel free to change these if needed.
54
54
*/
55
55
56
+ // This pin is used on BW1092. On BW1098EMB it should connect to SPI2.5
57
+ // Assert low to put DepthAI bootloader in DFU update mode.
58
+ #define GPIO_UPDATE_DEPTHAI_FW 4
59
+ // Set to 1 only when updating DepthAI firmware, then reset to 0
60
+ #define ENABLE_FW_UPDATE 0
61
+
56
62
// DepthAI uses SPI2.6 pin as an interrupt output, open-drain, active low.
57
63
#define GPIO_HANDSHAKE 2 // ESP32 pin that connects to SPI2.6
58
64
@@ -95,6 +101,12 @@ static void IRAM_ATTR gpio_handshake_isr_handler(void* arg)
95
101
//Main application
96
102
void app_main ()
97
103
{
104
+ if (ENABLE_FW_UPDATE ) {
105
+ gpio_reset_pin (GPIO_UPDATE_DEPTHAI_FW );
106
+ gpio_set_direction (GPIO_UPDATE_DEPTHAI_FW , GPIO_MODE_OUTPUT );
107
+ gpio_set_level (GPIO_UPDATE_DEPTHAI_FW , 0 );
108
+ }
109
+
98
110
esp_err_t ret ;
99
111
spi_device_handle_t handle ;
100
112
You can’t perform that action at this time.
0 commit comments