From 34c92626a1e2dcd320f84be545f71ca59fc39808 Mon Sep 17 00:00:00 2001 From: dario Date: Sun, 20 Aug 2023 17:55:40 +0200 Subject: [PATCH] Last clean-up; removed config.hpp --- include/sta/bus/i2c/device.hpp | 6 +++--- include/sta/bus/i2c/i2c.hpp | 5 +++-- include/sta/bus/uart/settings.hpp | 2 -- include/sta/bus/uart/uart.hpp | 4 ++++ include/sta/config.hpp | 12 ------------ 5 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 include/sta/config.hpp diff --git a/include/sta/bus/i2c/device.hpp b/include/sta/bus/i2c/device.hpp index 5894b5b..ec6fb7b 100644 --- a/include/sta/bus/i2c/device.hpp +++ b/include/sta/bus/i2c/device.hpp @@ -26,9 +26,9 @@ namespace sta private: I2C * intf_; - int address_; /**< device address */ - int master_; - int blocking_; + int address_; /**< device address */ + int master_; /**< is the mcu the master? */ + int blocking_; /**< blocking or non-blocking transmits / receives */ }; } // namespace sta diff --git a/include/sta/bus/i2c/i2c.hpp b/include/sta/bus/i2c/i2c.hpp index e2e37c4..1af5571 100644 --- a/include/sta/bus/i2c/i2c.hpp +++ b/include/sta/bus/i2c/i2c.hpp @@ -24,8 +24,9 @@ namespace sta /** * @brief Specify the mode of communication via the bus. * - * @param master - * @param blocking + * @param address The peripheral's address to communicate with. + * @param master Whether the mcu is a master or slave. + * @param blocking Whether to use blocking or non-blocking transmits / receives. */ void setSettings(uint16_t address, bool master, bool blocking); diff --git a/include/sta/bus/uart/settings.hpp b/include/sta/bus/uart/settings.hpp index 390774c..c3bbe2b 100644 --- a/include/sta/bus/uart/settings.hpp +++ b/include/sta/bus/uart/settings.hpp @@ -5,8 +5,6 @@ namespace sta { - - enum class UARTMode { RX, diff --git a/include/sta/bus/uart/uart.hpp b/include/sta/bus/uart/uart.hpp index 21bff52..0460c3e 100644 --- a/include/sta/bus/uart/uart.hpp +++ b/include/sta/bus/uart/uart.hpp @@ -9,6 +9,10 @@ namespace sta class UART : public Interface { public: + /** + * @param settings %UART bus settings + * @param mutex Mutex object for managing shared access. Pass nullptr for no access control + */ UART(UARTSettings & settings, Mutex * mutex=nullptr); /** diff --git a/include/sta/config.hpp b/include/sta/config.hpp deleted file mode 100644 index 725478f..0000000 --- a/include/sta/config.hpp +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef STA_CONFIG_HPP -#define STA_CONFIG_HPP - -// #include -#include - -#define STA_DEBUGGING_ENABLED -#define STA_PRINTF_USE_STDLIB - -// #define STA_ASSERT_FORCE - -#endif // STA_CONFIG_HPP