Updated: Doxygen Documentation

This commit is contained in:
@CarlWachter
2024-01-06 17:17:40 +01:00
committed by CarlWachter
parent b3ed26e288
commit 16b9e6135c
26 changed files with 331 additions and 306 deletions

View File

@@ -18,9 +18,13 @@ namespace sta
class CanPendingRxFifos
{
public:
/// @brief Value type.
using value_type = uint8_t;
/// @brief Pointer to value type.
using reference = value_type &;
/// @brief Const pointer to value type.
using const_reference = const value_type &;
/// @brief Size of type.
using size_type = uint8_t;
/**
@@ -29,21 +33,42 @@ namespace sta
class const_iterator
{
public:
/// @brief Value type.
using value_type = CanPendingRxFifos::value_type;
/// @brief Const pointer to value type.
using reference = const_reference;
/// @brief Pointer to value type.
using pointer = const value_type *;
public:
/// @brief Default constructor.
const_iterator(const const_iterator & iter);
/// @brief Copies the contents of the given iterator.
/// @param iter Iterator to be copied.
const_iterator & operator=(const const_iterator & iter);
/**
* @brief Compare iterators by flags, index and end index.
*/
bool operator==(const const_iterator & iter) const;
/**
* @brief Compare iterators by flags, index and end index.
*/
bool operator!=(const const_iterator & iter) const;
/**
* @brief Increment iterator to next pending RX queue.
*/
const_iterator & operator++();
/**
* @brief Increment iterator to next pending RX queue.
*/
const_iterator operator++(int);
/**
* @brief Dereference iterator at index.
*/
reference operator*() const;
private:
@@ -69,7 +94,13 @@ namespace sta
*/
CanPendingRxFifos(uint32_t rxFlags, uint8_t numFifos);
/**
* @brief Get iterator to first pending RX queue.
*/
const_iterator begin() const;
/**
* @brief Get iterator to end of RX queues.
*/
const_iterator end() const;
private:

View File

@@ -13,7 +13,6 @@ namespace sta
public:
/**
* @param intf %SPI hardware interface
* @param csPin Chip select pin
*/
Device(Interface * intf);

View File

@@ -16,7 +16,9 @@ namespace sta
public:
/**
* @param intf %I2C hardware interface
* @param csPin The peripheral's address.
* @param address Device address
* @param master Whether the mcu is a master or slave
* @param blocking Whether to use blocking or non-blocking transmits / receives
*/
I2CDevice(I2C * intf, int address, bool master=true, bool blocking=true);

View File

@@ -19,6 +19,11 @@ namespace sta
class I2C : public Interface
{
public:
/**
* @brief Construct a new %I2C object.
*
* @param mutex Mutex object for managing shared access. Pass nullptr for no access control.
*/
I2C(Mutex * mutex=nullptr);
/**
@@ -31,8 +36,11 @@ namespace sta
void setSettings(uint16_t address, bool master, bool blocking);
protected:
/// @brief The peripheral's address to communicate with.
uint16_t address_;
/// @brief Whether the mcu is a master or slave.
bool master_;
/// @brief Whether to use blocking or non-blocking transmits / receives.
bool blocking_;
};
} // namespace sta

View File

@@ -14,6 +14,9 @@ namespace sta
class Interface
{
public:
/**
* @param mutex Mutex object for managing shared access. Pass nullptr for no access control.
*/
Interface(Mutex * mutex);
/**

View File

@@ -3,8 +3,18 @@
#include <stdint.h>
/**
* @defgroup sta_core_uart UART
* @ingroup sta_core
* @brief UART interface.
*/
namespace sta
{
/**
* @brief UART modes of operation.
*/
enum class UARTMode
{
RX,
@@ -13,10 +23,11 @@ namespace sta
};
/**
* @brief %UART settings.
* @brief UART settings.
*/
struct UARTSettings
{
/// @brief Mode of operation.
UARTMode mode;
};
} // namespace sta

View File

@@ -6,6 +6,11 @@
namespace sta
{
/**
* @brief UART interface.
*
* @ingroup sta_core_uart
*/
class UART : public Interface
{
public: