Performed some doxygen updates

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@423 05563f52-14a8-4384-a975-3d1654cca0fa
This commit is contained in:
mmi
2018-01-12 12:59:03 +00:00
parent ed3b53ce32
commit 7f42b00161
4 changed files with 168 additions and 150 deletions

View File

@@ -23,7 +23,7 @@
/** /**
* ADCDevice implementation * ADCDevice implementation
* \defgroup ADCDevice Package ADCDevice * \defgroup ADCDevice ADCDevice
* \ingroup HAL * \ingroup HAL
* @{ * @{
*/ */
@@ -41,6 +41,7 @@
struct ADCDevice; struct ADCDevice;
typedef uint32_t (*ADCReadFunction)(const struct ADCDevice* self); typedef uint32_t (*ADCReadFunction)(const struct ADCDevice* self);
/** /**
@@ -59,41 +60,36 @@ struct ADCDevice
// Function declarations // Function declarations
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** ADCDevice_construct /** ADCDevice_construct
* \brief Constructor for a new ADC device * \brief Constructor for a new ADC device *
*
* This is a detailed description of the function * This is a detailed description of the function
* *
* Created by: mmi
* \memberof ADCDevice * \memberof ADCDevice
* *
* \param self ADC object * \param self ADC object
* \param[in] read Pointer to read function * \param[in] read Pointer to read function
* \param[in] resolutionsInBits The resolution of this ADC device in * \param[in] resolutionsInBits The resolution of this ADC device in
* number of bits * number of bits
*
* \return ErrorStatus SUCCESS if construction was successful * \return ErrorStatus SUCCESS if construction was successful
* ERROR otherwise * ERROR otherwise
* *
* \todo * \todo
*
*/ */
extern ErrorStatus ADCDevice_construct(struct ADCDevice* self, ADCReadFunction read, unsigned int resolutionInBits); extern ErrorStatus ADCDevice_construct(struct ADCDevice* self, ADCReadFunction read, unsigned int resolutionInBits);
/** ADCDevice_destruct /** ADCDevice_destruct
* \brief Destructor for ADC device * \brief Destructor for ADC device
*
* This is a detailed description of the function * This is a detailed description of the function
* *
*Created by: mmi
* \memberof ADCDevice * \memberof ADCDevice
* *
* \param self ADC object * \param self ADC object
*
* \return void * \return void
* *
* \todo * \todo
*
*/ */
extern void ADCDevice_destruct(struct ADCDevice* self); extern void ADCDevice_destruct(struct ADCDevice* self);
@@ -101,14 +97,13 @@ extern void ADCDevice_destruct(struct ADCDevice* self);
* \brief Reads a value from the ADC device input * \brief Reads a value from the ADC device input
* This is a detailed description of the function * This is a detailed description of the function
* *
* Created by: mmi
* \memberof ADCDevice * \memberof ADCDevice
* *
* \param self ADC object * \param self ADC object
*
* \return uint32_t The current value read from the ADC * \return uint32_t The current value read from the ADC
* *
* \todo * \todo
*
*/ */
extern uint32_t ADCDevice_read(const struct ADCDevice* self); extern uint32_t ADCDevice_read(const struct ADCDevice* self);

View File

