Skip to content
Snippets Groups Projects
Commit 032f133b authored by fxk8y's avatar fxk8y :spider:
Browse files

Adding board definition and stuff

parent 7e65071d
No related branches found
No related tags found
No related merge requests found
#include "CyanBusInjector.hpp"
// C++ system level
#include <string>
#include <cinttypes>
// #include <functional>
......@@ -16,7 +17,7 @@
#include "CyanBusTX.hpp"
// qthing stuff
// #include ""
#include <qthing>
// TODO: Needed…?
......@@ -27,8 +28,14 @@ namespace SiliconTorch {
namespace CyanBusInjector {
const std::string BreakHeader("[CyanBusBreak]");
const std::string PacketHeader("[CyanBusInjector]");
CyanBusInjector::CyanBusInjector(uint8_t tx, uint8_t rx, uint8_t de, uint8_t re, uint32_t baudRate, uint8_t uartChannel) : cbTX(tx, rx, de, re, baudRate, uartChannel) {
// qthing::addUDPPacketCallback();
}
......
// C++ system level
#include <string>
#include <cinttypes>
// ESP32 specific
......@@ -15,6 +16,9 @@ namespace SiliconTorch {
namespace CyanBusInjector {
extern const std::string BreakHeader;
extern const std::string PacketHeader;
class CyanBusInjector {
public:
......@@ -29,12 +33,10 @@ namespace SiliconTorch {
};
// Pinout proto board:
// TX -> 23
// RX -> 34
// DE -> 32
// RE -> 33
class CyanBusInjector_ProtoPCB : public CyanBusInjector {
public:
CyanBusInjector_ProtoPCB() : CyanBusInjector(23, 34, 32, 33) {};
};
}
}
......@@ -20,7 +20,8 @@ void device_main() {
qthing::enable_ethernet_lan8720();
injector = new SiliconTorch::CyanBusInjector::CyanBusInjector(23, 34, 32, 33);
// injector = new SiliconTorch::CyanBusInjector::CyanBusInjector(23, 34, 32, 33);
injector = new SiliconTorch::CyanBusInjector::CyanBusInjector_ProtoPCB();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment