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" #include "CyanBusInjector.hpp"
// C++ system level // C++ system level
#include <string>
#include <cinttypes> #include <cinttypes>
// #include <functional> // #include <functional>
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
#include "CyanBusTX.hpp" #include "CyanBusTX.hpp"
// qthing stuff // qthing stuff
// #include "" #include <qthing>
// TODO: Needed…? // TODO: Needed…?
...@@ -27,8 +28,14 @@ namespace SiliconTorch { ...@@ -27,8 +28,14 @@ namespace SiliconTorch {
namespace CyanBusInjector { 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) { 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 // C++ system level
#include <string>
#include <cinttypes> #include <cinttypes>
// ESP32 specific // ESP32 specific
...@@ -15,6 +16,9 @@ namespace SiliconTorch { ...@@ -15,6 +16,9 @@ namespace SiliconTorch {
namespace CyanBusInjector { namespace CyanBusInjector {
extern const std::string BreakHeader;
extern const std::string PacketHeader;
class CyanBusInjector { class CyanBusInjector {
public: public:
...@@ -29,12 +33,10 @@ namespace SiliconTorch { ...@@ -29,12 +33,10 @@ namespace SiliconTorch {
}; };
class CyanBusInjector_ProtoPCB : public CyanBusInjector {
// Pinout proto board: public:
// TX -> 23 CyanBusInjector_ProtoPCB() : CyanBusInjector(23, 34, 32, 33) {};
// RX -> 34 };
// DE -> 32
// RE -> 33
} }
} }
...@@ -20,7 +20,8 @@ void device_main() { ...@@ -20,7 +20,8 @@ void device_main() {
qthing::enable_ethernet_lan8720(); 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