Skip to content

Commit 59cf583

Browse files
committed
Doxygen: Last fix for doxygen warnings in a series.
Used Copilot w/ Claude.
1 parent 400cb0d commit 59cf583

32 files changed

Lines changed: 239 additions & 144 deletions

modules/core/include/core/Ring.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ class Ring final {
149149
return false;
150150
}
151151

152-
/// @brief Peeks at the first element in the Ring without removing it
153-
/// @param output The reference to the first element. When the Ring is empty, the value of the element is undefined.
152+
/// @brief Peeks at the first element in the Ring without removing it.
153+
/// @return The reference to the first element in the Ring. When the Ring is empty, behavior is undefined.
154154
ValueType& Peek() { return buffer_[head_]; }
155155

156156
/// @brief The indexing operator for mutable access

modules/core/include/core/StateChart.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ class StateChart {
7777

7878
/// @brief The parameter constructor
7979
/// @param callback The reference to the callback interface
80-
/// @param initial_state The initial state of the StateChart
81-
/// @param final_state The final state of the StateChart
8280
StateChart(Callback& callback)
8381
: callback_{callback}
8482
, state_{StateType::Undefined} {}

modules/core/include/core/StateMachine.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class StateMachine {
5858
/// @brief The parameter constructor
5959
/// @param callback The reference to the callback interface
6060
/// @param initial_state The initial state of the StateMachine
61-
/// @param final_state The final state of the StateMachine
6261
StateMachine(Callback& callback, StateType initial_state)
6362
: callback_{callback}
6463
, initial_state_{initial_state}

modules/core/include/core/Units.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@
3838
namespace core {
3939
/// @brief The namespace for the core units of measure and their constants
4040
namespace units {
41-
42-
/// User-defined literal for creating Celsius temperature values
43-
constexpr Celsius operator""_c(long double value) {
44-
return Celsius{static_cast<double>(value)};
45-
}
46-
4741
/// @brief The unit of Length is Meters
4842
using Length = Meters;
4943
/// @brief The unit of Area is Square Meters
@@ -302,6 +296,9 @@ namespace physics {
302296
constexpr static Speed c = 299'792'458.0_mps;
303297
} // namespace physics
304298

299+
/// User-defined literal for speed as a multiple of the speed of light
300+
/// @param value The multiple of c (e.g., 0.5_c = 149,896,229 m/s)
301+
/// @return Speed value in meters per second
305302
constexpr Speed operator""_c(long double value) {
306303
return Speed{physics::c.value() * static_cast<Speed::Type>(value)};
307304
}

modules/cortex/include/cortex/peripherals/InstructionTraceMacrocell.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,7 @@ struct DataWatchAndTrace final {
287287
/// The Cluster Register
288288
};
289289

290-
/// The Trace Point Interface Unit
291-
/// @aka TPIU
290+
/// The Trace Port Interface Unit (TPIU)
292291
struct TracePortInterfaceUnit final {
293292
/// @brief The bitfield definition of the register
294293
struct SupportedParallelPortSizes final {

modules/cortex/include/cortex/peripherals/SystemControlBlock.hpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,10 @@ struct SystemControlBlock final {
223223
/// @brief Default constructor
224224
SystemHandlerControlState()
225225
: whole{0} {}
226+
/// Copy constructor from another instance
226227
SystemHandlerControlState(SystemHandlerControlState const& other)
227228
: whole{other.whole} {}
229+
/// Copy constructor from volatile register
228230
SystemHandlerControlState(SystemHandlerControlState volatile& other)
229231
: whole{other.whole} {}
230232
/// @brief The bit field for the System Handler Control State Register
@@ -268,8 +270,10 @@ struct SystemControlBlock final {
268270
/// @brief Default constructor
269271
ConfigurationFaultStatus()
270272
: whole{0} {}
273+
/// Copy constructor from another instance
271274
ConfigurationFaultStatus(ConfigurationFaultStatus const& other)
272275
: whole{other.whole} {}
276+
/// Copy constructor from volatile register
273277
ConfigurationFaultStatus(ConfigurationFaultStatus volatile& other)
274278
: whole{other.whole} {}
275279
/// @brief The bit field for the Configuration Fault Status Register
@@ -316,10 +320,13 @@ struct SystemControlBlock final {
316320

317321
/// The Hard Fault Status Register (HFSR)
318322
struct HardFaultStatus final {
323+
/// Default constructor - initializes to zero
319324
HardFaultStatus()
320325
: whole{0} {}
326+
/// Copy constructor from another instance
321327
HardFaultStatus(HardFaultStatus const& other)
322328
: whole{other.whole} {}
329+
/// Copy constructor from volatile register
323330
HardFaultStatus(HardFaultStatus volatile& other)
324331
: whole{other.whole} {}
325332
/// @brief The bit field for the Hard Fault Status Register
@@ -344,10 +351,13 @@ struct SystemControlBlock final {
344351

345352
/// The Debug Fault Register (DFR)
346353
struct DebugFaultStatus final {
354+
/// Default constructor - initializes to zero
347355
DebugFaultStatus()
348356
: whole{0} {}
357+
/// Copy constructor from another instance
349358
DebugFaultStatus(DebugFaultStatus const& other)
350359
: whole{other.whole} {}
360+
/// Copy constructor from volatile register
351361
DebugFaultStatus(DebugFaultStatus volatile& other)
352362
: whole{other.whole} {}
353363
/// @brief The bit field for the Debug Fault Register
@@ -373,7 +383,7 @@ struct SystemControlBlock final {
373383

374384
/// The Memory Management Fault Address Register (MMFAR)
375385
struct MemoryManagementFaultAddress final {
376-
std::uintptr_t address;
386+
std::uintptr_t address; ///< Address that caused the MemManage fault
377387
};
378388
#if defined(__arm__)
379389
static_assert(sizeof(MemoryManagementFaultAddress) == sizeof(std::uint32_t), "Must be exactly this size");
@@ -389,10 +399,13 @@ struct SystemControlBlock final {
389399

390400
/// The Co Processor Access Control Register
391401
struct CoProcessorAccessControl final {
402+
/// Default constructor - initializes to zero
392403
CoProcessorAccessControl()
393404
: whole{0} {}
405+
/// Copy constructor from another instance
394406
CoProcessorAccessControl(CoProcessorAccessControl const& other)
395407
: whole{other.whole} {}
408+
/// Copy constructor from volatile register
396409
CoProcessorAccessControl(CoProcessorAccessControl volatile& other)
397410
: whole{other.whole} {}
398411
/// @brief The access values for the register

modules/cortex/include/cortex/peripherals/SystemTick.hpp

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,43 @@ struct SystemTick final {
1515
/// @brief System Timer Control and Status Register
1616
/// @details Controls the SysTick timer operation and reports its status
1717
struct ControlStatus final {
18+
/// Default constructor - initializes to zero
1819
ControlStatus()
1920
: whole{0} {}
21+
/// Copy constructor from another instance
2022
ControlStatus(ControlStatus const& other)
2123
: whole{other.whole} {}
24+
/// Copy constructor from volatile register
2225
ControlStatus(ControlStatus volatile& other)
2326
: whole{other.whole} {}
2427
/// @brief Bit field layout for the Control and Status register
2528
struct Fields final {
26-
std::uint32_t enable : 1U;
27-
std::uint32_t interrupt : 1U;
28-
std::uint32_t use_processor_clock : 1U;
29+
std::uint32_t enable : 1U; ///< Enable SysTick counter
30+
std::uint32_t interrupt : 1U; ///< Enable SysTick interrupt
31+
std::uint32_t use_processor_clock : 1U; ///< Use processor clock (vs external reference)
2932
std::uint32_t : 13U; ///< Reserved field
30-
std::uint32_t counted_down : 1U;
33+
std::uint32_t counted_down : 1U; ///< Counter counted to zero since last read
3134
std::uint32_t : 15U; ///< Reserved field
3235
};
3336
union {
3437
Fields bits;
3538
std::uint32_t whole;
3639
};
40+
/// Assignment from copy back to volatile registers
3741
void operator=(ControlStatus const& other) volatile { whole = other.whole; }
42+
/// Copy from volatile register to local copy
3843
void operator=(ControlStatus volatile& other) { whole = other.whole; }
3944
};
4045
/// @brief System Timer Reload Value Register
4146
/// @details Specifies the reload value for the SysTick counter
4247
struct Reload final {
48+
/// Default constructor - initializes to zero
4349
Reload()
4450
: whole{0} {}
51+
/// Copy constructor from another instance
4552
Reload(Reload const& other)
4653
: whole{other.whole} {}
54+
/// Copy constructor from volatile register
4755
Reload(Reload volatile& other)
4856
: whole{other.whole} {}
4957
/// @brief Bit field layout for the Reload register
@@ -55,37 +63,44 @@ struct SystemTick final {
5563
Fields bits;
5664
std::uint32_t whole;
5765
};
66+
/// Assignment from copy back to volatile registers
5867
void operator=(Reload const& other) volatile { whole = other.whole; }
68+
/// Copy from volatile register to local copy
5969
void operator=(Reload volatile& other) { whole = other.whole; }
6070
};
6171
/// The Calibration Registers
6272
struct Calibration final {
73+
/// Default constructor - initializes to zero
6374
Calibration()
6475
: whole{0} {}
76+
/// Copy constructor from another instance
6577
Calibration(Calibration const& other)
6678
: whole{other.whole} {}
79+
/// Copy constructor from volatile register
6780
Calibration(Calibration volatile& other)
6881
: whole{other.whole} {}
6982
/// @brief Bit field layout for the Calibration register
7083
struct Fields final {
7184
std::uint32_t ten_millisecond_count : 24U; ///< The number of reference clocks per 10ms
7285
std::uint32_t : 6U; ///< Reserved field
73-
std::uint32_t skew : 1U; ///< Indicates if the
74-
std::uint32_t no_reference : 1U;
86+
std::uint32_t skew : 1U; ///< Indicates if the calibration value is inexact
87+
std::uint32_t no_reference : 1U; ///< No reference clock provided
7588
};
7689
union {
7790
Fields bits;
7891
std::uint32_t whole;
7992
};
93+
/// Assignment from copy back to volatile registers
8094
void operator=(Calibration const& other) volatile { whole = other.whole; }
95+
/// Copy from volatile register to local copy
8196
void operator=(Calibration volatile& other) { whole = other.whole; }
8297
};
8398

8499
// ===================================
85-
ControlStatus control_status;
86-
Reload reload;
87-
std::uint32_t current; ///< The current countdown value. If written to it will clear it.
88-
Calibration calibration;
100+
ControlStatus control_status; ///< Control and status register
101+
Reload reload; ///< Reload value register
102+
std::uint32_t current; ///< The current countdown value. If written to it will clear it.
103+
Calibration calibration; ///< Calibration value register
89104
// ===================================
90105
};
91106
static_assert(offsetof(SystemTick, current) == 0x08, "Must be at this offset");

modules/cortex/include/cortex/peripherals/TightlyCoupledMemory.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@ namespace peripherals {
1111
/// @details Represents the TCM configuration register in ARM Cortex-M processors.
1212
/// TCM provides low-latency memory directly coupled to the processor for performance-critical code and data.
1313
struct TightlyCoupledMemory final {
14+
/// Default constructor - initializes to zero
1415
TightlyCoupledMemory()
1516
: whole{0} {}
17+
/// Copy constructor from another instance
1618
TightlyCoupledMemory(TightlyCoupledMemory const& other)
1719
: whole{other.whole} {}
20+
/// Copy constructor from volatile register
1821
TightlyCoupledMemory(TightlyCoupledMemory volatile& other)
1922
: whole{other.whole} {}
2023
/// @brief Bit field layout for the TCM control register

modules/cortex/include/cortex/registers.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ struct ProgramStatus final {
4545
std::uint32_t top : 2U; //!< Top ICI/IT Bits
4646
std::uint32_t : 5U; ///< Reserved field
4747

48+
/// Gets the combined ICI/IT state value
49+
/// @return The 8-bit ICI/IT state (top 2 bits | bottom 6 bits)
4850
inline std::uint32_t get(void) const {
4951
std::uint32_t tmp = static_cast<uint32_t>(top << 6U);
5052
tmp |= bottom;
@@ -57,12 +59,12 @@ struct ProgramStatus final {
5759
struct Masks final {
5860
/// The Priority Mask Register (PRIMASK)
5961
struct Priority final {
60-
std::uint32_t mask : 1;
62+
std::uint32_t mask : 1; ///< Disable all interrupts except NMI and HardFault
6163
std::uint32_t : 31; ///< Reserved field
6264
};
6365
/// The Fault Mask Register (FAULTMASK)
6466
struct Fault final {
65-
std::uint32_t mask : 1;
67+
std::uint32_t mask : 1; ///< Disable all interrupts except NMI
6668
std::uint32_t : 31; ///< Reserved field
6769
};
6870
/// The Base Priority Mask Register (BASEPRI)

modules/cortex/include/cortex/semihosting.hpp

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,74 +44,72 @@ enum class Mode : std::uint32_t {
4444
AppendPlusBinary = 11,
4545
};
4646

47-
/// Checks if the debugger is connected.
47+
/// @brief Checks if the debugger is connected.
4848
bool IsConnected(void);
4949

50-
/// Opens a file and returns a handle.
50+
/// @brief Opens a file and returns a handle.
5151
/// @param name The span of the name of the file to open.
5252
/// @param mode The mode to open the file in.
5353
Handle Open(core::Span<char const> name, Mode mode);
5454

55-
/// Closes a file.
55+
/// @brief Closes a file.
5656
/// @param handle The handle of the file to close.
5757
/// @return 0 on success, -1 on error.
5858
Result Close(Handle handle);
5959

60-
/// Writes data to a file.
60+
/// @brief Writes data to a file.
6161
/// @param handle The handle of the file to write to.
62-
/// @param buffer The data to write.
63-
/// @param len The length of the data to write.
62+
/// @param buffer The span over the buffer to write from
6463
/// @return The number of bytes written, or -1 on error.
6564
Result Write(Handle handle, core::Span<char const> buffer);
6665

67-
/// Writes a single character to a file
66+
/// @brief Writes a single character to a file
6867
/// @param c The character to write.
6968
void Write(char c);
7069

71-
/// Writes a string to a file.
70+
/// @brief Writes a string to a file.
7271
/// @param string The string to write.
7372
void Write(const char string[]);
7473

75-
/// Reads data from a file.
74+
/// @brief Reads data from a file.
7675
/// @param handle The handle of the file to read from.
77-
/// @param buffer The buffer to read the data into.
78-
/// @param len The length of the data to read.
76+
/// @param buffer The span over the buffer to read the data into
7977
/// @return The number of bytes read, or -1 on error.
8078
Result Read(Handle handle, core::Span<char> buffer);
8179

82-
/// Reads a character from a file.
80+
/// @brief Reads a character from a file.
8381
char Read(void);
8482

85-
/// Checks if a value is an error.
83+
/// @brief Checks if a value is an error.
8684
/// @return True if the value is an error, false otherwise.
8785
bool IsError(int32_t value);
8886

89-
/// Checks if a file handle is a TTY.
87+
/// @brief Checks if a file handle is a TTY.
9088
/// @param handle The handle of the file to check.
9189
/// @return True if the file is a TTY, false otherwise.
9290
bool IsTTY(int handle);
9391

94-
/// Seeks to a position in a file.
92+
/// @brief Seeks to a position in a file.
9593
/// @param handle The handle of the file to seek in.
9694
/// @param position The position to seek to.
9795
/// @return The new position on success, or -1 on error.
9896
Result Seek(Handle handle, uint32_t position);
9997

100-
/// Gets the length of a file.
98+
/// @brief Gets the length of a file.
10199
/// @param handle The handle of the file to get the length of.
102100
/// @return The length of the file, or -1 on error.
103101
int32_t Length(Handle handle);
104102

105-
/// Gets A temporary name for a file.
106-
/// @param name[out] The location to store the name of the file
103+
/// @brief Gets A temporary name for a file.
104+
/// @param name The location to store the name of the file
107105
/// @param id The ID of the temporary file.
108106
Result TempName(core::Span<char const> name, uint32_t id);
109107

110-
/// Removes a file from the Host File System
108+
/// @brief Removes a file from the Host File System
111109
/// @param name The span of the name of the file to remove
112110
Result Remove(core::Span<char const> name);
113111

114-
/// Renames a file on the Host File System
112+
/// @brief Renames a file on the Host File System
115113
/// @param old_file The span of the current file name
116114
/// @param new_file The span of the new file name
117115
/// @return 0 on success, -1 on error
@@ -136,10 +134,10 @@ uint32_t GetCommandLine(core::Span<char> buffer);
136134

137135
/// @brief Information about the heap and stack blocks
138136
struct BlockInfo {
139-
uint32_t heap_base;
140-
uint32_t heap_limit;
141-
uint32_t stack_base;
142-
uint32_t stack_limit;
137+
uint32_t heap_base; ///< Base address of heap
138+
uint32_t heap_limit; ///< Limit address of heap
139+
uint32_t stack_base; ///< Base address of stack
140+
uint32_t stack_limit; ///< Limit address of stack
143141
};
144142

145143
/// @param[out] info The block information to fill in

0 commit comments

Comments
 (0)