You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @brief Source file for the COMMClass used to initialize and interact with communication protocols (CAN Bus, RS485, and RS232) on the Portenta Machine Control board.
5
+
*
6
+
*/
7
+
8
+
/* Includes -----------------------------------------------------------------*/
* @brief Header file for the COMMClass used to initialize and interact with communication protocols (CAN Bus, RS485, and RS232) on the Portenta Machine Control board.
5
+
*
6
+
* This library provides a class to manage the communication protocols of the Portenta Machine Control board.
7
+
* It allows initializing and interacting with the CAN Bus, RS485, and RS232 protocols. The library also initializes the corresponding LEDs for CAN and RS485.
8
+
*/
9
+
10
+
#ifndef __COMM_CLASS_H
11
+
#define__COMM_CLASS_H
12
+
13
+
/* Includes -------------------------------------------------------------------*/
1
14
#include<ArduinoRS485.h>
2
15
#include<Arduino.h>
3
16
#include<pinDefinitions.h>
4
17
#include<mbed.h>
5
18
19
+
/* Class ----------------------------------------------------------------------*/
20
+
6
21
/**
7
-
* The COMMClass is used to initialize the CAN and RS485 LEDs and
8
-
* establish the power mode of the CAN bus.
22
+
* @class COMMClass
23
+
* @brief Class for managing the communication protocols of the Portenta Machine Control.
9
24
*/
10
25
classCOMMClass {
11
26
public:
12
-
// to be tested: check if can be made a big pin initialization
13
-
14
-
/**
15
-
* Shutdown RS485 and CAN LEDs
16
-
*/
17
-
voidinit();
18
-
19
-
/**
20
-
* Set the CAN transceiver in Normal mode. In this mode, the transceiver
21
-
* can transmit and receive data via the bus lines CANH and CANL.
22
-
*/
23
-
voidenableCAN();
24
-
25
-
/**
26
-
* Set the CAN transceiver in standby (low power) mode. In this mode the
27
-
* transceiver will not be able to transmit or correctly receive data via the bus lines.
28
-
* The wake-up filter on the output of the low-power receiver does not latch bus dominant states,
29
-
* but ensures that only bus dominant and bus recessive states that persist longer than tfltr(wake)
0 commit comments