Skip to content

Commit 6562bd7

Browse files
committed
version 1.0.0
1 parent 7a2d7d4 commit 6562bd7

File tree

3 files changed

+12
-21
lines changed

3 files changed

+12
-21
lines changed

example/basic/platformio.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
platform = espressif32
1313
board = esp32doit-devkit-v1
1414
framework = arduino
15+
16+
build_flags =
17+
-std=gnu++17
18+
build_unflags =
19+
-std=gnu++11
20+
1521
lib_deps =
1622
https://github.com/mestrode/Lin-Interface-Library.git
1723
https://github.com/mestrode/Lin-Transceiver-Library.git

example/basic/src/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22
#include <TJA1020.hpp>
33
#include <LinFrameTransfer.hpp>
44

5-
constexpr int PIN_NSLP = 23;
5+
constexpr int LIN_UART_NO = 1;
6+
constexpr int LIN_BAUD = 19200;
7+
constexpr int LIN_PIN_RX = RX1;
8+
constexpr int LIN_PIN_TX = TX1;
9+
constexpr int LIN_PIN_NSLP = 23;
610

711
// using a TJA1020 chip
812
// using UART 1 for LinBus
913
// configure 19200 Baud
1014
// using GPIO 23 for /NSLP pin of TJA1020
11-
Lin_TJA1020 linBus(1, 19200, PIN_NSLP);
15+
Lin_TJA1020 linBus(LIN_UART_NO, LIN_BAUD, LIN_PIN_RX, LIN_PIN_TX, LIN_PIN_NSLP);
1216
LinFrameTransfer linMaster(linBus, Serial, 2);
1317

1418
// data to be filled by bus request

platformio.ini

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,3 @@ lib_deps =
2222
Arduino
2323

2424
lib_ldf_mode = chain+
25-
26-
27-
[env:example-basic]
28-
platform = espressif32@^6.9.0
29-
board = esp32dev
30-
framework = arduino
31-
32-
src_dir = example/basic/src
33-
lib_extra_dirs = src
34-
35-
build_flags =
36-
-std=gnu++17
37-
build_unflags =
38-
-std=gnu++11
39-
40-
lib_deps =
41-
https://github.com/mestrode/Lin-Interface-Library.git
42-
43-
lib_ldf_mode = chain+

0 commit comments

Comments
 (0)