Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CyanLight
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fxk8y
CyanLight
Commits
032f133b
Commit
032f133b
authored
2 years ago
by
fxk8y
Browse files
Options
Downloads
Patches
Plain Diff
Adding board definition and stuff
parent
7e65071d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CyanBusInjector-FW/CyanBusInjector.cpp
+8
-1
8 additions, 1 deletion
CyanBusInjector-FW/CyanBusInjector.cpp
CyanBusInjector-FW/CyanBusInjector.hpp
+8
-6
8 additions, 6 deletions
CyanBusInjector-FW/CyanBusInjector.hpp
CyanBusInjector-FW/device_main.cpp
+2
-1
2 additions, 1 deletion
CyanBusInjector-FW/device_main.cpp
with
18 additions
and
8 deletions
CyanBusInjector-FW/CyanBusInjector.cpp
+
8
−
1
View file @
032f133b
#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();
}
}
...
...
This diff is collapsed.
Click to expand it.
CyanBusInjector-FW/CyanBusInjector.hpp
+
8
−
6
View file @
032f133b
// 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
}
}
}
}
This diff is collapsed.
Click to expand it.
CyanBusInjector-FW/device_main.cpp
+
2
−
1
View file @
032f133b
...
@@ -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
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment