|
9 | 9 | #include "utility/RTC/PCF8563T.h"
|
10 | 10 | #include "utility/RTC/PCF8563T.h"
|
11 | 11 |
|
12 |
| -#include "Arduino.h" |
13 |
| -#include "pinDefinitions.h" |
14 |
| -#include "mbed.h" |
| 12 | +#include <Arduino.h> |
| 13 | +#include <pinDefinitions.h> |
| 14 | +#include <mbed.h> |
15 | 15 |
|
16 | 16 | namespace machinecontrol {
|
17 | 17 |
|
@@ -74,9 +74,6 @@ class RTDClass {
|
74 | 74 |
|
75 | 75 | extern RTDClass temp_probes;
|
76 | 76 |
|
77 |
| -static mbed::CAN _can(PB_8, PH_13); |
78 |
| - |
79 |
| - |
80 | 77 | /**
|
81 | 78 | * The COMMClass is used to initialize the CAN and RS485 LEDs and
|
82 | 79 | * establish the power mode of the CAN bus.
|
@@ -124,10 +121,10 @@ class COMMClass {
|
124 | 121 | can_disable = 1;
|
125 | 122 | }
|
126 | 123 |
|
127 |
| - UART _UART4_ = arduino::UART(PA_0, PI_9, NC, NC); |
128 |
| - mbed::CAN& can = _can; |
| 124 | + arduino::UART _UART4_ {PA_0, PI_9, NC, NC}; |
| 125 | + mbed::CAN can {PB_8, PH_13}; |
129 | 126 |
|
130 |
| - RS485Class rs485 = RS485Class(_UART4_, PinNameToIndex(PA_0), PinNameToIndex(PI_13), PinNameToIndex(PI_10)); |
| 127 | + RS485Class rs485 {_UART4_, PinNameToIndex(PA_0), PinNameToIndex(PI_13), PinNameToIndex(PI_10)}; |
131 | 128 |
|
132 | 129 | void rs485Enable(bool enable) { digitalWrite(PinNameToIndex(PG_9), enable ? HIGH : LOW); }
|
133 | 130 | void rs485ModeRS232(bool enable) { digitalWrite(PinNameToIndex(PA_10), enable ? LOW : HIGH); }
|
|
0 commit comments