Skip to content

Commit 0cf448f

Browse files
authored
Merge pull request #3 from J-Rios/doxygen
Added doxygen documentation
2 parents 4d2886f + af73f85 commit 0cf448f

16 files changed

+911
-213
lines changed

src/hal/arduino/minbasecli_arduino.cpp

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@
6464
/* Constructor */
6565

6666
/**
67-
* @brief Constructor, initialize internal attributes.
68-
*/
67+
* @details
68+
* This constructor initializes all attributtes of the CLI class.
69+
*/
6970
MINBASECLI_ARDUINO::MINBASECLI_ARDUINO()
7071
{
7172
this->iface = NULL;
@@ -76,9 +77,10 @@ MINBASECLI_ARDUINO::MINBASECLI_ARDUINO()
7677
/* Specific Device/Framework HAL functions */
7778

7879
/**
79-
* @brief Hardware Abstraction Layer setup CLI interface.
80-
* @return If CLI has been successfully initialized.
81-
*/
80+
* @details
81+
* This function should get and initialize the interface element that is going
82+
* to be used by the CLI.
83+
*/
8284
bool MINBASECLI_ARDUINO::hal_setup(void* iface, const uint32_t baud_rate)
8385
{
8486
this->iface = iface;
@@ -88,29 +90,30 @@ bool MINBASECLI_ARDUINO::hal_setup(void* iface, const uint32_t baud_rate)
8890
}
8991

9092
/**
91-
* @brief Check if the internal CLI HAL interface has received any data.
92-
* @return The number of bytes received by the interface.
93-
*/
93+
* @details
94+
* This function return the number of bytes received by the interface that are
95+
* available to be read.
96+
*/
9497
size_t MINBASECLI_ARDUINO::hal_iface_available()
9598
{
9699
_IFACE* _Serial = (_IFACE*) this->iface;
97100
return ((size_t) (_Serial->available()));
98101
}
99102

100103
/**
101-
* @brief Read a byte from the CLI HAL interface.
102-
* @return The byte read from the interface.
103-
*/
104+
* @details
105+
* This function returns a received byte from the interface.
106+
*/
104107
uint8_t MINBASECLI_ARDUINO::hal_iface_read()
105108
{
106109
_IFACE* _Serial = (_IFACE*) this->iface;
107110
return _Serial->read();
108111
}
109112

110113
/**
111-
* @brief Print a byte with ASCII encode to CLI HAL interface.
112-
* @param data_byte Byte of data to write.
113-
*/
114+
* @details
115+
* This function send a byte through the interface.
116+
*/
114117
void MINBASECLI_ARDUINO::hal_iface_print(const uint8_t data_byte)
115118
{
116119
_IFACE* _Serial = (_IFACE*) this->iface;

src/hal/arduino/minbasecli_arduino.h

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,66 @@
5555

5656
/* CLass Interface */
5757

58+
/**
59+
* @brief MINBASECLI_ARDUINO Class.
60+
*/
5861
class MINBASECLI_ARDUINO
5962
{
63+
/*************************************************************************/
64+
65+
/* Public Methods */
66+
6067
public:
68+
69+
/**
70+
* @brief Construct a new minbasecli arduino object.
71+
*/
6172
MINBASECLI_ARDUINO();
6273

74+
/*************************************************************************/
75+
76+
/* Protected Methods */
77+
6378
protected:
79+
80+
/**
81+
* @brief Configure the interface and communication speed of the CLI.
82+
* @param iface Pointer to interface element that will be used by the
83+
* CLI.
84+
* @param baud_rate Communication speed for the CLI.
85+
* @return true Interface configuration success.
86+
* @return false Interface configuration fail.
87+
*/
6488
bool hal_setup(void* iface, const uint32_t baud_rate);
89+
90+
/**
91+
* @brief Get the number of bytes that the interface has recevived and
92+
* are available in the current interface buffer to be read.
93+
* @return size_t The number of bytes available to be read.
94+
*/
6595
size_t hal_iface_available();
96+
97+
/**
98+
* @brief Get/read a byte from the interface.
99+
* @return uint8_t The byte read.
100+
*/
66101
uint8_t hal_iface_read();
102+
103+
/**
104+
* @brief Write a byte to the interface.
105+
* @param data_byte The byte to be written.
106+
*/
67107
void hal_iface_print(const uint8_t data_byte);
68108

109+
/*************************************************************************/
110+
111+
/* Private Attributes */
112+
69113
private:
114+
115+
/**
116+
* @brief Pointer to interfce used.
117+
*/
70118
void* iface;
71119
};
72120

src/hal/avr/minbasecli_avr.cpp

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@
6060
/* Constructor */
6161

6262
/**
63-
* @brief Constructor, initialize internal attributes.
64-
*/
63+
* @details
64+
* This constructor initializes all attributtes of the CLI class.
65+
*/
6566
MINBASECLI_AVR::MINBASECLI_AVR()
6667
{
6768
this->iface = NULL;
@@ -72,9 +73,10 @@ MINBASECLI_AVR::MINBASECLI_AVR()
7273
/* Specific Device/Framework HAL Methods */
7374

7475
/**
75-
* @brief Hardware Abstraction Layer setup CLI interface.
76-
* @return If CLI has been successfully initialized.
77-
*/
76+
* @details
77+
* This function should get and initialize the interface element that is going
78+
* to be used by the CLI.
79+
*/
7880
bool MINBASECLI_AVR::hal_setup(void* iface, const uint32_t baud_rate)
7981
{
8082
this->iface = iface;
@@ -84,9 +86,10 @@ bool MINBASECLI_AVR::hal_setup(void* iface, const uint32_t baud_rate)
8486
}
8587

8688
/**
87-
* @brief Check if the internal CLI HAL interface has received any data.
88-
* @return The number of bytes received by the interface.
89-
*/
89+
* @details
90+
* This function return the number of bytes received by the interface that are
91+
* available to be read.
92+
*/
9093
size_t MINBASECLI_AVR::hal_iface_available()
9194
{
9295
_IFACE* _Serial = (_IFACE*) this->iface;
@@ -95,9 +98,9 @@ size_t MINBASECLI_AVR::hal_iface_available()
9598
}
9699

97100
/**
98-
* @brief Read a byte from the CLI HAL interface.
99-
* @return The byte read from the interface.
100-
*/
101+
* @details
102+
* This function returns a received byte from the interface.
103+
*/
101104
uint8_t MINBASECLI_AVR::hal_iface_read()
102105
{
103106
uint8_t read_byte = 0;
@@ -111,9 +114,9 @@ uint8_t MINBASECLI_AVR::hal_iface_read()
111114
}
112115

113116
/**
114-
* @brief Print a byte with ASCII encode to CLI HAL interface.
115-
* @param data_byte Byte of data to write.
116-
*/
117+
* @details
118+
* This function send a byte through the interface.
119+
*/
117120
void MINBASECLI_AVR::hal_iface_print(const uint8_t data_byte)
118121
{
119122
_IFACE* _Serial = (_IFACE*) this->iface;

src/hal/avr/minbasecli_avr.h

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151

5252
/* Constants & Defines */
5353

54+
// Default UART number to be used
5455
#if !defined(MINBASECLI_UART)
5556
#define MINBASECLI_UART 0
5657
#endif
@@ -59,18 +60,66 @@
5960

6061
/* CLass Interface */
6162

63+
/**
64+
* @brief MINBASECLI_AVR Class.
65+
*/
6266
class MINBASECLI_AVR
6367
{
68+
/*************************************************************************/
69+
70+
/* Public Methods */
71+
6472
public:
73+
74+
/**
75+
* @brief Construct a new minbasecli avr object.
76+
*/
6577
MINBASECLI_AVR();
6678

79+
/*************************************************************************/
80+
81+
/* Protected Methods */
82+
6783
protected:
84+
85+
/**
86+
* @brief Configure the interface and communication speed of the CLI.
87+
* @param iface Pointer to interface element that will be used by the
88+
* CLI.
89+
* @param baud_rate Communication speed for the CLI.
90+
* @return true Interface configuration success.
91+
* @return false Interface configuration fail.
92+
*/
6893
bool hal_setup(void* iface, const uint32_t baud_rate);
94+
95+
/**
96+
* @brief Get the number of bytes that the interface has recevived and
97+
* are available in the current interface buffer to be read.
98+
* @return size_t The number of bytes available to be read.
99+
*/
69100
size_t hal_iface_available();
101+
102+
/**
103+
* @brief Get/read a byte from the interface.
104+
* @return uint8_t The byte read.
105+
*/
70106
uint8_t hal_iface_read();
107+
108+
/**
109+
* @brief Write a byte to the interface.
110+
* @param data_byte The byte to be written.
111+
*/
71112
void hal_iface_print(const uint8_t data_byte);
72113

114+
/*************************************************************************/
115+
116+
/* Private Attributes */
117+
73118
private:
119+
120+
/**
121+
* @brief Pointer to interfce used.
122+
*/
74123
void* iface;
75124
};
76125

0 commit comments

Comments
 (0)