Ajout gestion LM18220

This commit is contained in:
Serge NOEL
2026-08-05 11:51:54 +02:00
parent fd3fc380d8
commit be3dbaa824
7 changed files with 207 additions and 46 deletions
+7 -7
View File
@@ -1,14 +1,14 @@
#pragma once
#include <vector>
#include <stdint.h>
#include <DCCpp.h>
#ifndef UNDEFINED_PIN
#define UNDEFINED_PIN 255
#endif
class Dcc {
public:
// Generate a simplified DCC accessory packet (bytes).
// addr: accessory address (application-dependent)
// activate: true = ON, false = OFF
static std::vector<uint8_t> generateAccessoryPacket(uint16_t addr, bool activate);
// Send packet via a GPIO pin (simulation/pulse). Implementation may be hardware-specific.
static void sendPacket(const std::vector<uint8_t> &packet, int pin);
static void begin(int dirPin, int pwmPin);
static void sendAccessory(uint16_t linearAddress, bool activate);
};