Skip to content

Commit

Permalink
fixed USB handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Jan 12, 2025
1 parent df9ee59 commit 3c188bb
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <cstring>

// Specific improvements and #define for the ESP32 S3 series
#if defined(ARDUINO_ESP32_S3_N16R8) || defined(DISPLAY_RM67162_AMOLED)
#include "S3Specific.h"
#endif
Expand Down Expand Up @@ -53,11 +54,6 @@
#define SERIAL_TIMEOUT \
8 // Time in milliseconds to wait for the next data chunk.

// Specific improvements and #define for the ESP32 S3 series
#if defined(ARDUINO_ESP32_S3_N16R8) || defined(DISPLAY_RM67162_AMOLED)
#include "S3Specific.h"
#endif

#ifdef ARDUINO_ESP32_S3_N16R8
#define RGB_ORDER_BUTTON_PIN 45
#define BRIGHTNESS_BUTTON_PIN 48
Expand Down Expand Up @@ -474,7 +470,7 @@ void Task_ReadSerial(void *pvParameters) {
command = byte;

switch (command) {
case 12: // ask for resolution (and shake hands)
case 12: // handshake
{
for (u_int8_t i = 0; i < N_INTERMEDIATE_CTR_CHARS; i++) {
Serial.write(CtrlChars[i]);
Expand All @@ -483,6 +479,9 @@ void Task_ReadSerial(void *pvParameters) {
Serial.write((TOTAL_WIDTH >> 8) & 0xff);
Serial.write(TOTAL_HEIGHT & 0xff);
Serial.write((TOTAL_HEIGHT >> 8) & 0xff);
Serial.write(ZEDMD_VERSION_MAJOR);
Serial.write(ZEDMD_VERSION_MINOR);
Serial.write(ZEDMD_VERSION_PATCH);
numCtrlCharsFound = 0;
transportActive = true;
Serial.write('R');
Expand Down

0 comments on commit 3c188bb

Please sign in to comment.