Port of arduino-st4 (Kevin Ferrare) to ESP32/PlatformIO with: - FreeRTOS mutex protection at every layer (Pin, Axis, Pulse, Controller) - Hardware timer pulse guiding with ISR-safe deferred stop pattern - Backward-compatible serial protocol (57600 baud, #-terminated) - Extended commands: PULSE, POS?, SYNC, STATUS?, VERSION? - Optional WiFi/WebSocket control (gated by ST4_WIFI_ENABLED) - Dead-reckoning position tracker using esp_timer microsecond precision All 4 examples build clean against esp32dev target.
29 lines
573 B
C++
29 lines
573 B
C++
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
// ST4-ESP32: Default pin configuration for ESP32
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
// Default GPIO assignments for ESP32 with TLP521-4 optocoupler
|
|
// Override by defining before including ST4.h
|
|
#ifndef ST4_PIN_RA_PLUS
|
|
#define ST4_PIN_RA_PLUS 16
|
|
#endif
|
|
|
|
#ifndef ST4_PIN_RA_MINUS
|
|
#define ST4_PIN_RA_MINUS 17
|
|
#endif
|
|
|
|
#ifndef ST4_PIN_DEC_PLUS
|
|
#define ST4_PIN_DEC_PLUS 18
|
|
#endif
|
|
|
|
#ifndef ST4_PIN_DEC_MINUS
|
|
#define ST4_PIN_DEC_MINUS 19
|
|
#endif
|
|
|
|
#ifndef ST4_PIN_LED
|
|
#define ST4_PIN_LED 2
|
|
#endif
|