Cleaned up Doxygen warnings in libraries/MySensors/drivers/AVR

This commit is contained in:
Patrick Fallberg
2016-01-19 23:56:26 +01:00
parent 44b52f10be
commit 5853cf5fe0
5 changed files with 76 additions and 0 deletions
@@ -41,8 +41,24 @@ class PinIO {
public:
/** Create a PinIO object with no assigned pin. */
PinIO() : bit_(0), mask_(0XFF) {}
/** Constructor
* @param[in] pin Pin assigned to this object.
*/
explicit PinIO(uint8_t pin);
/** Initialize pin bit mask and port address.
* @param[in] pin Arduino board pin number.
* @return true for success or false if invalid pin number.
*/
bool begin(uint8_t pin);
/** Configure the pin
*
* @param[in] mode Configure as output mode if true else input mode.
* @param[in] data For output mode set pin high if true else low.
* For input mode enable 20K pullup if true else Hi-Z.
*
* This function may be used with interrupts enabled or disabled.
* The previous interrupt state will be restored.
*/
void config(bool mode, bool data);
//----------------------------------------------------------------------------
/** @return Pin's level */
@@ -91,9 +91,45 @@ class I2cMasterBase {
*/
virtual void stop() = 0;
/**
* Start an I2C transfer with possible continuation.
*
* @param[in] addressRW I2C slave address plus R/W bit.
* The I2C slave address is in the high seven bits
* and is ORed with on of the following:
* - I2C_READ for a read transfer.
* - I2C_WRITE for a write transfer.
* .
* @param[in,out] buf Source or destination for transfer.
* @param[in] nbyte Number of bytes to transfer (may be zero).
* @param[in] option Option for ending the transfer, one of:
* - I2C_STOP end the transfer with an I2C stop
* condition.
* - I2C_REP_START end the transfer with an I2C
* repeated start condition.
* - I2C_CONTINUE allow additional transferContinue()
* calls.
* .
* @return true for success else false.
*/
bool transfer(uint8_t addressRW, void *buf,
size_t nbyte, uint8_t option = I2C_STOP);
/**
* Continue an I2C transfer.
*
* @param[in,out] buf Source or destination for transfer.
* @param[in] nbyte Number of bytes to transfer (may be zero).
* @param[in] option Option for ending the transfer, one of:
* - I2C_STOP end the transfer with an I2C stop
* condition.
* - I2C_REP_START end the transfer with an I2C
* repeated start condition.
* - I2C_CONTINUE allow additional transferContinue()
* calls.
* .
* @return true for success else false.
*/
bool transferContinue(void *buf, size_t nbyte, uint8_t option = I2C_STOP);
/** Write a byte
*
@@ -115,7 +151,21 @@ class I2cMasterBase {
class SoftI2cMaster : public I2cMasterBase {
public:
SoftI2cMaster() {}
/**
* Constructor, initialize SCL/SDA pins and set the bus high.
*
* @param[in] sdaPin The software SDA pin number.
*
* @param[in] sclPin The software SCL pin number.
*/
SoftI2cMaster(uint8_t sclPin, uint8_t sdaPin);
/**
* Initialize SCL/SDA pins and set the bus high.
*
* @param[in] sdaPin The software SDA pin number.
*
* @param[in] sclPin The software SCL pin number.
*/
void begin(uint8_t sclPin, uint8_t sdaPin);
uint8_t read(uint8_t last);
void start();
@@ -8,8 +8,11 @@
#define STATIC_ALWAYS_INLINE static inline __attribute__((always_inline))
//------------------------------------------------------------------------------
template<uint8_t ClkPin, uint8_t ConvPin, uint8_t DataPin>
/** ADS7818 class */
class ADS7818 {
public:
//----------------------------------------------------------------------------
/** Set pin modes and initial levels. */
void begin() {
fastPinMode(ClkPin, 1);
fastDigitalWrite(ClkPin, 0);
@@ -18,6 +21,9 @@ class ADS7818 {
fastPinMode(DataPin, 0);
}
//----------------------------------------------------------------------------
/** Read ADS7818 12-bit ADC
* \return 16-bit value read.
*/
inline __attribute__((always_inline))
uint16_t read() {
uint16_t v = 0;
@@ -3,6 +3,7 @@
#include <DigitalIO.h>
//==============================================================================
template<uint8_t CsPin, uint8_t ClkPin, uint8_t DoutPin, uint8_t UsecDelay = 0>
/** MCP3201 class */
class MCP3201 {
public:
//----------------------------------------------------------------------------
@@ -81,6 +82,7 @@ class MCP3201 {
//==============================================================================
template<uint8_t CsPin, uint8_t ClkPin,
uint8_t DoutPin, uint8_t DinPin, uint8_t UsecDelay = 0>
/** MCP3202 class */
class MCP3202 {
public:
//----------------------------------------------------------------------------
@@ -165,6 +167,7 @@ class MCP3202 {
//==============================================================================
template<uint8_t CsPin, uint8_t ClkPin,
uint8_t DoutPin, uint8_t DinPin, uint8_t UsecDelay = 0>
/** MCP3204 class */
class MCP3204 {
public:
//----------------------------------------------------------------------------
@@ -8,6 +8,7 @@ const int32_t MCP355X_ERR = 0X80000000;
const uint8_t MCP355X_TO_MS = 100;
//==============================================================================
template<uint8_t CsPin, uint8_t SckPin, uint8_t SdoPin>
/** MCP355X class */
class MCP355X {
public:
//----------------------------------------------------------------------------