@@ -1,6 +1,6 @@
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/// @file Buzzer.h /// \file Buzzer.h
/// @brief File description /// \brief File description
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Micro-Key bv // Micro-Key bv
// Industrieweg 28, 9804 TG Noordhorn // Industrieweg 28, 9804 TG Noordhorn
@@ -17,16 +17,15 @@
// (c) 2015 Micro-Key bv // (c) 2015 Micro-Key bv
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/**
* Buzzer implementation
* \defgroup Buzzer Package Buzzer
* \ingroup HAL
* @{
*/
#ifndef INC_BUZZER_H_ #ifndef INC_BUZZER_H_
#define INC_BUZZER_H_ #define INC_BUZZER_H_
/**
* Buzzer implementation
* \defgroup Buzzer Buzzer
* \ingroup HAL
* @{
*/
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Include files // Include files
@@ -62,102 +61,110 @@
// Type definitions. // Type definitions.
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/**
* \ingroup Buzzer
* \class Buzzer
* The Buzzer struct that can be used as an object
*/
struct Buzzer struct Buzzer
{ {
// General // General
bool initialized; bool initialized; //!< Flag indicating initialisation status
struct Gpio* gpio; struct Gpio* gpio; //!< The GPIO to use for the buzzer
// Functionary properties // Functionary properties
unsigned int pulseWidth; unsigned int pulseWidth; //!< Pulsewidth of the buzzer tone
// Task properties // Task properties
bool runTask; bool runTask; //!< keep-alive flag for buzzer task
bool runPeriodically; bool runPeriodically; //!< Indicates single or periodical run
SemaphoreHandle_t semaphore; SemaphoreHandle_t semaphore; //!< Task semaphore for synchronisation
xTaskHandle taskHandle; xTaskHandle taskHandle; //!< FreeRTOS task handle
int taskPriority; int taskPriority; //!< FreeRTOS task priority
uint16_t stackSize; uint16_t stackSize; //!< FreeRTOS task stacksize
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Function declarations // Function declarations
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** ---------------------------------------------------------------------------- /** Buzzer_construct
* Buzzer_construct * \brief Constructor for a new buzzer instance
* Constructor for a new buzzer instance
* *
* @param self The buzzer object that gets created * This function creates a new buzzer object
* @param gpio The GPIO to use
* @param taskPriority FreeRTOS task priority
* @param stackSize FreeRTOS stack size
* *
* @return ErrorStatus SUCCESS if constructor was successful, * Created by: mmi
* \memberof Buzzer
*
* \param self The buzzer object that gets created
* \param[in] gpio The GPIO to use
* \param[in] taskPriority FreeRTOS task priority
* \param[in] stackSize FreeRTOS stack size
* \return ErrorStatus SUCCESS if constructor was successful,
* including generation/start of task * including generation/start of task
* ERROR otherwise * ERROR otherwise
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
extern ErrorStatus Buzzer_construct(struct Buzzer* self, struct Gpio* gpio, int taskPriority, uint16_t stackSize); extern ErrorStatus Buzzer_construct(struct Buzzer* self, struct Gpio* gpio, int taskPriority, uint16_t stackSize);
/** ---------------------------------------------------------------------------- /** Buzzer_destruct
* Buzzer_destruct
* Destructor for buzzer instance. Also removes the buzzer task * Destructor for buzzer instance. Also removes the buzzer task
* *
* @param self The buzzer instance to destruct * Created by: mmi
* \memberof Buzzer
* *
* @return void * \param self The buzzer instance to destruct
* \return void
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
extern void Buzzer_destruct(struct Buzzer* self); extern void Buzzer_destruct(struct Buzzer* self);
/** ---------------------------------------------------------------------------- /** Buzzer_start
* Buzzer_start * \brief Starts the buzzer with a repeating tone.
* Starts the buzzer with a repeating tone.
* Tone length is given with argument pulseWidth * Tone length is given with argument pulseWidth
* *
* @param self The buzzer instance to use * Created by: mmi
* @param pulseWidth The length of the tone in ms. Also defines * \memberof Buzzer
*
* \param self The buzzer instance to use
* \param[in] pulseWidth The length of the tone in ms. Also defines
* the length of the pause between two * the length of the pause between two
* tones * tones
* *
* @return void * \return void
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
extern void Buzzer_start(struct Buzzer* self, unsigned int pulseWidth); extern void Buzzer_start(struct Buzzer* self, unsigned int pulseWidth);
/** ---------------------------------------------------------------------------- /** Buzzer_stop
* Buzzer_stop * \brief Stops the repeating buzzer tone
* Stops the repeating buzzer tone
* *
* @param self THe buzzer instance to stop * Created by: mmi
* \memberof Buzzer
* *
* @return void * \param self The buzzer instance to stop *
* \return void
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
extern void Buzzer_stop(struct Buzzer* self); extern void Buzzer_stop(struct Buzzer* self);
/** ---------------------------------------------------------------------------- /** Buzzer_singleTone
* Buzzer_singleTone
* Creates a single tone with the length given in pulseWidth * Creates a single tone with the length given in pulseWidth
* *
* @param self The buzzer instance to use * Created by: mmi
* @param pulseWidth The length of the tone in ms * \memberof Buzzer
* *
* @return void * \param self The buzzer instance to use
* \param[in] pulseWidth The length of the tone in ms
* \return void
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
extern void Buzzer_singleTone(struct Buzzer* self, unsigned int pulseWidth); extern void Buzzer_singleTone(struct Buzzer* self, unsigned int pulseWidth);

View File

@@ -1,6 +1,6 @@
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/// @file CachedStorage.h /// \file CachedStorage.h
/// @brief Generic memory cache /// \brief Generic memory cache
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Micro-Key bv // Micro-Key bv
// Industrieweg 28, 9804 TG Noordhorn // Industrieweg 28, 9804 TG Noordhorn
@@ -17,16 +17,16 @@
// (c) 2017 Micro-Key bv // (c) 2017 Micro-Key bv
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#ifndef _CACHEDEEPROM_H_
#define _CACHEDEEPROM_H_
/** /**
* CachedStorage implementation * CachedStorage implementation
* \defgroup CachedStorage Package CachedStorage * \defgroup CachedStorage CachedStorage
* \ingroup HAL * \ingroup HAL
* @{ * @{
*/ */
#ifndef _CACHEDEEPROM_H_
#define _CACHEDEEPROM_H_
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Include files // Include files
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@@ -49,16 +49,28 @@
// Type definitions. // Type definitions.
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/**
* \ingroup CachedStorage
* \class CachedStorage
* The CachedStorage struct that can be used as an object
*/
struct CachedStorage struct CachedStorage
{ {
bool initialized; bool initialized; //!< Flag indicating initialisation status
unsigned int pageNumber; unsigned int pageNumber; //!< The pageNumber of the memory section on
size_t cacheSize; //!< which the cache is located.
bool dirty; //!< This is usually for FLASH or EEPROM
struct MemoryDevice* memoryDevice; //!< devices and required for PAGE-ERASE
uint32_t* storage; //!< functionality. Can be set to any random
uint32_t* tempBuffer; //!< value if PAGE-ERASE is not necessary
size_t cacheSize; //!< The size of the cache in bytes
bool dirty; //!< Marker that cache has been updated
struct MemoryDevice* memoryDevice; //!< The memory device on which this cache
//!< is located
uint32_t* storage; //!< Pointer to the cache that is written to
//!< read from
uint32_t* tempBuffer; //!< Pointer to a temporary buffer for
//!< comparison
}; };
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@@ -66,134 +78,139 @@ struct CachedStorage
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/** ---------------------------------------------------------------------------- /** CachedStorage_construct
* CachedStorage_construct * \briefConstructor for a new cached storage instance
* Constructor for a new cached storage instance
* Function makes use of MALLOC * Function makes use of MALLOC
* *
* @param self The cache instance * Created by: mmi
* @param memoryDevice The memory device to use on which the * \memberof CachedStorage
*
* \param self The cache instance
* \param[in] memoryDevice The memory device to use on which the
* cache is located * cache is located
* @param pageNumber The pageNumber of the memory section on * \param[in] pageNumber The pageNumber of the memory section on
* which the cache is located. * which the cache is located.
* This is usually for FLASH or EEPROM * This is usually for FLASH or EEPROM
* devices and required for PAGE-ERASE * devices and required for PAGE-ERASE
* functionality. Can be set to any random * functionality. Can be set to any random
* value if PAGE-ERASE is not necessary * value if PAGE-ERASE is not necessary
* @param cacheSize The size of the cache. * \param[in] cacheSize The size of the cache.
* This value is 32bit oriented and * This value is 32bit oriented and
* NOT BYTE-WISE. * NOT BYTE-WISE.
* The memory allocation will internally * The memory allocation will internally
* re-calculate to bytes * re-calculate to bytes
* * \return ErrorStatus SUCCESS if constructor was successful
* @return ErrorStatus SUCCESS if constructor was successful
* ERROR otherwise * ERROR otherwise
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
ErrorStatus CachedStorage_construct(struct CachedStorage* self, struct MemoryDevice* memoryDevice, unsigned int pageNumber, size_t cacheSize); ErrorStatus CachedStorage_construct(struct CachedStorage* self, struct MemoryDevice* memoryDevice, unsigned int pageNumber, size_t cacheSize);
/** ---------------------------------------------------------------------------- /** CachedStorage_destruct
* CachedStorage_destruct * \brief Destructor for a cached storage instance
* Destructor for a cached storage instance
* Function makes use of FREE * Function makes use of FREE
* *
* @param self The cache instance to destruct * Created by: mmi
* \memberof CachedStorage
* *
* @return void * \param self The cache instance to destruct
* \return void
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
void CachedStorage_destruct(struct CachedStorage* self); void CachedStorage_destruct(struct CachedStorage* self);
/** ---------------------------------------------------------------------------- /** CachedStorage_writeWord
* CachedStorage_writeWord * \brief Function to write a word (32bit) to cache
* Function to write a word (32bit) to cache
* *
* @param self The cache instance * Created by: mmi
* @param offset Offset within the cache to put the data * \memberof CachedStorage
* @param value The value/data to write
* *
* @return void * \param self The cache instance
* \param[in] offset Offset within the cache to put the data
* \param[in] value The value/data to write
* \return void
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
void CachedStorage_writeWord(struct CachedStorage* self, int offset, uint32_t value); void CachedStorage_writeWord(struct CachedStorage* self, int offset, uint32_t value);
/** ---------------------------------------------------------------------------- /** CachedStorage_writeBlob
* CachedStorage_writeBlob * \brief Function to write a blob.
*
* Function to write a blob (any given format/amount of data) to cache; hence * Function to write a blob (any given format/amount of data) to cache; hence
* the void pointer. * the void pointer. The function verifies cache boundaries using the offset and
* The function verifies cache boundaries using the offset and blob size * blob size blobsize is 32bit oriented, NOT BYTE
* blobsize is 32bit oriented, NOT BYTE
* *
* @param self The cache instance * Created by: mmi
* @param offset Offset within the cache to put the data * \memberof CachedStorage
* @param blob Void pointer to the data to be written *
* @param blobSize sizeof the blob structure. Give in 32bit, * \param self The cache instance
* \param offset Offset within the cache to put the data
* \param blob Void pointer to the data to be written
* \param blobSize sizeof the blob structure. Give in 32bit,
* NOT IN BYTES * NOT IN BYTES
* \return void
* *
* @return void * \todo
*
* @todo
* -----------------------------------------------------------------------------
*/ */
void CachedStorage_writeBlob(struct CachedStorage* self, int offset, const void* blob, size_t blobSize); void CachedStorage_writeBlob(struct CachedStorage* self, int offset, const void* blob, size_t blobSize);
/** ---------------------------------------------------------------------------- /** CachedStorage_readWord
* CachedStorage_readWord * \brief Function to read a word (32bit) from cache
* Function to read a word (32bit) from cache
* *
* @param self The cache instance * Created by: mmi
* @param offset Offset within the cache to put the data * \memberof CachedStorage
* *
* @return uint32_t The read data * \param self The cache instance
* \param[in] offset Offset within the cache to put the data
* *
* @todo * \return uint32_t The read data
* ----------------------------------------------------------------------------- *
* \todo
*/ */
uint32_t CachedStorage_readWord(struct CachedStorage* self, int offset); uint32_t CachedStorage_readWord(struct CachedStorage* self, int offset);
/** ---------------------------------------------------------------------------- /** CachedStorage_readBlob
* CachedStorage_readBlob * \brief Function to read a blob
*
* Function to read a blob (any given format/amount of data) from cache; hence * Function to read a blob (any given format/amount of data) from cache; hence
* the void pointer. * the void pointer.
* The function verifies cache boundaries using the offset * The function verifies cache boundaries using the offset
* *
* @param self The cache instance * Created by: mmi
* @param offset Offset within the cache to put the data * \memberof CachedStorage
* *
* @return void* Void pointer to the blob structure * \param self The cache instance
* \param[in] offset Offset within the cache to put the data *
* \return void* Void pointer to the blob structure
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
const void* CachedStorage_readBlob(struct CachedStorage* self, int offset); const void* CachedStorage_readBlob(struct CachedStorage* self, int offset);
/** ---------------------------------------------------------------------------- /** CachedStorage_commit
* CachedStorage_commit * \brief Function that puts the data from cache to the memory device.
* Function that puts the data from cache to the memory device. *
* This function will verify that the content of the cache is actually different * This function will verify that the content of the cache is actually different
* from the conent of the memory location. If data is equal, not write action * from the conent of the memory location. If data is equal, not write action
* will be performed * will be performed
* In case of memory that needs PAGE-ERASE prior to write, the erase function * In case of memory that needs PAGE-ERASE prior to write, the erase function
* will be called automatically. * will be called automatically.
* *
* @param self The cache instance * Created by: mmi
* \memberof CachedStorage
* *
* @return void * \param self The cache instance
* \return void
* *
* @todo * \todo
* -----------------------------------------------------------------------------
*/ */
void CachedStorage_commit(struct CachedStorage* self); void CachedStorage_commit(struct CachedStorage* self);

View File

@@ -17,16 +17,15 @@
// (c) 2015 Micro-Key bv // (c) 2015 Micro-Key bv
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
/**
* CoverSolenoid implementation
* \defgroup CoverSolenoid Package CoverSolenoid
* \ingroup HAL
* @{
*/
#ifndef SOLENOID_H_ #ifndef SOLENOID_H_
#define SOLENOID_H_ #define SOLENOID_H_
/**
* CoverSolenoid implementation
* \defgroup CoverSolenoid CoverSolenoid
* \ingroup HAL
* @{
*/
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Include files // Include files