fix evse_link
This commit is contained in:
@@ -6,23 +6,23 @@
|
||||
#include "driver/uart.h"
|
||||
|
||||
// UART instance and configuration
|
||||
#define UART_PORT UART_NUM_2 // Usa a UART2
|
||||
#define UART_BAUDRATE 115200
|
||||
#define UART_PORT UART_NUM_2
|
||||
#define UART_BAUDRATE 9600
|
||||
#define UART_RX_BUF_SIZE 256
|
||||
|
||||
// GPIO pin assignments for UART (ajuste conforme o hardware)
|
||||
#define UART_TXD 17 // TX -> DI do MAX3485
|
||||
#define UART_RXD 16 // RX -> RO do MAX3485
|
||||
#define UART_RTS 2 // RTS -> DE+RE do MAX3485
|
||||
// GPIO pin assignments for RS-485 UART
|
||||
// Ajuste conforme seu hardware
|
||||
#define MB_UART_TXD 17
|
||||
#define MB_UART_RXD 16
|
||||
#define MB_UART_RTS 2 // pino DE/RE do transceiver RS-485
|
||||
|
||||
// Conveniência: nomes usados no .c
|
||||
#define TX_PIN UART_TXD
|
||||
#define RX_PIN UART_RXD
|
||||
#define RTS_PIN UART_RTS
|
||||
#define TX_PIN MB_UART_TXD
|
||||
#define RX_PIN MB_UART_RXD
|
||||
#define RTS_PIN MB_UART_RTS
|
||||
|
||||
// Frame delimiters
|
||||
#define MAGIC_START 0x7E
|
||||
#define MAGIC_END 0x7F
|
||||
#define MAGIC_START 0x7E
|
||||
#define MAGIC_END 0x7F
|
||||
|
||||
// Maximum payload (excluding sequence byte)
|
||||
#define EVSE_LINK_MAX_PAYLOAD 254
|
||||
|
||||
Reference in New Issue
Block a user