Skip to content

Commit cee0a68

Browse files
docs: update
1 parent a6af34e commit cee0a68

8 files changed

+75
-35
lines changed

Diff for: src/AnalogInClass.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,4 @@ uint16_t AnalogInClass::read(int channel) {
140140
}
141141

142142
AnalogInClass MachineControl_AnalogIn;
143-
144143
/**** END OF FILE ****/

Diff for: src/AnalogInClass.h

+10-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* This library allows to set the resistor configuration for the type of connected analog sensor (0-10V, 4-20mA or NTC)
77
* and to capture the analog values acquired by the ANALOG IN channels.
88
*/
9+
910
#ifndef __ANALOGIN_CLASS_H
1011
#define __ANALOGIN_CLASS_H
1112

@@ -36,6 +37,12 @@ class AnalogInClass {
3637
* @param ai2_pin The analog pin number of the channel 2
3738
*/
3839
AnalogInClass(PinName ai0_pin = PC_3C, PinName ai1_pin = PC_2C, PinName ai2_pin = PA_1C);
40+
41+
/**
42+
* @brief Destruct the AnalogInClass object.
43+
*
44+
* This destructor releases any resources used by the AnalogInClass object.
45+
*/
3946
~AnalogInClass();
4047

4148
/**
@@ -56,9 +63,9 @@ class AnalogInClass {
5663
uint16_t read(int channel);
5764

5865
private:
59-
PinName _ai0;
60-
PinName _ai1;
61-
PinName _ai2;
66+
PinName _ai0; // Analog input pin for channel 0
67+
PinName _ai1; // Analog input pin for channel 1
68+
PinName _ai2; // Analog input pin for channel 2
6269
};
6370

6471
extern AnalogInClass MachineControl_AnalogIn;

Diff for: src/AnalogOutClass.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,4 @@ void AnalogOutClass::write(int channel, float voltage) {
7070
}
7171

7272
AnalogOutClass MachineControl_AnalogOut;
73-
7473
/**** END OF FILE ****/

Diff for: src/AnalogOutClass.h

+11-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
* This library allows to configure the analog channels as PWM, to set frequency and value.
77
*/
8+
89
#ifndef __ANALOGOUT_CLASS_H
910
#define __ANALOGOUT_CLASS_H
1011

@@ -29,6 +30,12 @@ class AnalogOutClass {
2930
* @param ao3_pin The analog pin number of the channel 2
3031
*/
3132
AnalogOutClass(PinName ao0_pin = PJ_11, PinName ao1_pin = PK_1, PinName ao2_pin = PG_7, PinName ao3_pin = PC_7);
33+
34+
/**
35+
* @brief Destruct the AnalogOutClass object.
36+
*
37+
* This destructor releases any resources used by the AnalogOutClass object.
38+
*/
3239
~AnalogOutClass();
3340

3441
/**
@@ -55,10 +62,10 @@ class AnalogOutClass {
5562
void write(int channel, float voltage);
5663

5764
private:
58-
mbed::PwmOut _ao0;
59-
mbed::PwmOut _ao1;
60-
mbed::PwmOut _ao2;
61-
mbed::PwmOut _ao3;
65+
mbed::PwmOut _ao0; // PWM output for Analog Out channel 0
66+
mbed::PwmOut _ao1; // PWM output for Analog Out channel 1
67+
mbed::PwmOut _ao2; // PWM output for Analog Out channel 2
68+
mbed::PwmOut _ao3; // PWM output for Analog Out channel 3
6269
};
6370

6471
extern AnalogOutClass MachineControl_AnalogOut;

Diff for: src/DigitalOutputsClass.h

+18-10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*
66
* This library allows to interface with the IO Expander and set the digital outputs.
77
*/
8+
89
#ifndef __DIGITALOUTPUTS_CLASS_H
910
#define __DIGITALOUTPUTS_CLASS_H
1011

@@ -44,6 +45,12 @@ class DigitalOutputsClass {
4445
PinName do6_pin = PD_3,
4546
PinName do7_pin = PA_14,
4647
PinName latch_pin = PB_2);
48+
49+
/**
50+
* @brief Destruct the DigitalOutputsClass object.
51+
*
52+
* This destructor releases any resources used by the DigitalOutputsClass object.
53+
*/
4754
~DigitalOutputsClass();
4855

4956
/**
@@ -71,16 +78,17 @@ class DigitalOutputsClass {
7178
* - To set all channels to LOW: val_mask = 0 (0b00000000)
7279
*/
7380
void writeAll(uint8_t val_mask);
74-
private:
75-
PinName _do0;
76-
PinName _do1;
77-
PinName _do2;
78-
PinName _do3;
79-
PinName _do4;
80-
PinName _do5;
81-
PinName _do6;
82-
PinName _do7;
83-
PinName _latch;
81+
82+
private:
83+
PinName _do0; // Digital output pin for DO (Digital Out) channel 0
84+
PinName _do1; // Digital output pin for DO (Digital Out) channel 1
85+
PinName _do2; // Digital output pin for DO (Digital Out) channel 2
86+
PinName _do3; // Digital output pin for DO (Digital Out) channel 3
87+
PinName _do4; // Digital output pin for DO (Digital Out) channel 4
88+
PinName _do5; // Digital output pin for DO (Digital Out) channel 5
89+
PinName _do6; // Digital output pin for DO (Digital Out) channel 6
90+
PinName _do7; // Digital output pin for DO (Digital Out) channel 7
91+
PinName _latch; // Latch control pin
8492

8593
/**
8694
* @brief Configures the thermal shutdown of the high-side switches (TPS4H160) to operate in latch mode.

Diff for: src/ProgrammableDINClass.h

+23-15
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,29 @@
2323
* This class extends the ArduinoIOExpanderClass to interface with the IO Expander and provides methods to configure digital inputs.
2424
*/
2525
class ProgrammableDINClass : public ArduinoIOExpanderClass {
26-
public:
27-
/**
28-
* @brief Construct a ProgrammableDINClass object.
29-
*/
30-
ProgrammableDINClass();
31-
~ProgrammableDINClass();
32-
33-
/**
34-
* @brief Initialize the ProgrammableDIN module.
35-
*
36-
* Test connection with the IOExpander and set all the pins to the default mode.
37-
*
38-
* @return true If the ProgrammableDIN module is successfully initialized, false otherwise.
39-
*/
40-
bool begin();
26+
public:
27+
/**
28+
* @brief Construct a ProgrammableDINClass object.
29+
*
30+
* This constructor initializes a ProgrammableDINClass object.
31+
*/
32+
ProgrammableDINClass();
33+
34+
/**
35+
* @brief Destruct the ProgrammableDINClass object.
36+
*
37+
* This destructor releases any resources used by the ProgrammableDINClass object.
38+
*/
39+
~ProgrammableDINClass();
40+
41+
/**
42+
* @brief Initialize the ProgrammableDIN module.
43+
*
44+
* Test connection with the IOExpander and set all the pins to the default mode.
45+
*
46+
* @return true If the ProgrammableDIN module is successfully initialized, false otherwise.
47+
*/
48+
bool begin();
4149
};
4250

4351
extern ProgrammableDINClass MachineControl_DigitalInputs;

Diff for: src/ProgrammableDIOClass.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ class ProgrammableDIOClass : public ArduinoIOExpanderClass {
3232
* @param latch_pin The pin number for the latch mode control.
3333
*/
3434
ProgrammableDIOClass(PinName latch_pin = PH_14);
35+
36+
/**
37+
* @brief Destruct the ProgrammableDIOClass object.
38+
*
39+
* This destructor releases any resources used by the ProgrammableDIOClass object.
40+
*/
3541
~ProgrammableDIOClass();
3642

3743
/**
@@ -43,7 +49,7 @@ class ProgrammableDIOClass : public ArduinoIOExpanderClass {
4349
bool begin(bool latch_mode = true);
4450

4551
private:
46-
PinName _latch;
52+
PinName _latch; // Latch control pin
4753

4854
/**
4955
* @brief Configures the thermal shutdown of the high-side switches (TPS4H160) to operate in latch mode.

Diff for: src/TempProbesClass.h

+6
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ class TempProbesClass {
4343
* @param rtd_th_pin The pin number for the RTD connection.
4444
*/
4545
TempProbesClass(PinName ch_sel0_pin = PD_6, PinName ch_sel1_pin = PI_4, PinName ch_sel2_pin = PG_10, PinName rtd_th_pin = PC_15);
46+
47+
/**
48+
* @brief Destruct the TempProbesClass object.
49+
*
50+
* This destructor releases any resources used by the TempProbesClass object.
51+
*/
4652
~TempProbesClass();
4753

4854
/**

0 commit comments

Comments
 (0)