Compare commits
33 Commits
dev-gobot-
...
motor-ctrl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51ce3af221 | ||
|
|
e091d4df18 | ||
|
|
f002a01308 | ||
|
|
6ba0535af9 | ||
|
|
46f3514c6a | ||
|
|
a755a954f6 | ||
|
|
c7c5cea341 | ||
|
|
f0ae696c4d | ||
|
|
51587757b1 | ||
|
|
f4b591a5e6 | ||
|
|
a2032d72fd | ||
|
|
57e73127cc | ||
|
|
53a5c10cee | ||
|
|
f5281e37c8 | ||
|
|
783799832c | ||
|
|
61abb16b83 | ||
|
|
0dc0f82938 | ||
|
|
1786fa0b41 | ||
|
|
f3490212bf | ||
|
|
84e351d154 | ||
|
|
986927d740 | ||
|
|
6be2dd0b7d | ||
|
|
b2ffcb5d72 | ||
|
|
1ad6c75788 | ||
|
|
e97472c2a3 | ||
|
|
bba35c9622 | ||
|
|
9640a5b747 | ||
|
|
49d52ca0ed | ||
|
|
08598ca7a3 | ||
|
|
36f6f1863b | ||
|
|
0c1b8f4e86 | ||
|
|
29af5335f5 | ||
|
|
8b97a1853d |
BIN
.gitignore
(Stored with Git LFS)
vendored
BIN
.gitignore
(Stored with Git LFS)
vendored
Binary file not shown.
BIN
.gitmodules
(Stored with Git LFS)
vendored
BIN
.gitmodules
(Stored with Git LFS)
vendored
Binary file not shown.
BIN
can-interface/.gitignore
(Stored with Git LFS)
vendored
BIN
can-interface/.gitignore
(Stored with Git LFS)
vendored
Binary file not shown.
5
can-interface/.vscode/settings.json
vendored
5
can-interface/.vscode/settings.json
vendored
@@ -14,8 +14,6 @@
|
|||||||
"idf.pythonBinPath": "/home/alexander/.espressif/python_env/idf5.3_py3.12_env/bin/python",
|
"idf.pythonBinPath": "/home/alexander/.espressif/python_env/idf5.3_py3.12_env/bin/python",
|
||||||
"idf.toolsPath": "/home/alexander/.espressif",
|
"idf.toolsPath": "/home/alexander/.espressif",
|
||||||
"idf.flashType": "UART",
|
"idf.flashType": "UART",
|
||||||
"idf.openOcdLaunchArgs": ["-c", "adapter_khz 1000"],
|
|
||||||
"idf.openOcdDebugLevel": 2,
|
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.tcc": "cpp",
|
"*.tcc": "cpp",
|
||||||
"cstdint": "cpp",
|
"cstdint": "cpp",
|
||||||
@@ -26,7 +24,6 @@
|
|||||||
"regex": "cpp",
|
"regex": "cpp",
|
||||||
"array": "cpp",
|
"array": "cpp",
|
||||||
"string": "cpp",
|
"string": "cpp",
|
||||||
"span": "cpp",
|
"span": "cpp"
|
||||||
"cstring": "cpp"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
BIN
can-interface/circuit/gobot-can-interface/external/ESP32-DEVKIT-V1/ESP32-DEVKIT-V1.kicad_sym
(Stored with Git LFS)
vendored
BIN
can-interface/circuit/gobot-can-interface/external/ESP32-DEVKIT-V1/ESP32-DEVKIT-V1.kicad_sym
(Stored with Git LFS)
vendored
Binary file not shown.
BIN
can-interface/circuit/gobot-can-interface/external/ESP32-DEVKIT-V1/ESP32-DEVKIT-V1.step
(Stored with Git LFS)
vendored
BIN
can-interface/circuit/gobot-can-interface/external/ESP32-DEVKIT-V1/ESP32-DEVKIT-V1.step
(Stored with Git LFS)
vendored
Binary file not shown.
BIN
can-interface/circuit/gobot-can-interface/external/ESP32-DEVKIT-V1/MODULE_ESP32_DEVKIT_V1.kicad_mod
(Stored with Git LFS)
vendored
BIN
can-interface/circuit/gobot-can-interface/external/ESP32-DEVKIT-V1/MODULE_ESP32_DEVKIT_V1.kicad_mod
(Stored with Git LFS)
vendored
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
<!DOCTYPE HTML><html lang="en-US"> <head> <meta charset="UTF-8"> <meta http-equiv="refresh" content="0; url=https://www.snapeda.com/about/import/#"> <script type="text/javascript">window.location.href="https://www.snapeda.com/about/import/#" </script> <title>Page Redirection</title> </head> <body> If you are not redirected automatically, follow this <a href="https://www.snapeda.com/about/import/#">link to the import guide</a>. </body></html>
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
can-interface/circuit/gobot-can-interface/gobot-can-interface.kicad_pcb
(Stored with Git LFS)
BIN
can-interface/circuit/gobot-can-interface/gobot-can-interface.kicad_pcb
(Stored with Git LFS)
Binary file not shown.
BIN
can-interface/circuit/gobot-can-interface/gobot-can-interface.kicad_prl
(Stored with Git LFS)
BIN
can-interface/circuit/gobot-can-interface/gobot-can-interface.kicad_prl
(Stored with Git LFS)
Binary file not shown.
BIN
can-interface/circuit/gobot-can-interface/gobot-can-interface.kicad_pro
(Stored with Git LFS)
BIN
can-interface/circuit/gobot-can-interface/gobot-can-interface.kicad_pro
(Stored with Git LFS)
Binary file not shown.
BIN
can-interface/circuit/gobot-can-interface/gobot-can-interface.kicad_sch
(Stored with Git LFS)
BIN
can-interface/circuit/gobot-can-interface/gobot-can-interface.kicad_sch
(Stored with Git LFS)
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,4 +0,0 @@
|
|||||||
(sym_lib_table
|
|
||||||
(version 7)
|
|
||||||
(lib (name "ESP32-DEVKIT-V1")(type "KiCad")(uri "${KIPRJMOD}/external/ESP32-DEVKIT-V1/ESP32-DEVKIT-V1.kicad_sym")(options "")(descr ""))
|
|
||||||
)
|
|
||||||
BIN
can-interface/circuit/i2c-hub/i2c-hub-backups/i2c-hub-2024-12-28_225050.zip
(Stored with Git LFS)
BIN
can-interface/circuit/i2c-hub/i2c-hub-backups/i2c-hub-2024-12-28_225050.zip
(Stored with Git LFS)
Binary file not shown.
BIN
can-interface/circuit/i2c-hub/i2c-hub.kicad_prl
(Stored with Git LFS)
BIN
can-interface/circuit/i2c-hub/i2c-hub.kicad_prl
(Stored with Git LFS)
Binary file not shown.
BIN
can-interface/circuit/i2c-hub/i2c-hub.kicad_pro
(Stored with Git LFS)
BIN
can-interface/circuit/i2c-hub/i2c-hub.kicad_pro
(Stored with Git LFS)
Binary file not shown.
@@ -1 +0,0 @@
|
|||||||
/home/alexander/Projects/gobot/common-libaries/gobot_rpc
|
|
||||||
File diff suppressed because it is too large
Load Diff
Submodule can-interface/docs/doxygen-awesome-css deleted from 568f56cde6
@@ -2,6 +2,5 @@ idf_component_register(SRCS "hello_world_main.cpp"
|
|||||||
REQUIRES driver
|
REQUIRES driver
|
||||||
REQUIRES mcp2521
|
REQUIRES mcp2521
|
||||||
REQUIRES mcp2521_hardware_interface
|
REQUIRES mcp2521_hardware_interface
|
||||||
REQUIRES gobot_rpc
|
|
||||||
REQUIRES spi_flash
|
REQUIRES spi_flash
|
||||||
INCLUDE_DIRS "")
|
INCLUDE_DIRS "")
|
||||||
|
|||||||
@@ -23,43 +23,26 @@
|
|||||||
|
|
||||||
#include "mcp2521.hpp"
|
#include "mcp2521.hpp"
|
||||||
|
|
||||||
|
#define SPI_PIN_CS0 GPIO_NUM_5
|
||||||
#define SPI_PIN_SCLK GPIO_NUM_18
|
#define SPI_PIN_SCLK GPIO_NUM_18
|
||||||
#define SPI_PIN_MISO GPIO_NUM_19
|
#define SPI_PIN_MISO GPIO_NUM_19
|
||||||
#define SPI_PIN_MOSI GPIO_NUM_23
|
#define SPI_PIN_MOSI GPIO_NUM_23
|
||||||
|
#define CAN_INT_PIN GPIO_NUM_21
|
||||||
|
|
||||||
#define SPI_PIN_CS0 GPIO_NUM_25
|
#define EXTERNAL_TRIGGER GPIO_NUM_26
|
||||||
#define SPI_PIN_CS1 GPIO_NUM_27
|
|
||||||
|
|
||||||
#define CAN_INT0_PIN GPIO_NUM_5
|
void onRX(void *arg) {
|
||||||
#define CAN_INT1_PIN GPIO_NUM_26
|
|
||||||
|
|
||||||
void onRX0(void *arg) {
|
|
||||||
MCP2521 *mcp2521 = (MCP2521 *)arg;
|
MCP2521 *mcp2521 = (MCP2521 *)arg;
|
||||||
|
|
||||||
rx_info info = mcp2521->get_rx_id(MCP2521_RX_BUFFER::RXB0);
|
rx_info info = mcp2521->get_rx_id(MCP2521_RX_BUFFER::RXB0);
|
||||||
uint8_t data[8];
|
uint8_t data[8];
|
||||||
|
|
||||||
//mcp2521->read_rx_buf(MCP2521_RX_BUFFER::RXB0, MCP2521_BUFFER_TYPE::DATA, data, info.length);
|
mcp2521->read_rx_buf(MCP2521_RX_BUFFER::RXB0, MCP2521_BUFFER_TYPE::DATA, data, info.length);
|
||||||
|
|
||||||
printf("RX0: (%x) ", info.id);
|
printf("RX: (%x) ", info.id);
|
||||||
//for (int i = 0; i < 8; i++) {
|
for (int i = 0; i < info.length; i++) {
|
||||||
// printf("%x ", data[i]);
|
printf("%x ", data[i]);
|
||||||
//}
|
|
||||||
printf("\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void onRX1(void *arg) {
|
|
||||||
MCP2521 *mcp2521 = (MCP2521 *)arg;
|
|
||||||
|
|
||||||
rx_info info = mcp2521->get_rx_id(MCP2521_RX_BUFFER::RXB0);
|
|
||||||
uint8_t data[8];
|
|
||||||
|
|
||||||
//mcp2521->read_rx_buf(MCP2521_RX_BUFFER::RXB0, MCP2521_BUFFER_TYPE::DATA, data, info.length);
|
|
||||||
printf("RX1: (%x) ", info.id);
|
|
||||||
//for (int i = 0; i < 8; i++) {
|
|
||||||
// printf("%x ", data[i]);
|
|
||||||
//}
|
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,58 +52,46 @@ extern "C" void app_main() {
|
|||||||
const gpio_num_t LED_PIN = GPIO_NUM_2;
|
const gpio_num_t LED_PIN = GPIO_NUM_2;
|
||||||
gpio_set_direction(LED_PIN, GPIO_MODE_OUTPUT);
|
gpio_set_direction(LED_PIN, GPIO_MODE_OUTPUT);
|
||||||
|
|
||||||
|
gpio_set_direction(EXTERNAL_TRIGGER, GPIO_MODE_OUTPUT);
|
||||||
|
gpio_set_level(EXTERNAL_TRIGGER, true);
|
||||||
|
|
||||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||||
|
|
||||||
MCP2521_HardwareHandleFactory_ESPBus mcp2521_hardware_factory(
|
|
||||||
|
spi_bus_config_t spi_bus;
|
||||||
|
|
||||||
|
MCP2521_Hardware_Handle_ESP hardware_mcp2521(
|
||||||
VSPI_HOST,
|
VSPI_HOST,
|
||||||
|
&spi_bus,
|
||||||
SPI_PIN_MOSI,
|
SPI_PIN_MOSI,
|
||||||
SPI_PIN_MISO,
|
SPI_PIN_MISO,
|
||||||
SPI_PIN_SCLK
|
SPI_PIN_SCLK,
|
||||||
|
SPI_PIN_CS0,
|
||||||
|
CAN_INT_PIN
|
||||||
);
|
);
|
||||||
|
|
||||||
MCP2521_HardwareHandle_ESPBus hardware_mcp2521_0 = mcp2521_hardware_factory.create(CAN_INT0_PIN, SPI_PIN_CS0);
|
MCP2521 mcp2521(&hardware_mcp2521);
|
||||||
MCP2521_HardwareHandle_ESPBus hardware_mcp2521_1 = mcp2521_hardware_factory.create(CAN_INT1_PIN, SPI_PIN_CS1);
|
|
||||||
|
|
||||||
vTaskDelay(100 / portTICK_PERIOD_MS);
|
uint8_t data[4] = {0xf0, 0x42, 0x13, 0x37};
|
||||||
|
|
||||||
MCP2521 mcp2521_0(&hardware_mcp2521_0);
|
gpio_set_level(EXTERNAL_TRIGGER, false);
|
||||||
MCP2521 mcp2521_1(&hardware_mcp2521_1);
|
mcp2521.reset();
|
||||||
|
mcp2521.enable_interrupts(true, true, true, true, true, true, true, true);
|
||||||
|
|
||||||
uint8_t data[8] = {0x1, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
|
mcp2521.register_rx0_handler(onRX, &mcp2521);
|
||||||
|
mcp2521.register_rx1_handler(onRX, &mcp2521);
|
||||||
|
mcp2521.set_mode_of_operation(MCP2521_OPERATION_MODE::LOOPBACK, true);
|
||||||
|
|
||||||
mcp2521_0.reset();
|
vTaskDelay(3 / portTICK_PERIOD_MS);
|
||||||
mcp2521_1.reset();
|
|
||||||
mcp2521_0.enable_interrupts(true, true, true, true, true, true, true, true);
|
|
||||||
mcp2521_1.enable_interrupts(true, true, true, true, true, true, true, true);
|
|
||||||
|
|
||||||
mcp2521_0.register_rx0_handler(onRX0, &mcp2521_0);
|
mcp2521.prepare_tx(
|
||||||
mcp2521_1.register_rx0_handler(onRX1, &mcp2521_1);
|
MCP2521_TX_BUFFER::TXB0, 0x042, data, 4, false, false);
|
||||||
mcp2521_0.register_rx1_handler(onRX0, &mcp2521_0);
|
|
||||||
mcp2521_1.register_rx1_handler(onRX1, &mcp2521_1);
|
|
||||||
|
|
||||||
mcp2521_0.set_mode_of_operation(MCP2521_OPERATION_MODE::LOOPBACK, true);
|
mcp2521.request_to_send(MCP2521_TX_BUFFER::TXB0);
|
||||||
mcp2521_1.set_mode_of_operation(MCP2521_OPERATION_MODE::LOOPBACK, true);
|
|
||||||
|
|
||||||
//printf("CANSTAT0: %x\n", mcp2521_0.read_reg(MCP2521_CANSTAT));
|
mcp2521.set_tx_id(MCP2521_TX_BUFFER::TXB0, 0x041, false);
|
||||||
//printf("CANSTAT1: %x\n", mcp2521_1.read_reg(MCP2521_CANSTAT));
|
mcp2521.request_to_send(MCP2521_TX_BUFFER::TXB0);
|
||||||
|
|
||||||
vTaskDelay(20 / portTICK_PERIOD_MS);
|
|
||||||
|
|
||||||
mcp2521_1.prepare_tx(
|
|
||||||
MCP2521_TX_BUFFER::TXB0, 0x042, data, 8, false, false);
|
|
||||||
//mcp2521_1.prepare_tx(
|
|
||||||
// MCP2521_TX_BUFFER::TXB0, 0x041, data, 4, false, false);
|
|
||||||
|
|
||||||
|
|
||||||
vTaskDelay(20 / portTICK_PERIOD_MS);
|
|
||||||
mcp2521_1.request_to_send(MCP2521_TX_BUFFER::TXB0);
|
|
||||||
//vTaskDelay(10 / portTICK_PERIOD_MS);
|
|
||||||
//mcp2521_1.request_to_send(MCP2521_TX_BUFFER::TXB0);
|
|
||||||
|
|
||||||
//vTaskDelay(20 / portTICK_PERIOD_MS);
|
|
||||||
|
|
||||||
//mcp2521_0.set_tx_id(MCP2521_TX_BUFFER::TXB0, 0x042, false);
|
|
||||||
//mcp2521_0.request_to_send(MCP2521_TX_BUFFER::TXB0);
|
|
||||||
|
|
||||||
vTaskDelay(20 / portTICK_PERIOD_MS);
|
vTaskDelay(20 / portTICK_PERIOD_MS);
|
||||||
|
|
||||||
@@ -129,6 +100,6 @@ extern "C" void app_main() {
|
|||||||
gpio_set_level(LED_PIN, flag);
|
gpio_set_level(LED_PIN, flag);
|
||||||
flag = !flag;
|
flag = !flag;
|
||||||
|
|
||||||
vTaskDelay(500 / portTICK_PERIOD_MS);
|
vTaskDelay(100 / portTICK_PERIOD_MS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,152 +0,0 @@
|
|||||||
[General]
|
|
||||||
decode_signals=2
|
|
||||||
meta_objs=0
|
|
||||||
views=1
|
|
||||||
|
|
||||||
[D0]
|
|
||||||
color=4291714048
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
enabled=true
|
|
||||||
name=INT0
|
|
||||||
|
|
||||||
[D1]
|
|
||||||
color=4281623972
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
enabled=true
|
|
||||||
name=CLK
|
|
||||||
|
|
||||||
[D2]
|
|
||||||
color=4281623972
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
enabled=true
|
|
||||||
name=MOSI
|
|
||||||
|
|
||||||
[D3]
|
|
||||||
color=4281623972
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
enabled=true
|
|
||||||
name=MISO
|
|
||||||
|
|
||||||
[D4]
|
|
||||||
color=4294277376
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
enabled=true
|
|
||||||
name=CE0
|
|
||||||
|
|
||||||
[D5]
|
|
||||||
color=4279638298
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
enabled=true
|
|
||||||
name=INT1
|
|
||||||
|
|
||||||
[D6]
|
|
||||||
color=4279638298
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
enabled=true
|
|
||||||
name=CE1
|
|
||||||
|
|
||||||
[D7]
|
|
||||||
color=4285878395
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
enabled=true
|
|
||||||
name=D7
|
|
||||||
|
|
||||||
[decode_signal0]
|
|
||||||
channel0\assigned_signal_name=CLK
|
|
||||||
channel0\initial_pin_state=2
|
|
||||||
channel0\name=CLK
|
|
||||||
channel1\assigned_signal_name=MISO
|
|
||||||
channel1\initial_pin_state=2
|
|
||||||
channel1\name=MISO
|
|
||||||
channel2\assigned_signal_name=MOSI
|
|
||||||
channel2\initial_pin_state=2
|
|
||||||
channel2\name=MOSI
|
|
||||||
channel3\assigned_signal_name=CE0
|
|
||||||
channel3\initial_pin_state=2
|
|
||||||
channel3\name=CS#
|
|
||||||
channels=4
|
|
||||||
color=4294277376
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
decoder0\ann_class0\visible=true
|
|
||||||
decoder0\ann_class1\visible=true
|
|
||||||
decoder0\ann_class2\visible=true
|
|
||||||
decoder0\ann_class3\visible=true
|
|
||||||
decoder0\ann_class4\visible=true
|
|
||||||
decoder0\ann_class5\visible=true
|
|
||||||
decoder0\ann_class6\visible=true
|
|
||||||
decoder0\id=spi
|
|
||||||
decoder0\options=0
|
|
||||||
decoder0\row0\visible=true
|
|
||||||
decoder0\row1\visible=true
|
|
||||||
decoder0\row2\visible=true
|
|
||||||
decoder0\row3\visible=true
|
|
||||||
decoder0\row4\visible=true
|
|
||||||
decoder0\row5\visible=true
|
|
||||||
decoder0\row6\visible=true
|
|
||||||
decoder0\visible=true
|
|
||||||
decoders=1
|
|
||||||
enabled=true
|
|
||||||
name=SPI0
|
|
||||||
|
|
||||||
[decode_signal1]
|
|
||||||
channel0\assigned_signal_name=CLK
|
|
||||||
channel0\initial_pin_state=2
|
|
||||||
channel0\name=CLK
|
|
||||||
channel1\assigned_signal_name=MISO
|
|
||||||
channel1\initial_pin_state=2
|
|
||||||
channel1\name=MISO
|
|
||||||
channel2\assigned_signal_name=MOSI
|
|
||||||
channel2\initial_pin_state=2
|
|
||||||
channel2\name=MOSI
|
|
||||||
channel3\assigned_signal_name=CE1
|
|
||||||
channel3\initial_pin_state=2
|
|
||||||
channel3\name=CS#
|
|
||||||
channels=4
|
|
||||||
color=4279638298
|
|
||||||
conv_options=0
|
|
||||||
conversion_type=0
|
|
||||||
decoder0\ann_class0\visible=true
|
|
||||||
decoder0\ann_class1\visible=true
|
|
||||||
decoder0\ann_class2\visible=true
|
|
||||||
decoder0\ann_class3\visible=true
|
|
||||||
decoder0\ann_class4\visible=true
|
|
||||||
decoder0\ann_class5\visible=true
|
|
||||||
decoder0\ann_class6\visible=true
|
|
||||||
decoder0\id=spi
|
|
||||||
decoder0\options=0
|
|
||||||
decoder0\row0\visible=true
|
|
||||||
decoder0\row1\visible=true
|
|
||||||
decoder0\row2\visible=true
|
|
||||||
decoder0\row3\visible=true
|
|
||||||
decoder0\row4\visible=true
|
|
||||||
decoder0\row5\visible=true
|
|
||||||
decoder0\row6\visible=true
|
|
||||||
decoder0\visible=true
|
|
||||||
decoders=1
|
|
||||||
enabled=true
|
|
||||||
name=SPI1
|
|
||||||
|
|
||||||
[view0]
|
|
||||||
D0\trace_height=38
|
|
||||||
D1\trace_height=38
|
|
||||||
D2\trace_height=38
|
|
||||||
D3\trace_height=38
|
|
||||||
D4\trace_height=38
|
|
||||||
D5\trace_height=38
|
|
||||||
D6\trace_height=38
|
|
||||||
D7\trace_height=38
|
|
||||||
offset=22 serialization::archive 19 0 0 0 0 52315583 48568089 25582163 47181659 91047901 0 -8 1 0 6
|
|
||||||
scale=0.0021854614351496547
|
|
||||||
segment_display_mode=1
|
|
||||||
splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0Z\0\0\x5\xa2\x1\0\0\0\x1\x1\0\0\0\x1\0)
|
|
||||||
v_offset=-10
|
|
||||||
zero_offset=22 serialization::archive 19 0 0 0 0 0 0 0 0 0 0 0 0 0 6
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
idf_component_register(SRCS
|
|
||||||
"gobot_rpc_sender.cpp"
|
|
||||||
"gobot_rpc_receiver.cpp"
|
|
||||||
"gobot_rpc_statemaschine.cpp"
|
|
||||||
"gobot_rpc_numberMap.cpp"
|
|
||||||
"gobot_rpc_transiver.cpp"
|
|
||||||
REQUIRES mcp2521
|
|
||||||
REQUIRES mcp2521_hardware_interface
|
|
||||||
REQUIRES driver
|
|
||||||
INCLUDE_DIRS "include")
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
#include "gobot_rpc.hpp"
|
|
||||||
#include "protocol_spec.hpp"
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
GobotRPCNumberMap::GobotRPCNumberMap() {
|
|
||||||
memset(rpc_number_map, 0xffffffff, 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
GobotRPCNumberMap::~GobotRPCNumberMap() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void GobotRPCNumberMap::set(RpcNum rpc_num, uint32_t id) {
|
|
||||||
rpc_number_map[(int)rpc_num] = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t GobotRPCNumberMap::get(RpcNum rpc_num) {
|
|
||||||
return rpc_number_map[(int)rpc_num];
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
#include <string.h>
|
|
||||||
#include "gobot_rpc.hpp"
|
|
||||||
#include "sm.hpp"
|
|
||||||
#include "protocol_spec.hpp"
|
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
|
|
||||||
GobotRPCReciver::GobotRPCReciver(MCP2521 * can_interface) {
|
|
||||||
this->can_interface = can_interface;
|
|
||||||
this->state_mashine = GobotRPCStateMashine();
|
|
||||||
|
|
||||||
can_interface->register_rx0_handler(onRX0_GoboRPC, can_interface);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void onRX0_GoboRPC(void *arg) {
|
|
||||||
GobotRPCReciver *rpc_socket = (GobotRPCReciver *)arg;
|
|
||||||
rpc_socket->onRX();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GobotRPCReciver::onRX() {
|
|
||||||
rx_info info = can_interface->get_rx_id(MCP2521_RX_BUFFER::RXB0);
|
|
||||||
uint8_t data[8];
|
|
||||||
|
|
||||||
can_interface->read_rx_buf(MCP2521_RX_BUFFER::RXB0, MCP2521_BUFFER_TYPE::DATA, data, info.length);
|
|
||||||
|
|
||||||
RPCFrame frame;
|
|
||||||
memcpy(((char *)data) + 1, (char *)frame.data, 7);
|
|
||||||
frame.header = (RPCHeader)(data[0]);
|
|
||||||
|
|
||||||
SMResult smResult;
|
|
||||||
state_mashine.submitFrame(&frame, &smResult);
|
|
||||||
|
|
||||||
if(smResult.done) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GobotRPCReciver::registerOnDoneFrameHandler(GobotRPCHandler_t handler, void * arg) {
|
|
||||||
onDoneFrameHandler = handler;
|
|
||||||
argOnDoneFrameHandler = arg;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
#include "sm.hpp"
|
|
||||||
#include "protocol_spec.hpp"
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
GobotRPCStateMashine::GobotRPCStateMashine() {
|
|
||||||
memset(requestDataBuffer, 0, REQUEST_DATA_BUFFER_SIZE*sizeof(uint8_t)*SLOTS);
|
|
||||||
memset(responseDataBuffer, 0, RESPONSE_DATA_BUFFER_SIZE*sizeof(uint8_t)*SLOTS);
|
|
||||||
memset(errorDataBuffer, 0, RESPONSE_DATA_BUFFER_SIZE*sizeof(uint8_t)*SLOTS);
|
|
||||||
|
|
||||||
memset(requestSegmentArrivedFlags, 0, sizeof(uint8_t)*SLOTS);
|
|
||||||
memset(responseSegmentArrivedFlags, 0, sizeof(uint8_t)*SLOTS);
|
|
||||||
memset(errorSegmentArrivedFlags, 0, sizeof(uint8_t)*SLOTS);
|
|
||||||
|
|
||||||
slotCounter = 0;
|
|
||||||
rpc_number_map = GobotRPCNumberMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GobotRPCStateMashine::registerRPC(RpcNum rpc_num) {
|
|
||||||
rpc_number_map.set(rpc_num, slotCounter);
|
|
||||||
slotCounter = (slotCounter + 1) % SLOTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GobotRPCStateMashine::submitFrame(RPCFrame * frame, SMResult * result) {
|
|
||||||
RpcNum rpcNum = (RpcNum)(frame->header.rpc_num);
|
|
||||||
|
|
||||||
result->done = false;
|
|
||||||
result->rpc_num = rpcNum;
|
|
||||||
|
|
||||||
if(rpcNum == RpcNum::INVALID)
|
|
||||||
return;
|
|
||||||
|
|
||||||
size_t slot = rpc_number_map.get(rpcNum);
|
|
||||||
if (slot == 0xffffffff)
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint8_t segNum = frame->header.rpc_segement;
|
|
||||||
|
|
||||||
if(frame->header.error) {
|
|
||||||
memcpy(result->data, frame->data, 7);
|
|
||||||
errorSegmentArrivedFlags[slot] |= (1 << segNum);
|
|
||||||
|
|
||||||
result->done = true;
|
|
||||||
result->type = RPCPackageType::ERROR;
|
|
||||||
|
|
||||||
} else if(frame->header.response) {
|
|
||||||
memcpy(responseDataBuffer[slot] + segNum, frame->data, 7);
|
|
||||||
responseSegmentArrivedFlags[slot] |= (1 << segNum);
|
|
||||||
|
|
||||||
uint8_t mask = SEGMENT_MASK_RESPONSE[(int)rpcNum];
|
|
||||||
|
|
||||||
if(((responseSegmentArrivedFlags[slot] & mask) ^ mask) == 0) {
|
|
||||||
responseSegmentArrivedFlags[slot] = 0;
|
|
||||||
|
|
||||||
result->done = true;
|
|
||||||
memcpy(result->data, responseDataBuffer[slot], 7*4);
|
|
||||||
result->type = RPCPackageType::RESPONSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
memcpy(requestDataBuffer[slot] + segNum, frame->data, 7);
|
|
||||||
requestSegmentArrivedFlags[slot] |= (1 << segNum);
|
|
||||||
|
|
||||||
uint8_t mask = SEGMENT_MASK_RESPONSE[(int)rpcNum];
|
|
||||||
|
|
||||||
if(((requestSegmentArrivedFlags[slot] & mask) ^ mask) == 0) {
|
|
||||||
requestSegmentArrivedFlags[slot] = 0;
|
|
||||||
|
|
||||||
result->done = true;
|
|
||||||
memcpy(result->data, requestDataBuffer[slot], 7*4);
|
|
||||||
result->type = RPCPackageType::REQUEST;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,56 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include "protocol_spec.hpp"
|
|
||||||
#include "mcp2521.hpp"
|
|
||||||
#include "sm.hpp"
|
|
||||||
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef void (*GobotRPCHandler_t)(void *);
|
|
||||||
typedef void (*GobotRPCFrameHandler)(void *, RPCFrame *);
|
|
||||||
|
|
||||||
class GobotRPCReciver {
|
|
||||||
protected:
|
|
||||||
MCP2521 * can_interface;
|
|
||||||
GobotRPCStateMashine state_mashine;
|
|
||||||
|
|
||||||
GobotRPCHandler_t onDoneFrameHandler;
|
|
||||||
void * argOnDoneFrameHandler;
|
|
||||||
|
|
||||||
public:
|
|
||||||
GobotRPCReciver(MCP2521 * can_interface);
|
|
||||||
~GobotRPCReciver();
|
|
||||||
|
|
||||||
void onRX();
|
|
||||||
|
|
||||||
void registerOnDoneFrameHandler(GobotRPCHandler_t handler, void * arg);
|
|
||||||
};
|
|
||||||
|
|
||||||
void onRX0_GoboRPC(void *arg);
|
|
||||||
|
|
||||||
class GoboRPCTransiver {
|
|
||||||
private:
|
|
||||||
MCP2521 * can_interface;
|
|
||||||
GobotRPCReciver rx;
|
|
||||||
|
|
||||||
GobotRPCHandler_t onRequestHandler;
|
|
||||||
GobotRPCHandler_t onResponseHandler;
|
|
||||||
GobotRPCHandler_t onResponseErrorHandler;
|
|
||||||
|
|
||||||
void * argOnRequestHandler;
|
|
||||||
void * argOnResponseHandler;
|
|
||||||
void * argOnResponseErrorHandler;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
GoboRPCTransiver(MCP2521 * can_interface);
|
|
||||||
~GoboRPCTransiver();
|
|
||||||
|
|
||||||
void send(RPCFrame * frame);
|
|
||||||
|
|
||||||
void registerOnRequestHandler(GobotRPCHandler_t handler, void * arg);
|
|
||||||
void registerOnResponseHandler(GobotRPCHandler_t handler, void * arg);
|
|
||||||
void registerOnResponseErrorHandler(GobotRPCHandler_t handler, void * arg);
|
|
||||||
};
|
|
||||||
@@ -1,123 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
enum RpcNum {
|
|
||||||
Get_Info = 0x0,
|
|
||||||
Home = 0x1,
|
|
||||||
Move_Step = 0x2,
|
|
||||||
Move_XY = 0x3,
|
|
||||||
Set_Padding = 0x4,
|
|
||||||
Release_Motors = 0x5,
|
|
||||||
Drop_Stones = 0x6,
|
|
||||||
Get_Stone_Status = 0x7,
|
|
||||||
Mov_Z_Axis = 0x8,
|
|
||||||
Set_Vacum = 0x9,
|
|
||||||
INVALID = 0xF,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RPCHeader {
|
|
||||||
unsigned char rpc_num : 4;
|
|
||||||
unsigned char response : 1;
|
|
||||||
unsigned char error : 1;
|
|
||||||
unsigned char rpc_segement : 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RPCFrame {
|
|
||||||
RPCHeader header;
|
|
||||||
uint8_t data[7];
|
|
||||||
};
|
|
||||||
|
|
||||||
enum RPC_Node_Type {
|
|
||||||
NODE_ALL = 0x0,
|
|
||||||
NODE_CORE_XY = 0x1,
|
|
||||||
NODE_HEAD = 0x2,
|
|
||||||
NODE_VACUM = 0x3,
|
|
||||||
};
|
|
||||||
|
|
||||||
// RPC Request and Response structures
|
|
||||||
struct RPC_RES_Get_Info {
|
|
||||||
uint32_t can_address;
|
|
||||||
RPC_Node_Type node_type;
|
|
||||||
uint32_t status;
|
|
||||||
uint32_t error;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum RPC_Home_Corner {
|
|
||||||
HOME_CORNER_0 = 0b00,
|
|
||||||
HOME_CORNER_1 = 0b01,
|
|
||||||
HOME_CORNER_2 = 0b10,
|
|
||||||
HOME_CORNER_3 = 0b11,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RPC_REQ_Home {
|
|
||||||
RPC_Home_Corner corner;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RPC_RES_Home {
|
|
||||||
uint32_t x;
|
|
||||||
uint32_t y;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RPC_REQ_Move_Step {
|
|
||||||
int32_t x;
|
|
||||||
int32_t y;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RPC_RES_Move_Step {
|
|
||||||
uint32_t x;
|
|
||||||
uint32_t y;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RPC_REQ_Set_Padding {
|
|
||||||
uint32_t c_1x;
|
|
||||||
uint32_t c_1y;
|
|
||||||
uint32_t c_2x;
|
|
||||||
uint32_t c_2y;
|
|
||||||
uint8_t n_x;
|
|
||||||
uint8_t n_y;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RPC_REQ_Move_Z_Axis {
|
|
||||||
bool up;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct RPC_REQ_Set_Vacum {
|
|
||||||
bool on;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Segment3, Segment2, Segment1, Segment0
|
|
||||||
const uint8_t SEGMENT_MASK_REQUEST[16] = {
|
|
||||||
0b0001, // Get_Info
|
|
||||||
0b0001, // Home
|
|
||||||
0b0001, // Move_Step
|
|
||||||
0b0001, // Move_XY
|
|
||||||
0b0111, // Set_Padding
|
|
||||||
0b0001, // Release_Motors
|
|
||||||
0b0001, // Drop_Stones
|
|
||||||
0b0001, // Get_Stone_Status
|
|
||||||
0b0001, // Mov_Z_Axis
|
|
||||||
0b0001, // Set_Vacum
|
|
||||||
0b0001, //
|
|
||||||
0b0001, //
|
|
||||||
0b0001, //
|
|
||||||
0b0001, //
|
|
||||||
0b0001, //
|
|
||||||
};
|
|
||||||
|
|
||||||
const uint8_t SEGMENT_MASK_RESPONSE[16] = {
|
|
||||||
0b0001, // Get_Info
|
|
||||||
0b0001, // Home
|
|
||||||
0b0001, // Move_Step
|
|
||||||
0b0001, // Move_XY
|
|
||||||
0b0001, // Set_Padding
|
|
||||||
0b0001, // Release_Motors
|
|
||||||
0b0001, // Drop_Stones
|
|
||||||
0b0001, // Get_Stone_Status
|
|
||||||
0b0001, // Mov_Z_Axis
|
|
||||||
0b0001, // Set_Vacum
|
|
||||||
0b0001, //
|
|
||||||
0b0001, //
|
|
||||||
0b0001, //
|
|
||||||
0b0001, //
|
|
||||||
0b0001, //
|
|
||||||
};
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
#include <stdint.h>
|
|
||||||
#include "protocol_spec.hpp"
|
|
||||||
#include <strings.h>
|
|
||||||
|
|
||||||
class GobotRPCNumberMap {
|
|
||||||
private:
|
|
||||||
int32_t rpc_number_map[16];
|
|
||||||
public:
|
|
||||||
GobotRPCNumberMap();
|
|
||||||
~GobotRPCNumberMap();
|
|
||||||
|
|
||||||
void set(RpcNum rpc_num, uint32_t id);
|
|
||||||
uint32_t get(RpcNum rpc_num);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
enum RPCPackageType {
|
|
||||||
REQUEST,
|
|
||||||
RESPONSE,
|
|
||||||
ERROR
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SMResult {
|
|
||||||
bool done;
|
|
||||||
uint8_t data[7*4];
|
|
||||||
RpcNum rpc_num;
|
|
||||||
RPCPackageType type;
|
|
||||||
};
|
|
||||||
|
|
||||||
class GobotRPCStateMashine {
|
|
||||||
private:
|
|
||||||
static const size_t SLOTS = 6;
|
|
||||||
static const size_t REQUEST_DATA_BUFFER_SIZE = 7*4;
|
|
||||||
static const size_t RESPONSE_DATA_BUFFER_SIZE = 7*4;
|
|
||||||
|
|
||||||
|
|
||||||
GobotRPCNumberMap rpc_number_map;
|
|
||||||
size_t slotCounter;
|
|
||||||
|
|
||||||
uint8_t requestDataBuffer[REQUEST_DATA_BUFFER_SIZE][SLOTS];
|
|
||||||
bool requestSegmentArrivedFlags [SLOTS];
|
|
||||||
|
|
||||||
uint8_t responseDataBuffer[RESPONSE_DATA_BUFFER_SIZE][SLOTS];
|
|
||||||
uint8_t responseSegmentArrivedFlags [SLOTS];
|
|
||||||
|
|
||||||
uint8_t errorDataBuffer[RESPONSE_DATA_BUFFER_SIZE][SLOTS];
|
|
||||||
uint8_t errorSegmentArrivedFlags [SLOTS];
|
|
||||||
|
|
||||||
public:
|
|
||||||
GobotRPCStateMashine();
|
|
||||||
~GobotRPCStateMashine();
|
|
||||||
|
|
||||||
void registerRPC(RpcNum rpc_num);
|
|
||||||
|
|
||||||
void submitFrame(RPCFrame * frame, SMResult * result);
|
|
||||||
|
|
||||||
};
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.17 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.17">
|
|
||||||
<diagram name="Page-1" id="FmQN2vLuPXQQGOlHbBG4">
|
|
||||||
<mxGraphModel dx="1434" dy="838" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
|
||||||
<root>
|
|
||||||
<mxCell id="0" />
|
|
||||||
<mxCell id="1" parent="0" />
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;endArrow=diamondThin;endFill=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-1" target="xzzxaMGRirp7Gwq30BhV-18" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-1" value="«interface»<br><font face="Courier New"><b>I_MCP2521_</b><b>HardwareHandle</b></font>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="520" y="120" width="200" height="60" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-9" value="<b><font face="Courier New">MCP2521_HardwareHandle_ESP</font></b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="230" y="260" width="250" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-11" value="<b><font face="Courier New">MCP2521_</font></b><b><font face="Courier New">HardwareHandle_ESPBus</font></b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="230" y="200" width="250" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-12" value="" style="endArrow=none;dashed=1;html=1;rounded=0;exitX=1;exitY=1;exitDx=0;exitDy=0;strokeWidth=1;dashPattern=1 1;" parent="1" source="xzzxaMGRirp7Gwq30BhV-14" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="1060" y="320" as="sourcePoint" />
|
|
||||||
<mxPoint x="120" y="320" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-14" value="SPI - Hardware Level" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="760" y="280" width="160" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-15" value="" style="endArrow=block;html=1;rounded=0;dashed=1;endFill=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-11" target="xzzxaMGRirp7Gwq30BhV-1" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="590" y="290" as="sourcePoint" />
|
|
||||||
<mxPoint x="640" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="570" y="220" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-16" value="" style="endArrow=block;html=1;rounded=0;dashed=1;endFill=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-9" target="xzzxaMGRirp7Gwq30BhV-1" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="520" y="280" as="sourcePoint" />
|
|
||||||
<mxPoint x="580" y="250" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="620" y="280" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-17" value="MCP2521 - Device Level" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="760" y="388" width="160" height="32" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-18" value="<b><font face="Courier New">MCP2521_CommandInterface</font></b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="520" y="340" width="200" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-19" value="<b>MCP2521</b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="520" y="420" width="200" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-20" value="" style="endArrow=block;html=1;rounded=0;endFill=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-19" target="xzzxaMGRirp7Gwq30BhV-18" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="670" y="544" as="sourcePoint" />
|
|
||||||
<mxPoint x="720" y="494" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.746;entryY=0.064;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-22" target="xzzxaMGRirp7Gwq30BhV-11" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-24" value="creates" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="xzzxaMGRirp7Gwq30BhV-23" vertex="1" connectable="0">
|
|
||||||
<mxGeometry x="-0.3135" y="1" relative="1" as="geometry">
|
|
||||||
<mxPoint x="16" y="1" as="offset" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-22" value="<b><font face="Courier New">MCP2521_HardwareHandleFactory_ESPBus</font></b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="180" y="120" width="300" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-25" value="" style="endArrow=none;dashed=1;html=1;rounded=0;exitX=1;exitY=1;exitDx=0;exitDy=0;strokeWidth=1;dashPattern=1 1;" parent="1" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="920" y="480" as="sourcePoint" />
|
|
||||||
<mxPoint x="120" y="480" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-26" value="Network Stack" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="760" y="480" width="160" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-27" value="<b>Socket_CANTP</b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="520" y="500" width="200" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-28" value="<b>Socket_GoBotRPC</b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="520" y="580" width="200" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;endArrow=diamondThin;endFill=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" target="xzzxaMGRirp7Gwq30BhV-27" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="619.76" y="460" as="sourcePoint" />
|
|
||||||
<mxPoint x="640" y="520" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;endArrow=diamondThin;endFill=0;" parent="1" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="619.5799999999999" y="540" as="sourcePoint" />
|
|
||||||
<mxPoint x="619.9699999999999" y="580" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
</root>
|
|
||||||
</mxGraphModel>
|
|
||||||
</diagram>
|
|
||||||
</mxfile>
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.17 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.17">
|
|
||||||
<diagram name="Page-1" id="FmQN2vLuPXQQGOlHbBG4">
|
|
||||||
<mxGraphModel dx="1195" dy="698" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
|
||||||
<root>
|
|
||||||
<mxCell id="0" />
|
|
||||||
<mxCell id="1" parent="0" />
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;endArrow=diamondThin;endFill=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-1" target="xzzxaMGRirp7Gwq30BhV-18" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-1" value="«interface»<br><font face="Courier New"><b>I_MCP2521_</b><b>HardwareHandle</b></font>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="520" y="120" width="200" height="60" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-9" value="<b><font face="Courier New">MCP2521_HardwareHandle_ESP</font></b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="230" y="260" width="250" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-11" value="<b><font face="Courier New">MCP2521_</font></b><b><font face="Courier New">HardwareHandle_ESPBus</font></b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="230" y="200" width="250" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-12" value="" style="endArrow=none;dashed=1;html=1;rounded=0;exitX=1;exitY=1;exitDx=0;exitDy=0;strokeWidth=1;dashPattern=1 1;" parent="1" source="xzzxaMGRirp7Gwq30BhV-14" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="1060" y="320" as="sourcePoint" />
|
|
||||||
<mxPoint x="120" y="320" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-14" value="SPI - Hardware Level" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="760" y="280" width="160" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-15" value="" style="endArrow=block;html=1;rounded=0;dashed=1;endFill=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.25;entryY=1;entryDx=0;entryDy=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-11" target="xzzxaMGRirp7Gwq30BhV-1" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="590" y="290" as="sourcePoint" />
|
|
||||||
<mxPoint x="640" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="570" y="220" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-16" value="" style="endArrow=block;html=1;rounded=0;dashed=1;endFill=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-9" target="xzzxaMGRirp7Gwq30BhV-1" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="520" y="280" as="sourcePoint" />
|
|
||||||
<mxPoint x="580" y="250" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="620" y="280" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-17" value="MCP2521 - Device Level" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="760" y="388" width="160" height="32" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-18" value="<b><font face="Courier New">MCP2521_CommandInterface</font></b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="520" y="340" width="200" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-19" value="<b>MCP2521</b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="520" y="420" width="200" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-20" value="" style="endArrow=block;html=1;rounded=0;endFill=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-19" target="xzzxaMGRirp7Gwq30BhV-18" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="670" y="544" as="sourcePoint" />
|
|
||||||
<mxPoint x="720" y="494" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-23" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.746;entryY=0.064;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="xzzxaMGRirp7Gwq30BhV-22" target="xzzxaMGRirp7Gwq30BhV-11" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-24" value="creates" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="xzzxaMGRirp7Gwq30BhV-23" vertex="1" connectable="0">
|
|
||||||
<mxGeometry x="-0.3135" y="1" relative="1" as="geometry">
|
|
||||||
<mxPoint x="16" y="1" as="offset" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-22" value="<b><font face="Courier New">MCP2521_HardwareHandleFactory_ESPBus</font></b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="180" y="120" width="300" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-25" value="" style="endArrow=none;dashed=1;html=1;rounded=0;exitX=1;exitY=1;exitDx=0;exitDy=0;strokeWidth=1;dashPattern=1 1;" parent="1" edge="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="920" y="480" as="sourcePoint" />
|
|
||||||
<mxPoint x="120" y="480" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-26" value="Network Stack" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="760" y="480" width="160" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-28" value="<b>Socket_GoBotRPC</b>" style="html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
|
||||||
<mxGeometry x="520" y="500" width="200" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="xzzxaMGRirp7Gwq30BhV-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;endArrow=diamondThin;endFill=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" target="xzzxaMGRirp7Gwq30BhV-28" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="619.76" y="460" as="sourcePoint" />
|
|
||||||
<mxPoint x="620" y="500" as="targetPoint" />
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
</root>
|
|
||||||
</mxGraphModel>
|
|
||||||
</diagram>
|
|
||||||
</mxfile>
|
|
||||||
@@ -3,5 +3,4 @@
|
|||||||
#include "mcp2521_toplevel.hpp"
|
#include "mcp2521_toplevel.hpp"
|
||||||
#include "mcp2521_command.hpp"
|
#include "mcp2521_command.hpp"
|
||||||
#include "mcp2521_hardware_esp.hpp"
|
#include "mcp2521_hardware_esp.hpp"
|
||||||
#include "mcp2521_hardware_esp_bus_factory.hpp"
|
|
||||||
#include "mcp2521_addresses.hpp"
|
#include "mcp2521_addresses.hpp"
|
||||||
@@ -40,9 +40,9 @@ struct rx_info {
|
|||||||
uint8_t length;
|
uint8_t length;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MCP2521_CommandInterface {
|
class MCP2521_Command_Interface {
|
||||||
private:
|
private:
|
||||||
I_MCP2521_HardwareHandle * hardware_handle;
|
MCP2521_Hardware_Handle * hardware_handle;
|
||||||
|
|
||||||
intHandlerFunction_t rx0_handler;
|
intHandlerFunction_t rx0_handler;
|
||||||
intHandlerFunction_t rx1_handler;
|
intHandlerFunction_t rx1_handler;
|
||||||
@@ -63,8 +63,8 @@ private:
|
|||||||
void * message_error_handler_arg;
|
void * message_error_handler_arg;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MCP2521_CommandInterface(
|
MCP2521_Command_Interface(
|
||||||
I_MCP2521_HardwareHandle * hardware_handle
|
MCP2521_Hardware_Handle * hardware_handle
|
||||||
);
|
);
|
||||||
|
|
||||||
void handleInterrupt();
|
void handleInterrupt();
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "mcp2521_command.hpp"
|
#include "mcp2521_command.hpp"
|
||||||
#include "mcp2521_addresses.hpp"
|
#include "mcp2521_addresses.hpp"
|
||||||
|
|
||||||
class MCP2521 : public MCP2521_CommandInterface {
|
class MCP2521 : public MCP2521_Command_Interface {
|
||||||
private:
|
private:
|
||||||
public:
|
public:
|
||||||
void set_tx_id(MCP2521_TX_BUFFER buffer, uint16_t id, bool extended);
|
void set_tx_id(MCP2521_TX_BUFFER buffer, uint16_t id, bool extended);
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
#include "mcp2521_addresses.hpp"
|
#include "mcp2521_addresses.hpp"
|
||||||
|
|
||||||
void runIntHandler(void *arg) {
|
void runIntHandler(void *arg) {
|
||||||
MCP2521_CommandInterface *command_interface = (MCP2521_CommandInterface *)arg;
|
MCP2521_Command_Interface *command_interface = (MCP2521_Command_Interface *)arg;
|
||||||
command_interface->handleInterrupt();
|
command_interface->handleInterrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
MCP2521_CommandInterface::MCP2521_CommandInterface(
|
MCP2521_Command_Interface::MCP2521_Command_Interface(
|
||||||
I_MCP2521_HardwareHandle * hardware_handle
|
MCP2521_Hardware_Handle * hardware_handle
|
||||||
) {
|
) {
|
||||||
this->hardware_handle = hardware_handle;
|
this->hardware_handle = hardware_handle;
|
||||||
this->hardware_handle->registerIntHandler(runIntHandler, (void *)this);
|
this->hardware_handle->registerIntHandler(runIntHandler, (void *)this);
|
||||||
@@ -33,42 +33,42 @@ MCP2521_CommandInterface::MCP2521_CommandInterface(
|
|||||||
message_error_handler_arg = NULL;
|
message_error_handler_arg = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::reset() {
|
void MCP2521_Command_Interface::reset() {
|
||||||
hardware_handle->execute(MCP2521_OP_RESET);
|
hardware_handle->execute(MCP2521_OP_RESET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::read_reg(uint8_t address, uint8_t *data, size_t length) {
|
void MCP2521_Command_Interface::read_reg(uint8_t address, uint8_t *data, size_t length) {
|
||||||
hardware_handle->read(MCP2521_OP_READ, data, length, address);
|
hardware_handle->read(MCP2521_OP_READ, data, length, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t MCP2521_CommandInterface::read_reg(uint8_t address) {
|
uint8_t MCP2521_Command_Interface::read_reg(uint8_t address) {
|
||||||
return hardware_handle->read(MCP2521_OP_READ, address);
|
return hardware_handle->read(MCP2521_OP_READ, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::read_rx_buf(MCP2521_RX_BUFFER buffer, MCP2521_BUFFER_TYPE type, uint8_t *data, size_t length) {
|
void MCP2521_Command_Interface::read_rx_buf(MCP2521_RX_BUFFER buffer, MCP2521_BUFFER_TYPE type, uint8_t *data, size_t length) {
|
||||||
uint8_t address = (buffer << 1) | (type << 2);
|
uint8_t address = (buffer << 1) | (type << 2);
|
||||||
hardware_handle->read(MCP2521_OP_READ_RX_BUFFER | address, data, length);
|
hardware_handle->read(MCP2521_OP_READ_RX_BUFFER | address, data, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::write_reg(uint8_t address, uint8_t *data, size_t length) {
|
void MCP2521_Command_Interface::write_reg(uint8_t address, uint8_t *data, size_t length) {
|
||||||
hardware_handle->write(MCP2521_OP_WRITE, data, length, address);
|
hardware_handle->write(MCP2521_OP_WRITE, data, length, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::write_reg(uint8_t address, uint8_t data) {
|
void MCP2521_Command_Interface::write_reg(uint8_t address, uint8_t data) {
|
||||||
hardware_handle->write(MCP2521_OP_WRITE, data, address);
|
hardware_handle->write(MCP2521_OP_WRITE, data, address);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::write_tx_buf(MCP2521_TX_BUFFER buffer, MCP2521_BUFFER_TYPE type, uint8_t *data, size_t length) {
|
void MCP2521_Command_Interface::write_tx_buf(MCP2521_TX_BUFFER buffer, MCP2521_BUFFER_TYPE type, uint8_t *data, size_t length) {
|
||||||
uint8_t address = (buffer << 1) | (type);
|
uint8_t address = (buffer << 1) | (type);
|
||||||
hardware_handle->write(MCP2521_OP_LOAD_TX_BUFFER | address, data, length);
|
hardware_handle->write(MCP2521_OP_LOAD_TX_BUFFER | address, data, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::request_to_send(bool txb2, bool txb1, bool txb0) {
|
void MCP2521_Command_Interface::request_to_send(bool txb2, bool txb1, bool txb0) {
|
||||||
uint8_t data = (txb2 << 2) | (txb1 << 1) | txb0;
|
uint8_t data = (txb2 << 2) | (txb1 << 1) | txb0;
|
||||||
hardware_handle->execute(MCP2521_OP_RTS | data);
|
hardware_handle->execute(MCP2521_OP_RTS | data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::request_to_send(MCP2521_TX_BUFFER buffer) {
|
void MCP2521_Command_Interface::request_to_send(MCP2521_TX_BUFFER buffer) {
|
||||||
uint8_t mask = 0;
|
uint8_t mask = 0;
|
||||||
|
|
||||||
switch (buffer) {
|
switch (buffer) {
|
||||||
@@ -86,15 +86,15 @@ void MCP2521_CommandInterface::request_to_send(MCP2521_TX_BUFFER buffer) {
|
|||||||
hardware_handle->execute(MCP2521_OP_RTS | mask);
|
hardware_handle->execute(MCP2521_OP_RTS | mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t MCP2521_CommandInterface::read_status() {
|
uint8_t MCP2521_Command_Interface::read_status() {
|
||||||
return hardware_handle->read(MCP2521_OP_READ_STATUS);
|
return hardware_handle->read(MCP2521_OP_READ_STATUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t MCP2521_CommandInterface::read_rx_status() {
|
uint8_t MCP2521_Command_Interface::read_rx_status() {
|
||||||
return hardware_handle->read(MCP2521_OP_RX_STATUS);
|
return hardware_handle->read(MCP2521_OP_RX_STATUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::bit_modify(uint8_t address, uint8_t mask, uint8_t data) {
|
void MCP2521_Command_Interface::bit_modify(uint8_t address, uint8_t mask, uint8_t data) {
|
||||||
uint8_t data_array[3] = {address, mask, data};
|
uint8_t data_array[3] = {address, mask, data};
|
||||||
hardware_handle->write(MCP2521_OP_BIT_MODIFY, data_array, 3);
|
hardware_handle->write(MCP2521_OP_BIT_MODIFY, data_array, 3);
|
||||||
}
|
}
|
||||||
@@ -1,47 +1,47 @@
|
|||||||
#include "mcp2521.hpp"
|
#include "mcp2521.hpp"
|
||||||
#include "mcp2521_addresses.hpp"
|
#include "mcp2521_addresses.hpp"
|
||||||
|
|
||||||
void MCP2521_CommandInterface::register_rx0_handler(intHandlerFunction_t handler, void* args) {
|
void MCP2521_Command_Interface::register_rx0_handler(intHandlerFunction_t handler, void* args) {
|
||||||
rx0_handler = handler;
|
rx0_handler = handler;
|
||||||
rx0_handler_arg = args;
|
rx0_handler_arg = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::register_rx1_handler(intHandlerFunction_t handler, void* args) {
|
void MCP2521_Command_Interface::register_rx1_handler(intHandlerFunction_t handler, void* args) {
|
||||||
rx1_handler = handler;
|
rx1_handler = handler;
|
||||||
rx1_handler_arg = args;
|
rx1_handler_arg = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::register_tx0_handler(intHandlerFunction_t handler, void* args) {
|
void MCP2521_Command_Interface::register_tx0_handler(intHandlerFunction_t handler, void* args) {
|
||||||
tx0_handler = handler;
|
tx0_handler = handler;
|
||||||
tx0_handler_arg = args;
|
tx0_handler_arg = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::register_tx1_handler(intHandlerFunction_t handler, void* args) {
|
void MCP2521_Command_Interface::register_tx1_handler(intHandlerFunction_t handler, void* args) {
|
||||||
tx1_handler = handler;
|
tx1_handler = handler;
|
||||||
tx1_handler_arg = args;
|
tx1_handler_arg = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::register_tx2_handler(intHandlerFunction_t handler, void* args) {
|
void MCP2521_Command_Interface::register_tx2_handler(intHandlerFunction_t handler, void* args) {
|
||||||
tx2_handler = handler;
|
tx2_handler = handler;
|
||||||
tx2_handler_arg = args;
|
tx2_handler_arg = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::register_error_handler(intHandlerFunction_t handler, void* args) {
|
void MCP2521_Command_Interface::register_error_handler(intHandlerFunction_t handler, void* args) {
|
||||||
error_handler = handler;
|
error_handler = handler;
|
||||||
error_handler_arg = args;
|
error_handler_arg = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::register_wakeup_handler(intHandlerFunction_t handler, void* args) {
|
void MCP2521_Command_Interface::register_wakeup_handler(intHandlerFunction_t handler, void* args) {
|
||||||
wakeup_handler = handler;
|
wakeup_handler = handler;
|
||||||
wakeup_handler_arg = args;
|
wakeup_handler_arg = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::register_message_error_handler(intHandlerFunction_t handler, void* args) {
|
void MCP2521_Command_Interface::register_message_error_handler(intHandlerFunction_t handler, void* args) {
|
||||||
message_error_handler = handler;
|
message_error_handler = handler;
|
||||||
message_error_handler_arg = args;
|
message_error_handler_arg = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_CommandInterface::handleInterrupt() {
|
void MCP2521_Command_Interface::handleInterrupt() {
|
||||||
uint8_t flags = read_reg(MCP2521_CANINTF);
|
uint8_t flags = read_reg(MCP2521_CANINTF);
|
||||||
uint8_t clearBits = 0;
|
uint8_t clearBits = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
idf_component_register(SRCS "esp_implementation_init.cpp"
|
idf_component_register(SRCS "esp_implementation_init.cpp"
|
||||||
"esp_implementation_cmd.cpp"
|
"esp_implementation_cmd.cpp"
|
||||||
"esp_implementation_int.cpp"
|
"esp_implementation_int.cpp"
|
||||||
"esp_implementation_bus.cpp"
|
|
||||||
"esp_implementation_bus_factory.cpp"
|
|
||||||
INCLUDE_DIRS "include"
|
INCLUDE_DIRS "include"
|
||||||
REQUIRES driver)
|
REQUIRES driver)
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
#ifdef ESP_PLATFORM
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
|
|
||||||
#include "mcp2521_hardware_esp_bus.hpp"
|
|
||||||
#include "mcp2521_hardware_esp.hpp"
|
|
||||||
|
|
||||||
MCP2521_HardwareHandle_ESPBus::MCP2521_HardwareHandle_ESPBus(
|
|
||||||
QueueHandle_t send_queue,
|
|
||||||
spi_host_device_t spi_host,
|
|
||||||
spi_bus_config_t * bus_config,
|
|
||||||
gpio_num_t cs,
|
|
||||||
gpio_num_t int_pin
|
|
||||||
) : MCP2521_HardwareHandle_ESP(spi_host, bus_config, cs, int_pin) {
|
|
||||||
this->send_queue = send_queue;
|
|
||||||
this->receive_queue = xQueueCreate(3, sizeof(spi_message_t));
|
|
||||||
}
|
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESPBus::spi_transmit(spi_transaction_t *t) {
|
|
||||||
spi_message_t message = {
|
|
||||||
.transaction = t,
|
|
||||||
.queue = send_queue,
|
|
||||||
.spi_device_handle = spi_device_handle
|
|
||||||
};
|
|
||||||
|
|
||||||
xQueueSend(send_queue, &message, portMAX_DELAY);
|
|
||||||
xQueueReceive(receive_queue, &message, portMAX_DELAY);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESPBus::initPins(
|
|
||||||
gpio_num_t int_pin
|
|
||||||
) {
|
|
||||||
canInterruptSemaphore = xSemaphoreCreateBinary();
|
|
||||||
|
|
||||||
gpio_config_t io_conf;
|
|
||||||
io_conf.intr_type = GPIO_INTR_NEGEDGE;
|
|
||||||
io_conf.mode = GPIO_MODE_INPUT;
|
|
||||||
io_conf.pin_bit_mask = 1 << int_pin;
|
|
||||||
io_conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
|
|
||||||
io_conf.pull_up_en = GPIO_PULLUP_ENABLE;
|
|
||||||
gpio_config(&io_conf);
|
|
||||||
|
|
||||||
gpio_isr_handler_add(int_pin, gpio_isr_can_handler, this);
|
|
||||||
|
|
||||||
char taskName[32];
|
|
||||||
sprintf(taskName, "canInterruptTask_%d", int_pin);
|
|
||||||
|
|
||||||
xTaskCreatePinnedToCore(
|
|
||||||
(TaskFunction_t)&handleInteruptTaskCallerFn,
|
|
||||||
taskName,
|
|
||||||
2048,
|
|
||||||
this,
|
|
||||||
5,
|
|
||||||
&canInterruptTaskHandle,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
|
|
||||||
#include "mcp2521_hardware_esp_bus_factory.hpp"
|
|
||||||
#include "mcp2521_hardware_esp_bus.hpp"
|
|
||||||
#include "mcp2521_hardware_esp.hpp"
|
|
||||||
|
|
||||||
void transactionTaskWrapperFn(void *pvParameters) {
|
|
||||||
MCP2521_HardwareHandleFactory_ESPBus *factory = (MCP2521_HardwareHandleFactory_ESPBus *)pvParameters;
|
|
||||||
factory->transactionTaskFn();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MCP2521_HardwareHandleFactory_ESPBus::MCP2521_HardwareHandleFactory_ESPBus(
|
|
||||||
spi_host_device_t spi_host,
|
|
||||||
gpio_num_t mosi,
|
|
||||||
gpio_num_t miso,
|
|
||||||
gpio_num_t sclk
|
|
||||||
) {
|
|
||||||
this->spi_host = spi_host;
|
|
||||||
this->mosi = mosi;
|
|
||||||
this->miso = miso;
|
|
||||||
this->sclk = sclk;
|
|
||||||
|
|
||||||
|
|
||||||
gpio_install_isr_service(0);
|
|
||||||
|
|
||||||
MCP2521_HardwareHandle_ESP::initSPIBus(spi_host, mosi, miso, sclk, &bus_config);
|
|
||||||
|
|
||||||
spi_queue = xQueueCreate(12, sizeof(spi_message_t));
|
|
||||||
xTaskCreatePinnedToCore(
|
|
||||||
(TaskFunction_t)&transactionTaskWrapperFn,
|
|
||||||
"transactionTask",
|
|
||||||
2048,
|
|
||||||
this,
|
|
||||||
3,
|
|
||||||
&transactionTaskHandle,
|
|
||||||
0
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void MCP2521_HardwareHandleFactory_ESPBus::transactionTaskFn() {
|
|
||||||
spi_message_t message;
|
|
||||||
|
|
||||||
while(true) {
|
|
||||||
xQueueReceive(spi_queue, &message, portMAX_DELAY);
|
|
||||||
spi_device_transmit(message.spi_device_handle, message.transaction);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MCP2521_HardwareHandle_ESPBus MCP2521_HardwareHandleFactory_ESPBus::create(
|
|
||||||
gpio_num_t int_pin,
|
|
||||||
gpio_num_t cs
|
|
||||||
) {
|
|
||||||
return MCP2521_HardwareHandle_ESPBus(
|
|
||||||
spi_queue,
|
|
||||||
spi_host,
|
|
||||||
&bus_config,
|
|
||||||
cs,
|
|
||||||
int_pin
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -5,13 +5,13 @@
|
|||||||
|
|
||||||
const uint8_t null_buffer[32] = {0};
|
const uint8_t null_buffer[32] = {0};
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::spi_transmit(spi_transaction_t *t) {
|
void MCP2521_Hardware_Handle_ESP::spi_transmit(spi_transaction_t *t) {
|
||||||
xSemaphoreTake(spiMutex, portMAX_DELAY);
|
xSemaphoreTake(spiMutex, portMAX_DELAY);
|
||||||
spi_device_transmit(this->spi_device_handle, t);
|
spi_device_transmit(this->spi_device_handle, t);
|
||||||
xSemaphoreGive(spiMutex);
|
xSemaphoreGive(spiMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::execute(uint8_t cmd) {
|
void MCP2521_Hardware_Handle_ESP::execute(uint8_t cmd) {
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
||||||
@@ -30,7 +30,7 @@ void MCP2521_HardwareHandle_ESP::execute(uint8_t cmd) {
|
|||||||
spi_transmit((spi_transaction_t*)(&t));
|
spi_transmit((spi_transaction_t*)(&t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::execute(uint8_t cmd, uint8_t address) {
|
void MCP2521_Hardware_Handle_ESP::execute(uint8_t cmd, uint8_t address) {
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
||||||
@@ -49,7 +49,7 @@ void MCP2521_HardwareHandle_ESP::execute(uint8_t cmd, uint8_t address) {
|
|||||||
spi_transmit((spi_transaction_t*)(&t));
|
spi_transmit((spi_transaction_t*)(&t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::read(uint8_t cmd, uint8_t *data, size_t length, uint8_t address) {
|
void MCP2521_Hardware_Handle_ESP::read(uint8_t cmd, uint8_t *data, size_t length, uint8_t address) {
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
||||||
@@ -68,7 +68,7 @@ void MCP2521_HardwareHandle_ESP::read(uint8_t cmd, uint8_t *data, size_t length,
|
|||||||
spi_transmit((spi_transaction_t*)(&t));
|
spi_transmit((spi_transaction_t*)(&t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::read(uint8_t cmd, uint8_t *data, size_t length) {
|
void MCP2521_Hardware_Handle_ESP::read(uint8_t cmd, uint8_t *data, size_t length) {
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
||||||
@@ -76,7 +76,7 @@ void MCP2521_HardwareHandle_ESP::read(uint8_t cmd, uint8_t *data, size_t length)
|
|||||||
.addr = 0,
|
.addr = 0,
|
||||||
.length = 8*length,
|
.length = 8*length,
|
||||||
.rxlength = 8*length,
|
.rxlength = 8*length,
|
||||||
.tx_buffer = null_buffer,
|
.tx_buffer = NULL,
|
||||||
.rx_buffer = data
|
.rx_buffer = data
|
||||||
},
|
},
|
||||||
.command_bits = 8,
|
.command_bits = 8,
|
||||||
@@ -87,7 +87,7 @@ void MCP2521_HardwareHandle_ESP::read(uint8_t cmd, uint8_t *data, size_t length)
|
|||||||
spi_transmit((spi_transaction_t*)(&t));
|
spi_transmit((spi_transaction_t*)(&t));
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t MCP2521_HardwareHandle_ESP::read(uint8_t cmd, uint8_t address) {
|
uint8_t MCP2521_Hardware_Handle_ESP::read(uint8_t cmd, uint8_t address) {
|
||||||
uint8_t result = 0;
|
uint8_t result = 0;
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
@@ -108,7 +108,7 @@ uint8_t MCP2521_HardwareHandle_ESP::read(uint8_t cmd, uint8_t address) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t MCP2521_HardwareHandle_ESP::read(uint8_t cmd) {
|
uint8_t MCP2521_Hardware_Handle_ESP::read(uint8_t cmd) {
|
||||||
uint8_t result;
|
uint8_t result;
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
@@ -129,7 +129,7 @@ uint8_t MCP2521_HardwareHandle_ESP::read(uint8_t cmd) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::write(uint8_t cmd, uint8_t *data, size_t length, uint8_t address) {
|
void MCP2521_Hardware_Handle_ESP::write(uint8_t cmd, uint8_t *data, size_t length, uint8_t address) {
|
||||||
uint8_t result;
|
uint8_t result;
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
@@ -149,7 +149,7 @@ void MCP2521_HardwareHandle_ESP::write(uint8_t cmd, uint8_t *data, size_t length
|
|||||||
spi_transmit((spi_transaction_t*)(&t));
|
spi_transmit((spi_transaction_t*)(&t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::write(uint8_t cmd, uint8_t *data, size_t length) {
|
void MCP2521_Hardware_Handle_ESP::write(uint8_t cmd, uint8_t *data, size_t length) {
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
||||||
@@ -168,7 +168,7 @@ void MCP2521_HardwareHandle_ESP::write(uint8_t cmd, uint8_t *data, size_t length
|
|||||||
spi_transmit((spi_transaction_t*)(&t));
|
spi_transmit((spi_transaction_t*)(&t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::write(uint8_t cmd, uint8_t data, uint8_t address) {
|
void MCP2521_Hardware_Handle_ESP::write(uint8_t cmd, uint8_t data, uint8_t address) {
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
||||||
@@ -187,7 +187,7 @@ void MCP2521_HardwareHandle_ESP::write(uint8_t cmd, uint8_t data, uint8_t addres
|
|||||||
spi_transmit((spi_transaction_t*)(&t));
|
spi_transmit((spi_transaction_t*)(&t));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::write(uint8_t cmd, uint8_t data) {
|
void MCP2521_Hardware_Handle_ESP::write(uint8_t cmd, uint8_t data) {
|
||||||
spi_transaction_ext_t t = {
|
spi_transaction_ext_t t = {
|
||||||
.base = {
|
.base = {
|
||||||
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
.flags = SPI_TRANS_VARIABLE_CMD | SPI_TRANS_VARIABLE_ADDR,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
|
|
||||||
MCP2521_HardwareHandle_ESP::MCP2521_HardwareHandle_ESP(
|
MCP2521_Hardware_Handle_ESP::MCP2521_Hardware_Handle_ESP(
|
||||||
spi_host_device_t spi_host,
|
spi_host_device_t spi_host,
|
||||||
spi_bus_config_t *bus_config,
|
spi_bus_config_t *bus_config,
|
||||||
gpio_num_t mosi,
|
gpio_num_t mosi,
|
||||||
@@ -23,7 +23,7 @@ MCP2521_HardwareHandle_ESP::MCP2521_HardwareHandle_ESP(
|
|||||||
initSPIDevice(spi_host, cs);
|
initSPIDevice(spi_host, cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
MCP2521_HardwareHandle_ESP::MCP2521_HardwareHandle_ESP(
|
MCP2521_Hardware_Handle_ESP::MCP2521_Hardware_Handle_ESP(
|
||||||
spi_host_device_t spi_host,
|
spi_host_device_t spi_host,
|
||||||
spi_bus_config_t *bus_config,
|
spi_bus_config_t *bus_config,
|
||||||
gpio_num_t cs,
|
gpio_num_t cs,
|
||||||
@@ -34,11 +34,11 @@ MCP2521_HardwareHandle_ESP::MCP2521_HardwareHandle_ESP(
|
|||||||
initSPIDevice(spi_host, cs);
|
initSPIDevice(spi_host, cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
MCP2521_HardwareHandle_ESP::~MCP2521_HardwareHandle_ESP() {
|
MCP2521_Hardware_Handle_ESP::~MCP2521_Hardware_Handle_ESP() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::initSPIBus(
|
void MCP2521_Hardware_Handle_ESP::initSPIBus(
|
||||||
spi_host_device_t spi_host,
|
spi_host_device_t spi_host,
|
||||||
gpio_num_t mosi,
|
gpio_num_t mosi,
|
||||||
gpio_num_t miso,
|
gpio_num_t miso,
|
||||||
@@ -57,7 +57,7 @@ void MCP2521_HardwareHandle_ESP::initSPIBus(
|
|||||||
spi_bus_initialize(spi_host, bus_config, SPI_DMA_CH_AUTO);
|
spi_bus_initialize(spi_host, bus_config, SPI_DMA_CH_AUTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::initSPIDevice(
|
void MCP2521_Hardware_Handle_ESP::initSPIDevice(
|
||||||
spi_host_device_t spi_host,
|
spi_host_device_t spi_host,
|
||||||
gpio_num_t cs
|
gpio_num_t cs
|
||||||
) {
|
) {
|
||||||
@@ -73,7 +73,7 @@ void MCP2521_HardwareHandle_ESP::initSPIDevice(
|
|||||||
// Learned this the hard way
|
// Learned this the hard way
|
||||||
.cs_ena_pretrans = 0,
|
.cs_ena_pretrans = 0,
|
||||||
.cs_ena_posttrans = 0,
|
.cs_ena_posttrans = 0,
|
||||||
.clock_speed_hz = 2000,
|
.clock_speed_hz = 10000,
|
||||||
|
|
||||||
.spics_io_num = cs,
|
.spics_io_num = cs,
|
||||||
.flags = SPI_DEVICE_NO_DUMMY,
|
.flags = SPI_DEVICE_NO_DUMMY,
|
||||||
@@ -85,7 +85,7 @@ void MCP2521_HardwareHandle_ESP::initSPIDevice(
|
|||||||
spiMutex = xSemaphoreCreateMutex();
|
spiMutex = xSemaphoreCreateMutex();
|
||||||
}
|
}
|
||||||
|
|
||||||
spi_bus_config_t * MCP2521_HardwareHandle_ESP::getSPI_bus_config() {
|
spi_bus_config_t * MCP2521_Hardware_Handle_ESP::getSPI_bus_config() {
|
||||||
return this->spi_bus_config;
|
return this->spi_bus_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,16 +6,16 @@
|
|||||||
#include "mcp2521_hardware_esp.hpp"
|
#include "mcp2521_hardware_esp.hpp"
|
||||||
|
|
||||||
static void IRAM_ATTR gpio_isr_can_handler(void* arg) {
|
static void IRAM_ATTR gpio_isr_can_handler(void* arg) {
|
||||||
MCP2521_HardwareHandle_ESP * handle = (MCP2521_HardwareHandle_ESP *)arg;
|
MCP2521_Hardware_Handle_ESP * handle = (MCP2521_Hardware_Handle_ESP *)arg;
|
||||||
handle->isr_can_interrupt();
|
handle->isr_can_interrupt();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handleInteruptTaskCallerFn(void *arg) {
|
static void handleInteruptTaskCallerFn(void *arg) {
|
||||||
MCP2521_HardwareHandle_ESP * handle = (MCP2521_HardwareHandle_ESP *)arg;
|
MCP2521_Hardware_Handle_ESP * handle = (MCP2521_Hardware_Handle_ESP *)arg;
|
||||||
handle->handleIntteruptTaskFn();
|
handle->handleIntteruptTaskFn();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::initPins(
|
void MCP2521_Hardware_Handle_ESP::initPins(
|
||||||
gpio_num_t int_pin
|
gpio_num_t int_pin
|
||||||
) {
|
) {
|
||||||
canInterruptSemaphore = xSemaphoreCreateBinary();
|
canInterruptSemaphore = xSemaphoreCreateBinary();
|
||||||
@@ -31,25 +31,24 @@ void MCP2521_HardwareHandle_ESP::initPins(
|
|||||||
gpio_install_isr_service(0);
|
gpio_install_isr_service(0);
|
||||||
gpio_isr_handler_add(int_pin, gpio_isr_can_handler, this);
|
gpio_isr_handler_add(int_pin, gpio_isr_can_handler, this);
|
||||||
|
|
||||||
xTaskCreatePinnedToCore(
|
xTaskCreate(
|
||||||
(TaskFunction_t)&handleInteruptTaskCallerFn,
|
(TaskFunction_t)&handleInteruptTaskCallerFn,
|
||||||
"canInterruptTask",
|
"canInterruptTask",
|
||||||
2048,
|
2048,
|
||||||
this,
|
this,
|
||||||
5,
|
5,
|
||||||
&canInterruptTaskHandle,
|
&canInterruptTaskHandle
|
||||||
0
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::handleIntteruptTaskFn() {
|
void MCP2521_Hardware_Handle_ESP::handleIntteruptTaskFn() {
|
||||||
while(true) {
|
while(true) {
|
||||||
xSemaphoreTake(canInterruptSemaphore, portMAX_DELAY);
|
xSemaphoreTake(canInterruptSemaphore, portMAX_DELAY);
|
||||||
intHandler(intHandlerArg);
|
intHandler(intHandlerArg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::isr_can_interrupt() {
|
void MCP2521_Hardware_Handle_ESP::isr_can_interrupt() {
|
||||||
BaseType_t wokenTask = pdFALSE;
|
BaseType_t wokenTask = pdFALSE;
|
||||||
xSemaphoreGiveFromISR(canInterruptSemaphore, &wokenTask);
|
xSemaphoreGiveFromISR(canInterruptSemaphore, &wokenTask);
|
||||||
|
|
||||||
@@ -58,7 +57,7 @@ void MCP2521_HardwareHandle_ESP::isr_can_interrupt() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MCP2521_HardwareHandle_ESP::registerIntHandler(intHandlerFunction_t handler, void * arg) {
|
void MCP2521_Hardware_Handle_ESP::registerIntHandler(intHandlerFunction_t handler, void * arg) {
|
||||||
intHandlerArg = arg;
|
intHandlerArg = arg;
|
||||||
intHandler = handler;
|
intHandler = handler;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,3 @@
|
|||||||
/**
|
|
||||||
* @file mcp2521_hardware_esp.hpp
|
|
||||||
* @author AlexanderHD27
|
|
||||||
* @brief
|
|
||||||
* @version 0.1
|
|
||||||
* @date 2024-11-16
|
|
||||||
*
|
|
||||||
* @copyright Copyright (c) 2024
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "mcp2521_hardware_handle.hpp"
|
#include "mcp2521_hardware_handle.hpp"
|
||||||
|
|
||||||
@@ -18,48 +8,24 @@
|
|||||||
#include "freertos/FreeRTOS.h"
|
#include "freertos/FreeRTOS.h"
|
||||||
#include "freertos/task.h"
|
#include "freertos/task.h"
|
||||||
|
|
||||||
static void handleInteruptTaskCallerFn(void *arg);
|
class MCP2521_Hardware_Handle_ESP : public MCP2521_Hardware_Handle {
|
||||||
static void IRAM_ATTR gpio_isr_can_handler(void* arg);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Hardware handle for MCP2521 over SPI on ESP32
|
|
||||||
* This is should not be used if multiple MCP2521 are on the same SPI bus
|
|
||||||
*/
|
|
||||||
class MCP2521_HardwareHandle_ESP : public I_MCP2521_HardwareHandle {
|
|
||||||
protected:
|
|
||||||
void spi_transmit(spi_transaction_t *t);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Sempahore, that is set every time the MCP2521 triggers an interrupt by the canInterruptTaskHandle
|
|
||||||
*/
|
|
||||||
SemaphoreHandle_t canInterruptSemaphore = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Handle to task that handles the MCP2521 interrupt
|
|
||||||
* A Handle can be registered via the registerIntHandler method
|
|
||||||
*/
|
|
||||||
TaskHandle_t canInterruptTaskHandle = NULL;
|
|
||||||
|
|
||||||
spi_device_handle_t spi_device_handle;
|
|
||||||
|
|
||||||
private:
|
|
||||||
spi_bus_config_t * spi_bus_config;
|
|
||||||
char spi_tmp_buffer;
|
char spi_tmp_buffer;
|
||||||
|
|
||||||
|
spi_bus_config_t * spi_bus_config;
|
||||||
spi_device_interface_config_t spi_device_config;
|
spi_device_interface_config_t spi_device_config;
|
||||||
|
spi_device_handle_t spi_device_handle;
|
||||||
|
|
||||||
/**
|
SemaphoreHandle_t canInterruptSemaphore = NULL;
|
||||||
* @brief Sempahore, that protects the SPI bus from being accessed by multiple tasks at the same time
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
SemaphoreHandle_t spiMutex = NULL;
|
SemaphoreHandle_t spiMutex = NULL;
|
||||||
|
TaskHandle_t canInterruptTaskHandle = NULL;
|
||||||
|
|
||||||
|
void spi_transmit(spi_transaction_t *t);
|
||||||
|
|
||||||
void * intHandlerArg = NULL;
|
void * intHandlerArg = NULL;
|
||||||
intHandlerFunction_t intHandler = NULL;
|
intHandlerFunction_t intHandler = NULL;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MCP2521_HardwareHandle_ESP(
|
MCP2521_Hardware_Handle_ESP(
|
||||||
spi_host_device_t spi_host,
|
spi_host_device_t spi_host,
|
||||||
spi_bus_config_t *bus_config,
|
spi_bus_config_t *bus_config,
|
||||||
gpio_num_t mosi,
|
gpio_num_t mosi,
|
||||||
@@ -69,7 +35,7 @@ public:
|
|||||||
gpio_num_t int_pin
|
gpio_num_t int_pin
|
||||||
);
|
);
|
||||||
|
|
||||||
MCP2521_HardwareHandle_ESP(
|
MCP2521_Hardware_Handle_ESP(
|
||||||
spi_host_device_t spi_host,
|
spi_host_device_t spi_host,
|
||||||
spi_bus_config_t *bus_config,
|
spi_bus_config_t *bus_config,
|
||||||
gpio_num_t cs,
|
gpio_num_t cs,
|
||||||
@@ -93,22 +59,12 @@ public:
|
|||||||
gpio_num_t int_pin
|
gpio_num_t int_pin
|
||||||
);
|
);
|
||||||
|
|
||||||
~MCP2521_HardwareHandle_ESP();
|
~MCP2521_Hardware_Handle_ESP();
|
||||||
|
|
||||||
spi_bus_config_t * getSPI_bus_config();
|
spi_bus_config_t * getSPI_bus_config();
|
||||||
|
|
||||||
// ISR Stuff
|
// ISR Stuff
|
||||||
/**
|
|
||||||
* @brief This function is called by the ISR, that is triggered by the MCP2521
|
|
||||||
* This function just set the canInterruptSemaphore, that then unblocks the canInterruptTaskHandle.
|
|
||||||
* So this function should be as short as possible, let the reset of the work be done in the canInterruptTaskHandle
|
|
||||||
*/
|
|
||||||
void isr_can_interrupt();
|
void isr_can_interrupt();
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the methode run as canInterruptTaskHandle.
|
|
||||||
* It should continously aquire the canInterruptSemaphore and then call the intHandler
|
|
||||||
*/
|
|
||||||
void handleIntteruptTaskFn();
|
void handleIntteruptTaskFn();
|
||||||
|
|
||||||
// Inherited from MCP2521_Hardware_Handle
|
// Inherited from MCP2521_Hardware_Handle
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "mcp2521_hardware_esp.hpp"
|
|
||||||
|
|
||||||
#include "driver/gpio.h"
|
|
||||||
#include "driver/spi_master.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
#include "freertos/task.h"
|
|
||||||
|
|
||||||
struct spi_message_t {
|
|
||||||
spi_transaction_t *transaction;
|
|
||||||
QueueHandle_t queue;
|
|
||||||
spi_device_handle_t spi_device_handle;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Hardware handle for MCP2521 over SPI in a multi-Bus-Setup on ESP32
|
|
||||||
* This should not be created directly, use the MCP2521_HardwareHandleFactory_ESPBus instead
|
|
||||||
*/
|
|
||||||
class MCP2521_HardwareHandle_ESPBus : public MCP2521_HardwareHandle_ESP {
|
|
||||||
using MCP2521_HardwareHandle_ESP::MCP2521_HardwareHandle_ESP;
|
|
||||||
private:
|
|
||||||
QueueHandle_t send_queue;
|
|
||||||
QueueHandle_t receive_queue;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Wrapper around the spi_transmit function, that locks the spiMutex before calling spi_transmit.
|
|
||||||
* The muxtex is shared with all other MCP2521_HardwareHandle_ESPBus instances created by the same MCP2521_HardwareHandleFactory_ESPBus
|
|
||||||
* @overload
|
|
||||||
*
|
|
||||||
* @param t ESP32 SPI Transaction struct
|
|
||||||
*/
|
|
||||||
void spi_transmit(spi_transaction_t *t);
|
|
||||||
public:
|
|
||||||
MCP2521_HardwareHandle_ESPBus(
|
|
||||||
QueueHandle_t send_queue,
|
|
||||||
spi_host_device_t spi_host,
|
|
||||||
spi_bus_config_t * bus_config,
|
|
||||||
gpio_num_t cs,
|
|
||||||
gpio_num_t int_pin
|
|
||||||
);
|
|
||||||
|
|
||||||
void initPins(
|
|
||||||
gpio_num_t int_pin
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
|
||||||
#include "mcp2521_hardware_handle.hpp"
|
|
||||||
#include "mcp2521_hardware_esp_bus.hpp"
|
|
||||||
|
|
||||||
#include "driver/gpio.h"
|
|
||||||
#include "driver/spi_master.h"
|
|
||||||
#include "freertos/FreeRTOS.h"
|
|
||||||
#include "freertos/task.h"
|
|
||||||
#include "freertos/queue.h"
|
|
||||||
|
|
||||||
class MCP2521_HardwareHandleFactory_ESPBus {
|
|
||||||
private:
|
|
||||||
spi_bus_config_t bus_config;
|
|
||||||
spi_host_device_t spi_host;
|
|
||||||
|
|
||||||
gpio_num_t mosi;
|
|
||||||
gpio_num_t miso;
|
|
||||||
gpio_num_t sclk;
|
|
||||||
|
|
||||||
QueueHandle_t spi_queue;
|
|
||||||
TaskHandle_t transactionTaskHandle;
|
|
||||||
|
|
||||||
public:
|
|
||||||
MCP2521_HardwareHandleFactory_ESPBus(
|
|
||||||
spi_host_device_t spi_host,
|
|
||||||
gpio_num_t mosi,
|
|
||||||
gpio_num_t miso,
|
|
||||||
gpio_num_t sclk
|
|
||||||
);
|
|
||||||
|
|
||||||
void transactionTaskFn();
|
|
||||||
|
|
||||||
MCP2521_HardwareHandle_ESPBus create(
|
|
||||||
gpio_num_t int_pin,
|
|
||||||
gpio_num_t cs
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -2,118 +2,23 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Handler function pointer type
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
typedef void (*intHandlerFunction_t)(void *);
|
typedef void (*intHandlerFunction_t)(void *);
|
||||||
|
|
||||||
/**
|
class MCP2521_Hardware_Handle {
|
||||||
* @brief Hardware handle for MCP2521
|
|
||||||
* @interface
|
|
||||||
* This is an abstraction over the sepific hardware setup, eg. SPI@ESP32 or RP2040
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class I_MCP2521_HardwareHandle {
|
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* @brief Registeres a function that is called when the MCP2521 triggers an interrupt
|
|
||||||
*
|
|
||||||
* @param handler This function is called when the MCP2521 triggers an interrupt
|
|
||||||
* @param arg Arguments passed to the handler-function
|
|
||||||
*/
|
|
||||||
virtual void registerIntHandler(intHandlerFunction_t handler, void * arg) = 0;
|
virtual void registerIntHandler(intHandlerFunction_t handler, void * arg) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @overload
|
|
||||||
* @brief justed sends a 8bit command to the MCP2521
|
|
||||||
*
|
|
||||||
* @param cmd command to send
|
|
||||||
*/
|
|
||||||
virtual void execute(uint8_t cmd) = 0;
|
virtual void execute(uint8_t cmd) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @overload
|
|
||||||
* @brief executes a command (8 bit) with an address (8 bit)
|
|
||||||
*
|
|
||||||
* @param cmd 8 bit command
|
|
||||||
* @param address 8 bit address
|
|
||||||
*/
|
|
||||||
virtual void execute(uint8_t cmd, uint8_t address) = 0;
|
virtual void execute(uint8_t cmd, uint8_t address) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @brief Executes a read from the MCP2521 with command, data buffer, length and address
|
|
||||||
* @overload
|
|
||||||
*
|
|
||||||
* @param cmd Command to MCP2521
|
|
||||||
* @param data Data buffer to store the read data
|
|
||||||
* @param length How many bytes to read
|
|
||||||
* @param address Address to read from
|
|
||||||
*/
|
|
||||||
virtual void read(uint8_t cmd, uint8_t *data, size_t length, uint8_t address) = 0;
|
virtual void read(uint8_t cmd, uint8_t *data, size_t length, uint8_t address) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Executes a read from the MCP2521 with command, data buffer and length
|
|
||||||
* @overload
|
|
||||||
*
|
|
||||||
* @param cmd Command to MCP2521
|
|
||||||
* @param data Data buffer to store the read data
|
|
||||||
* @param length How many bytes to read
|
|
||||||
*/
|
|
||||||
virtual void read(uint8_t cmd, uint8_t *data, size_t length) = 0;
|
virtual void read(uint8_t cmd, uint8_t *data, size_t length) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Executes a read from the MCP2521 with command and address, returns just one byte
|
|
||||||
*
|
|
||||||
* @param cmd Command to MCP2521
|
|
||||||
* @param address Address to read from
|
|
||||||
* @return uint8_t
|
|
||||||
*/
|
|
||||||
virtual uint8_t read(uint8_t cmd, uint8_t address) = 0;
|
virtual uint8_t read(uint8_t cmd, uint8_t address) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Executes a read from the MCP2521 with command, returns just one byte
|
|
||||||
*
|
|
||||||
* @param cmd Command to MCP2521
|
|
||||||
* @return uint8_t
|
|
||||||
*/
|
|
||||||
virtual uint8_t read(uint8_t cmd) = 0;
|
virtual uint8_t read(uint8_t cmd) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Writes data to the MCP2521 with command, data buffer, length and address
|
|
||||||
*
|
|
||||||
* @param cmd Command to MCP2521
|
|
||||||
* @param data Data buffer to write
|
|
||||||
* @param length Length of the data buffer
|
|
||||||
* @param address Where to write the data
|
|
||||||
*/
|
|
||||||
virtual void write(uint8_t cmd, uint8_t *data, size_t length, uint8_t address) = 0;
|
virtual void write(uint8_t cmd, uint8_t *data, size_t length, uint8_t address) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Wirites data to the MCP2521 with command, data buffer and length
|
|
||||||
*
|
|
||||||
* @param cmd Command to MCP2521
|
|
||||||
* @param data Data buffer to write
|
|
||||||
* @param length Length of the data buffer
|
|
||||||
*/
|
|
||||||
virtual void write(uint8_t cmd, uint8_t *data, size_t length) = 0;
|
virtual void write(uint8_t cmd, uint8_t *data, size_t length) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Writes data to the MCP2521 with command, data (on byte) and address
|
|
||||||
*
|
|
||||||
* @param cmd Command to MCP2521
|
|
||||||
* @param data Data byte to write
|
|
||||||
* @param address Where to write the data
|
|
||||||
*/
|
|
||||||
virtual void write(uint8_t cmd, uint8_t data, uint8_t address) = 0;
|
virtual void write(uint8_t cmd, uint8_t data, uint8_t address) = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Writes to the MCP2521 with command and data (one byte)
|
|
||||||
*
|
|
||||||
* @param cmd Command to MCP2521
|
|
||||||
* @param data Data byte to write
|
|
||||||
*/
|
|
||||||
virtual void write(uint8_t cmd, uint8_t data) = 0;
|
virtual void write(uint8_t cmd, uint8_t data) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
BIN
gobotrpc/.gitignore
(Stored with Git LFS)
vendored
BIN
gobotrpc/.gitignore
(Stored with Git LFS)
vendored
Binary file not shown.
22
gobotrpc/.vscode/tasks.json
vendored
22
gobotrpc/.vscode/tasks.json
vendored
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
||||||
// for the documentation about the tasks.json format
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"taskName": "Run Main",
|
|
||||||
"command": "python3 generator/main.py",
|
|
||||||
"type": "shell",
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated",
|
|
||||||
"focus": true,
|
|
||||||
"clear": true
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Binary file not shown.
BIN
gobotrpc/generator/main.py
(Stored with Git LFS)
BIN
gobotrpc/generator/main.py
(Stored with Git LFS)
Binary file not shown.
BIN
gobotrpc/generator/src/__init__.py
(Stored with Git LFS)
BIN
gobotrpc/generator/src/__init__.py
(Stored with Git LFS)
Binary file not shown.
BIN
gobotrpc/generator/src/backend/__init__.py
(Stored with Git LFS)
BIN
gobotrpc/generator/src/backend/__init__.py
(Stored with Git LFS)
Binary file not shown.
BIN
gobotrpc/generator/src/backend/cpp/converter.py
(Stored with Git LFS)
BIN
gobotrpc/generator/src/backend/cpp/converter.py
(Stored with Git LFS)
Binary file not shown.
BIN
gobotrpc/generator/src/backend/cpp/render.py
(Stored with Git LFS)
BIN
gobotrpc/generator/src/backend/cpp/render.py
(Stored with Git LFS)
Binary file not shown.
BIN
gobotrpc/generator/src/defintion_input.py
(Stored with Git LFS)
BIN
gobotrpc/generator/src/defintion_input.py
(Stored with Git LFS)
Binary file not shown.
BIN
gobotrpc/generator/src/odf_source.py
(Stored with Git LFS)
BIN
gobotrpc/generator/src/odf_source.py
(Stored with Git LFS)
Binary file not shown.
BIN
gobotrpc/generator/src/util.py
(Stored with Git LFS)
BIN
gobotrpc/generator/src/util.py
(Stored with Git LFS)
Binary file not shown.
@@ -1,13 +0,0 @@
|
|||||||
add_libary(gobotrpc STATIC)
|
|
||||||
|
|
||||||
target_sources(gobotrpc
|
|
||||||
PRIVATE
|
|
||||||
{%- for n in cpp_files %}
|
|
||||||
{{ n }}
|
|
||||||
{%- endfor %}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(gobotrpc
|
|
||||||
PUBLIC
|
|
||||||
include
|
|
||||||
)
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
/**
|
|
||||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
|
||||||
*/
|
|
||||||
|
|
||||||
{% for enum in enum_list -%}
|
|
||||||
enum class {{ enum.name }} {{ "{" }}
|
|
||||||
{% for key in enum.map -%}
|
|
||||||
{{ "\t" }}{{ key }} = {{ enum.map[key] }},
|
|
||||||
{% endfor %}{{ "}" }};
|
|
||||||
|
|
||||||
{% endfor %}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
/**
|
|
||||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include {{ "<stdint.h>" }}
|
|
||||||
#include "{{ enum_header_file }}"
|
|
||||||
|
|
||||||
enum {{ prefix }}RPCNames {{"{"}}
|
|
||||||
{%- for n in rpcNames %}
|
|
||||||
{{ n }} = {{ rpcNames[n] }},
|
|
||||||
{%- endfor %}
|
|
||||||
{{"}"}};
|
|
||||||
|
|
||||||
enum {{ prefix }}RPCTypes {{"{"}}
|
|
||||||
{%- for n in rpcTypes %}
|
|
||||||
{{ n }} = {{ rpcTypes[n] }},
|
|
||||||
{%- endfor %}
|
|
||||||
{{"}"}};
|
|
||||||
|
|
||||||
int getPackageSize(uint8_t data);
|
|
||||||
|
|
||||||
{% for struct in package_list %}
|
|
||||||
struct {{ struct.name }} {{ "{" }}
|
|
||||||
{% for field in struct.fields -%}
|
|
||||||
{{ "\t" }}{{ field.type }} {{ field.name }} : {{ field.size_bits }};
|
|
||||||
{% endfor -%}
|
|
||||||
{{ "}" }};
|
|
||||||
{% endfor %}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
/**
|
|
||||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include {{ "<stdint.h>" }}
|
|
||||||
{%- for h in headers %}
|
|
||||||
#include {{ "\"" + h + "\"" }}
|
|
||||||
{%- endfor %}
|
|
||||||
|
|
||||||
int getPackageSize(uint8_t data) {
|
|
||||||
switch(data) {
|
|
||||||
{%- for n in rpcSizes %}
|
|
||||||
case {{ prefix }}RPCNames::{{ n }}:
|
|
||||||
return {{ rpcSizes[n] }};
|
|
||||||
{%- endfor %}
|
|
||||||
default:
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
25
gobotrpc/out/cpp/.vscode/tasks.json
vendored
25
gobotrpc/out/cpp/.vscode/tasks.json
vendored
@@ -1,25 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"type": "cmake",
|
|
||||||
"label": "CMake: build",
|
|
||||||
"command": "build",
|
|
||||||
"targets": [
|
|
||||||
"all"
|
|
||||||
],
|
|
||||||
"group": "build",
|
|
||||||
"problemMatcher": [],
|
|
||||||
"detail": "CMake template build task",
|
|
||||||
"presentation": {
|
|
||||||
"echo": true,
|
|
||||||
"reveal": "always",
|
|
||||||
"focus": false,
|
|
||||||
"panel": "dedicated",
|
|
||||||
"showReuseMessage": true,
|
|
||||||
"clear": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.28.3)
|
|
||||||
project(TestingGobotRPCParser)
|
|
||||||
|
|
||||||
|
|
||||||
# GoogleTest requires at least C++23
|
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
||||||
|
|
||||||
# Adding gtest
|
|
||||||
include(FetchContent)
|
|
||||||
FetchContent_Declare(
|
|
||||||
googletest
|
|
||||||
gcov
|
|
||||||
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
|
|
||||||
)
|
|
||||||
|
|
||||||
FetchContent_MakeAvailable(googletest)
|
|
||||||
|
|
||||||
add_executable(TestingGobotRPCParser test/main.cpp)
|
|
||||||
target_link_libraries(TestingGobotRPCParser gtest_main)
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
add_libary(gobotrpc STATIC)
|
|
||||||
|
|
||||||
target_sources(gobotrpc
|
|
||||||
PRIVATE
|
|
||||||
src/package_util.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(gobotrpc
|
|
||||||
PUBLIC
|
|
||||||
include
|
|
||||||
)
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
/**
|
|
||||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
|
||||||
*/
|
|
||||||
|
|
||||||
enum class GOBOTRPC_ENUM_NodeType {
|
|
||||||
kHub = 0,
|
|
||||||
kHead = 1,
|
|
||||||
kCorexy = 2,
|
|
||||||
kVacun = 3,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class GOBOTRPC_ENUM_NodeStatus {
|
|
||||||
kReady = 0,
|
|
||||||
kWorking = 1,
|
|
||||||
kBusy = 2,
|
|
||||||
kError = 3,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class GOBOTRPC_ENUM_ErrorCode {
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class GOBOTRPC_ENUM_HeadPos {
|
|
||||||
kUp = 0,
|
|
||||||
kDown = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum class GOBOTRPC_ENUM_StoneStatus {
|
|
||||||
kEmpty = 0,
|
|
||||||
kLow = 1,
|
|
||||||
kFill = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
/**
|
|
||||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include "enums.hpp"
|
|
||||||
|
|
||||||
enum GOBOTRPC_RPCNames {
|
|
||||||
kInvalid = 255,
|
|
||||||
kGetInfo = 1,
|
|
||||||
kReset = 2,
|
|
||||||
kResetInfo = 3,
|
|
||||||
kStatusUpdate = 4,
|
|
||||||
kError = 5,
|
|
||||||
kHome = 7,
|
|
||||||
kGoto = 9,
|
|
||||||
kSetBoardCorner = 11,
|
|
||||||
kSetVacumOffset = 13,
|
|
||||||
kReleaseMotors = 15,
|
|
||||||
kDrop = 17,
|
|
||||||
kStoneStatus = 19,
|
|
||||||
kMoveZAxis = 21,
|
|
||||||
kSetVacum = 23,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum GOBOTRPC_RPCTypes {
|
|
||||||
kReq = 0,
|
|
||||||
kRes = 1,
|
|
||||||
};
|
|
||||||
|
|
||||||
int getPackageSize(uint8_t data);
|
|
||||||
|
|
||||||
|
|
||||||
struct GOBOTRPC_GetInfoReq {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_GetInfoRes {
|
|
||||||
int32_t addr : 32;
|
|
||||||
GOBOTRPC_ENUM_NodeType type : 8;
|
|
||||||
GOBOTRPC_ENUM_NodeStatus status : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_ResetReq {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_ResetInfoRes {
|
|
||||||
GOBOTRPC_ENUM_NodeStatus status : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_StatusUpdateRes {
|
|
||||||
GOBOTRPC_ENUM_NodeStatus status : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_ErrorRes {
|
|
||||||
GOBOTRPC_ENUM_ErrorCode error : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_HomeReq {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_HomeRes {
|
|
||||||
int32_t x : 32;
|
|
||||||
int32_t y : 32;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_GotoReq {
|
|
||||||
int8_t x : 8;
|
|
||||||
int8_t y : 8;
|
|
||||||
bool offset : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_GotoRes {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_SetBoardCornerReq {
|
|
||||||
int32_t x1 : 32;
|
|
||||||
int32_t y1 : 32;
|
|
||||||
int32_t x2 : 32;
|
|
||||||
int32_t y2 : 32;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_SetBoardCornerRes {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_SetVacumOffsetReq {
|
|
||||||
int32_t x : 32;
|
|
||||||
int32_t y : 32;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_SetVacumOffsetRes {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_ReleaseMotorsReq {
|
|
||||||
bool enable : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_ReleaseMotorsRes {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_DropReq {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_DropRes {
|
|
||||||
GOBOTRPC_ENUM_StoneStatus status : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_StoneStatusReq {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_StoneStatusRes {
|
|
||||||
GOBOTRPC_ENUM_StoneStatus status : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_MoveZAxisReq {
|
|
||||||
GOBOTRPC_ENUM_HeadPos pos : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_MoveZAxisRes {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_SetVacumReq {
|
|
||||||
bool enable : 8;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct GOBOTRPC_SetVacumRes {
|
|
||||||
};
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
/**
|
|
||||||
* This Header file was auto-generated by the GobotRPC-Protocol-Generator-Tool
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include "package_structs.hpp"
|
|
||||||
#include "enums.hpp"
|
|
||||||
|
|
||||||
int getPackageSize(uint8_t data) {
|
|
||||||
switch(data) {
|
|
||||||
case RPCNames::GOBOTRPC_GetInfoReq:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_GetInfoRes:
|
|
||||||
return 6;
|
|
||||||
case RPCNames::GOBOTRPC_ResetReq:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_ResetInfoRes:
|
|
||||||
return 1;
|
|
||||||
case RPCNames::GOBOTRPC_StatusUpdateRes:
|
|
||||||
return 1;
|
|
||||||
case RPCNames::GOBOTRPC_ErrorRes:
|
|
||||||
return 1;
|
|
||||||
case RPCNames::GOBOTRPC_HomeReq:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_HomeRes:
|
|
||||||
return 8;
|
|
||||||
case RPCNames::GOBOTRPC_GotoReq:
|
|
||||||
return 3;
|
|
||||||
case RPCNames::GOBOTRPC_GotoRes:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_SetBoardCornerReq:
|
|
||||||
return 16;
|
|
||||||
case RPCNames::GOBOTRPC_SetBoardCornerRes:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_SetVacumOffsetReq:
|
|
||||||
return 8;
|
|
||||||
case RPCNames::GOBOTRPC_SetVacumOffsetRes:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_ReleaseMotorsReq:
|
|
||||||
return 1;
|
|
||||||
case RPCNames::GOBOTRPC_ReleaseMotorsRes:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_DropReq:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_DropRes:
|
|
||||||
return 1;
|
|
||||||
case RPCNames::GOBOTRPC_StoneStatusReq:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_StoneStatusRes:
|
|
||||||
return 1;
|
|
||||||
case RPCNames::GOBOTRPC_MoveZAxisReq:
|
|
||||||
return 1;
|
|
||||||
case RPCNames::GOBOTRPC_MoveZAxisRes:
|
|
||||||
return 0;
|
|
||||||
case RPCNames::GOBOTRPC_SetVacumReq:
|
|
||||||
return 1;
|
|
||||||
case RPCNames::GOBOTRPC_SetVacumRes:
|
|
||||||
return 0;
|
|
||||||
default:
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
#include <gtest/gtest.h>
|
|
||||||
|
|
||||||
TEST(DummyTest, BasicAssertions) {
|
|
||||||
// Expect two strings not to be equal.
|
|
||||||
EXPECT_STRNE("hello", "world");
|
|
||||||
// Expect equality.
|
|
||||||
EXPECT_EQ(7 * 6, 42);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char * argv[]) {
|
|
||||||
testing::InitGoogleTest(&argc, argv);
|
|
||||||
return RUN_ALL_TESTS();
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
defusedxml==0.7.1
|
|
||||||
ezodf==0.3.2
|
|
||||||
Jinja2==3.1.5
|
|
||||||
lxml==5.3.0
|
|
||||||
MarkupSafe==3.0.2
|
|
||||||
mkl-service==2.4.0
|
|
||||||
odfpy==1.4.1
|
|
||||||
setuptools==75.1.0
|
|
||||||
wheel==0.44.0
|
|
||||||
BIN
i2c-hub/asd
BIN
i2c-hub/asd
Binary file not shown.
BIN
i2c-hub/backend/Protocol.md
(Stored with Git LFS)
BIN
i2c-hub/backend/Protocol.md
(Stored with Git LFS)
Binary file not shown.
BIN
i2c-hub/backend/src/gobotRPC_ctrl_interface.py
(Stored with Git LFS)
BIN
i2c-hub/backend/src/gobotRPC_ctrl_interface.py
(Stored with Git LFS)
Binary file not shown.
@@ -1,9 +0,0 @@
|
|||||||
fe fe fe fe fc 10 10 10 20 ff 48 65 6c 6c 6f 20
|
|
||||||
6f 72 6c 64 21 0a 84 00 01 00 42 00 00 00 12
|
|
||||||
00 00 00 c0 84 01 01 01 43 00 00 00 22 00 00
|
|
||||||
3f 00 84 00 01 00 42 00 00 00 32 00 00 00 80
|
|
||||||
54 68 69 73 20 69 73 20 52 61 6e 64 6f 6d 20
|
|
||||||
65 78 74 0a 84 01 01 02 43 00 00 00 63 00 00
|
|
||||||
3f 00 84 01 01 00 42 00 00 00 73 00 00 00 bf
|
|
||||||
81 10 40 42 00 00 00 01 02 03 04 05 06 00 11
|
|
||||||
13 14 fe fe fe fe fe fe fc
|
|
||||||
@@ -1,372 +0,0 @@
|
|||||||
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.3 Chrome/130.0.6723.137 Electron/33.2.1 Safari/537.36" version="26.0.3">
|
|
||||||
<diagram name="Page-1" id="AMVLBRZDkjnkadgTC83C">
|
|
||||||
<mxGraphModel dx="1366" dy="798" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
|
||||||
<root>
|
|
||||||
<mxCell id="0" />
|
|
||||||
<mxCell id="1" parent="0" />
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-1" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=https://www.elektronik-kompendium.de/sites/raspberry-pi/bilder/raspberry-pi-pico-gpio.png;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;locked=1;connectable=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="343" y="150" width="522.06" height="306" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-2" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=https://www.build-electronic-circuits.com/wp-content/uploads/2023/04/7432-pinout.png;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;locked=1;connectable=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="190" y="520" width="166.39" height="170" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-54" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-3" target="3qXY1K8jvDizOHU8Sasa-12">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="180" y="170" />
|
|
||||||
<mxPoint x="180" y="290" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-3" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="160" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-49" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#CC0000;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-4">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="220" y="190" />
|
|
||||||
<mxPoint x="220" y="240" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-4" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="180" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-45" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#FFFF00;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-5">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="260" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="230" y="210" />
|
|
||||||
<mxPoint x="230" y="260" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-5" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="200" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#0000FF;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-6">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="600" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="130" y="230" />
|
|
||||||
<mxPoint x="130" y="600" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-6" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="220" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-8" value="<font color="#ffffff">SDA</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#CC0000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="180" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-9" value="<font>SCL</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFF00;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="200" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-10" value="<font color="#ffffff">GND</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="160" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-11" value="INT" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFFFF;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="220" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-55" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-12" target="3qXY1K8jvDizOHU8Sasa-20">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="180" y="290" />
|
|
||||||
<mxPoint x="180" y="410" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-12" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="280" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-47" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#CC0000;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-13">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="220" y="310" />
|
|
||||||
<mxPoint x="220" y="240" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-13" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="300" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#FFFF00;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-14">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="260" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="230" y="330" />
|
|
||||||
<mxPoint x="230" y="260" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-14" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="320" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-15">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="560" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="120" y="350" />
|
|
||||||
<mxPoint x="120" y="560" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-15" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="340" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-16" value="<font color="#ffffff">SDA</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#CC0000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="300" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-17" value="<font>SCL</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFF00;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="320" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-18" value="<font color="#ffffff">GND</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="280" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-19" value="INT" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFFFF;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="340" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-20" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="400" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-48" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#CC0000;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-21">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="220" y="430" />
|
|
||||||
<mxPoint x="220" y="240" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-21" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="420" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-46" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#FFFF00;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-22">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="260" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="230" y="450" />
|
|
||||||
<mxPoint x="230" y="260" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-22" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="440" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#0000FF;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-23">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="540" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="110" y="470" />
|
|
||||||
<mxPoint x="110" y="540" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-23" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="460" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-24" value="<font color="#ffffff">SDA</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#CC0000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="420" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-25" value="<font>SCL</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFF00;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="440" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-26" value="<font color="#ffffff">GND</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="400" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-27" value="INT" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFFFF;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="460" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-53" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-32" target="3qXY1K8jvDizOHU8Sasa-3">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="180" y="50" />
|
|
||||||
<mxPoint x="180" y="170" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-32" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="40" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-50" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#CC0000;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-33">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="220" y="70" />
|
|
||||||
<mxPoint x="220" y="240" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-33" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="60" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#FFFF00;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-34">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="260" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="230" y="90" />
|
|
||||||
<mxPoint x="230" y="260" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-34" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="80" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-40" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-35">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="620" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="140" y="110" />
|
|
||||||
<mxPoint x="140" y="620" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-35" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="100" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-36" value="<font color="#ffffff">SDA</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#CC0000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="60" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-37" value="<font>SCL</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFF00;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="80" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-38" value="<font color="#ffffff">GND</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="40" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-39" value="INT" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFFFF;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="100" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-41" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#0000FF;" edge="1" parent="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="580" as="sourcePoint" />
|
|
||||||
<mxPoint x="330" y="560" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="190" y="580" />
|
|
||||||
<mxPoint x="190" y="510" />
|
|
||||||
<mxPoint x="360" y="510" />
|
|
||||||
<mxPoint x="360" y="560" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-42" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#0000FF;" edge="1" parent="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="640" as="sourcePoint" />
|
|
||||||
<mxPoint x="330" y="580" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="180" y="640" />
|
|
||||||
<mxPoint x="180" y="500" />
|
|
||||||
<mxPoint x="370" y="500" />
|
|
||||||
<mxPoint x="370" y="580" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-51" value="" style="endArrow=classic;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;strokeColor=#0000FF;" edge="1" parent="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="330" y="600" as="sourcePoint" />
|
|
||||||
<mxPoint x="480" y="210" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="390" y="600" />
|
|
||||||
<mxPoint x="390" y="480" />
|
|
||||||
<mxPoint x="250" y="480" />
|
|
||||||
<mxPoint x="250" y="210" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-56" value="" style="endArrow=none;html=1;rounded=0;" edge="1" parent="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="180" y="170" as="sourcePoint" />
|
|
||||||
<mxPoint x="480" y="200" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="320" y="170" />
|
|
||||||
<mxPoint x="320" y="200" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-58" value="." style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="420" y="80" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-59" value="." style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="440" y="80" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-61" value="" style="endArrow=none;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-59">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="440" y="220" as="sourcePoint" />
|
|
||||||
<mxPoint x="490" y="170" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="450" y="170" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-62" value="" style="endArrow=none;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="3qXY1K8jvDizOHU8Sasa-58">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="490" y="180" as="sourcePoint" />
|
|
||||||
<mxPoint x="540" y="130" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="430" y="180" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-63" value="RX" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="440" y="60" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-64" value="TX" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="420" y="60" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-66" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;startArrow=classic;startFill=1;endArrow=none;endFill=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-65">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="719.9999999999998" y="450" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="720" y="500" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-65" value="LED" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="760" y="480" width="40" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-75" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-68">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="720" y="200" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="830" y="160" />
|
|
||||||
<mxPoint x="830" y="200" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-68" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="880" y="150" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-76" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-69">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="720" y="180" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="880" y="180" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-69" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="880" y="170" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-72" value="GND" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="900" y="150" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-74" value="5V+" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="900" y="170" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-78" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-77">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="320" y="540" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="321" y="505" />
|
|
||||||
<mxPoint x="321" y="540" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-77" value="3V&nbsp;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="400" y="490" width="60" height="30" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
</root>
|
|
||||||
</mxGraphModel>
|
|
||||||
</diagram>
|
|
||||||
</mxfile>
|
|
||||||
@@ -1,372 +0,0 @@
|
|||||||
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.0.3 Chrome/130.0.6723.137 Electron/33.2.1 Safari/537.36" version="26.0.3">
|
|
||||||
<diagram name="Page-1" id="AMVLBRZDkjnkadgTC83C">
|
|
||||||
<mxGraphModel dx="1366" dy="798" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
|
|
||||||
<root>
|
|
||||||
<mxCell id="0" />
|
|
||||||
<mxCell id="1" parent="0" />
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-1" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=https://www.elektronik-kompendium.de/sites/raspberry-pi/bilder/raspberry-pi-pico-gpio.png;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;locked=1;connectable=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="343" y="150" width="522.06" height="306" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-2" value="" style="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=https://www.build-electronic-circuits.com/wp-content/uploads/2023/04/7432-pinout.png;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;locked=1;connectable=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="190" y="520" width="166.39" height="170" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-54" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-3" target="3qXY1K8jvDizOHU8Sasa-12">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="180" y="170" />
|
|
||||||
<mxPoint x="180" y="290" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-3" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="160" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-49" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#CC0000;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-4">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="220" y="190" />
|
|
||||||
<mxPoint x="220" y="240" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-4" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="180" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-45" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#FFFF00;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-5">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="260" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="230" y="210" />
|
|
||||||
<mxPoint x="230" y="260" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-5" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="200" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#0000FF;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-6">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="600" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="130" y="230" />
|
|
||||||
<mxPoint x="130" y="600" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-6" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="220" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-8" value="<font color="#ffffff">SDA</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#CC0000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="180" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-9" value="<font>SCL</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFF00;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="200" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-10" value="<font color="#ffffff">GND</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="160" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-11" value="INT" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFFFF;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="220" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-55" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-12" target="3qXY1K8jvDizOHU8Sasa-20">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="180" y="290" />
|
|
||||||
<mxPoint x="180" y="410" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-12" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="280" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-47" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#CC0000;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-13">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="220" y="310" />
|
|
||||||
<mxPoint x="220" y="240" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-13" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="300" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#FFFF00;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-14">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="260" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="230" y="330" />
|
|
||||||
<mxPoint x="230" y="260" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-14" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="320" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-15">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="560" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="120" y="350" />
|
|
||||||
<mxPoint x="120" y="560" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-15" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="340" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-16" value="<font color="#ffffff">SDA</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#CC0000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="300" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-17" value="<font>SCL</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFF00;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="320" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-18" value="<font color="#ffffff">GND</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="280" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-19" value="INT" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFFFF;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="340" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-20" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="400" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-48" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#CC0000;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-21">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="220" y="430" />
|
|
||||||
<mxPoint x="220" y="240" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-21" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="420" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-46" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#FFFF00;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-22">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="260" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="230" y="450" />
|
|
||||||
<mxPoint x="230" y="260" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-22" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="440" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#0000FF;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-23">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="540" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="110" y="470" />
|
|
||||||
<mxPoint x="110" y="540" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-23" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="460" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-24" value="<font color="#ffffff">SDA</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#CC0000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="420" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-25" value="<font>SCL</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFF00;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="440" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-26" value="<font color="#ffffff">GND</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="400" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-27" value="INT" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFFFF;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="460" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-53" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-32" target="3qXY1K8jvDizOHU8Sasa-3">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="180" y="50" />
|
|
||||||
<mxPoint x="180" y="170" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-32" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="40" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-50" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;strokeColor=#CC0000;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-33">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="240" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="220" y="70" />
|
|
||||||
<mxPoint x="220" y="240" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-33" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="60" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#FFFF00;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-34">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="390" y="260" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="230" y="90" />
|
|
||||||
<mxPoint x="230" y="260" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-34" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="80" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-40" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;strokeColor=#0000FF;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-35">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="620" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="140" y="110" />
|
|
||||||
<mxPoint x="140" y="620" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-35" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="80" y="100" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-36" value="<font color="#ffffff">SDA</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#CC0000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="60" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-37" value="<font>SCL</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFF00;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="80" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-38" value="<font color="#ffffff">GND</font>" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="40" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-39" value="INT" style="rounded=0;whiteSpace=wrap;html=1;strokeColor=default;fillColor=#FFFFFF;fontColor=#000000;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="40" y="100" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-41" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#0000FF;" edge="1" parent="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="580" as="sourcePoint" />
|
|
||||||
<mxPoint x="330" y="560" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="190" y="580" />
|
|
||||||
<mxPoint x="190" y="510" />
|
|
||||||
<mxPoint x="360" y="510" />
|
|
||||||
<mxPoint x="360" y="560" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-42" value="" style="endArrow=classic;html=1;rounded=0;strokeColor=#0000FF;" edge="1" parent="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="220" y="640" as="sourcePoint" />
|
|
||||||
<mxPoint x="330" y="580" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="180" y="640" />
|
|
||||||
<mxPoint x="180" y="500" />
|
|
||||||
<mxPoint x="370" y="500" />
|
|
||||||
<mxPoint x="370" y="580" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-51" value="" style="endArrow=classic;html=1;rounded=0;edgeStyle=orthogonalEdgeStyle;strokeColor=#0000FF;" edge="1" parent="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="330" y="600" as="sourcePoint" />
|
|
||||||
<mxPoint x="480" y="210" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="390" y="600" />
|
|
||||||
<mxPoint x="390" y="480" />
|
|
||||||
<mxPoint x="250" y="480" />
|
|
||||||
<mxPoint x="250" y="210" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-56" value="" style="endArrow=none;html=1;rounded=0;" edge="1" parent="1">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="180" y="170" as="sourcePoint" />
|
|
||||||
<mxPoint x="480" y="200" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="320" y="170" />
|
|
||||||
<mxPoint x="320" y="200" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-58" value="." style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="420" y="80" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-59" value="." style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="440" y="80" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-61" value="" style="endArrow=none;html=1;rounded=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-59">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="440" y="220" as="sourcePoint" />
|
|
||||||
<mxPoint x="490" y="170" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="450" y="170" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-62" value="" style="endArrow=none;html=1;rounded=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" target="3qXY1K8jvDizOHU8Sasa-58">
|
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
|
||||||
<mxPoint x="490" y="180" as="sourcePoint" />
|
|
||||||
<mxPoint x="540" y="130" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="430" y="180" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-63" value="RX" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="440" y="60" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-64" value="TX" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="420" y="60" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-66" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;startArrow=classic;startFill=1;endArrow=none;endFill=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-65">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="719.9999999999998" y="450" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="720" y="500" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-65" value="LED" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="760" y="480" width="40" height="40" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-75" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-68">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="720" y="200" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="830" y="160" />
|
|
||||||
<mxPoint x="830" y="200" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-68" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="880" y="150" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-76" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-69">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="720" y="180" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="880" y="180" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-69" value="O" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="880" y="170" width="20" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-72" value="GND" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="900" y="150" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-74" value="5V+" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="900" y="170" width="40" height="20" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-78" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="3qXY1K8jvDizOHU8Sasa-77">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<mxPoint x="320" y="540" as="targetPoint" />
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="321" y="505" />
|
|
||||||
<mxPoint x="321" y="540" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
|
||||||
<mxCell id="3qXY1K8jvDizOHU8Sasa-77" value="3V&nbsp;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
|
|
||||||
<mxGeometry x="400" y="490" width="60" height="30" as="geometry" />
|
|
||||||
</mxCell>
|
|
||||||
</root>
|
|
||||||
</mxGraphModel>
|
|
||||||
</diagram>
|
|
||||||
</mxfile>
|
|
||||||
1
i2c-hub/circuit/external/KiCad-RP-Pico
vendored
1
i2c-hub/circuit/external/KiCad-RP-Pico
vendored
Submodule i2c-hub/circuit/external/KiCad-RP-Pico deleted from dc6f9b9f21
1
i2c-hub/circuit/external/RP_Silicon_KiCad
vendored
1
i2c-hub/circuit/external/RP_Silicon_KiCad
vendored
Submodule i2c-hub/circuit/external/RP_Silicon_KiCad deleted from 8ab84dd99d
@@ -1 +0,0 @@
|
|||||||
/home/alexander/Projects/gobot/i2c-hub/circuit/i2c-hub/_autosave-i2c-hub.kicad_sch
|
|
||||||
BIN
i2c-hub/circuit/i2c-hub/_autosave-i2c-hub.kicad_sch
(Stored with Git LFS)
BIN
i2c-hub/circuit/i2c-hub/_autosave-i2c-hub.kicad_sch
(Stored with Git LFS)
Binary file not shown.
BIN
i2c-hub/circuit/i2c-hub/i2c-hub-backups/i2c-hub-2024-12-30_211118.zip
(Stored with Git LFS)
BIN
i2c-hub/circuit/i2c-hub/i2c-hub-backups/i2c-hub-2024-12-30_211118.zip
(Stored with Git LFS)
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user