Merge pull request #2160 from PeterKietzmann/fix_srf_ultrasonic_doxy_warnings

doc: doxygen fix srf02/srf08 ultrasonic warnings
This commit is contained in:
Peter Kietzmann 2014-12-08 15:22:35 +01:00
commit cf87bc10df
2 changed files with 47 additions and 19 deletions

View File

@ -35,30 +35,36 @@
extern "C" {
#endif
/* define the SRF02 registers*/
/** @brief The sensors default I2C address */
#define SRF02_DEFAULT_ADDR 112
/** @brief The command register which defines measurement mode */
#define SRF02_COMMAND_REG 0x0
/** @brief The upper measurement byte */
#define SRF02_RANGE_HIGH_BYTE 0x2
/** @brief The lower measurement byte */
#define SRF02_RANGE_LOW_BYTE 0x3
/**
* @brief Device descriptor for SRF02 sensors
*/
typedef struct {
i2c_t i2c;
uint8_t addr;
i2c_t i2c; /**< I2C device the sensor is connected to */
uint8_t addr; /**< I2C bus address of the sensor */
} srf02_t;
/**
* @brief Possible measurement modes for the SRF02 sensor
*/
typedef enum {
SRF02_MODE_REAL_INCH = 0x50,
SRF02_MODE_REAL_CM = 0x51,
SRF02_REAL_RANGING_MODE_MICRO_SEC = 0x52,
SRF02_FAKE_RANGING_MODE_INCH = 0x56,
SRF02_FAKE_RANGING_MODE_CM = 0x57,
SRF02_FAKE_RANGING_MODE_MICRO_SEC = 0x58
SRF02_MODE_REAL_INCH = 0x50, /**< result in inches */
SRF02_MODE_REAL_CM = 0x51, /**< result in centimeters */
SRF02_REAL_RANGING_MODE_MICRO_SEC = 0x52, /**< result in microseconds */
SRF02_FAKE_RANGING_MODE_INCH = 0x56, /**< synchronous measurement in inches */
SRF02_FAKE_RANGING_MODE_CM = 0x57, /**< synchronous measurement in centimeters */
SRF02_FAKE_RANGING_MODE_MICRO_SEC = 0x58 /**< synchronous measurement in microseconds */
}srf02_mode_t;
/**

View File

@ -31,23 +31,45 @@
extern "C" {
#endif
/* define the SRF02 registers*/
/** @brief The sensors default I2C address */
#define SRF08_DEFAULT_ADDR 112
/** @brief The sensors command register (write) */
#define SRF08_COMMAND_REG 0x0
#define SRF08_RANGE_HIGH_BYTE 0x2
#define SRF08_RANGE_LOW_BYTE 0x3
#define SRF08_REAL_RANGING_MODE_CM 0x51
#define SRF08_RANGE_REG 0x2
/** @brief Max. gain register (write) */
#define SRF08_GAIN_REG 0x1
/** @brief The sensors range register (write) */
#define SRF08_RANGE_REG 0x2
/** @brief The upper measurement byte (read) */
#define SRF08_RANGE_HIGH_BYTE 0x2
/** @brief The lower measurement byte (read)*/
#define SRF08_RANGE_LOW_BYTE 0x3
/** @brief Measure in inch mode */
#define SRF08_REAL_RANGING_MODE_CM 0x50
/** @brief Measure in cm mode */
#define SRF08_REAL_RANGING_MODE_CM 0x51
/** @brief Measure in micro-seconds mode */
#define SRF08_REAL_RANGING_MODE_CM 0x52
/** @brief Number of highest register */
#define SRF08_MAX_REGISTER_NUMBER 35
/** @brief Maximum number of echos from more distant objects */
#define SRF08_MAX_ECHO_NUMBER 17
/* Define the used I2C Interface */
//#define I2C_INTERFACE I2C0 // P0.27 SDA0, P0.28 SCL0
//#define I2C_INTERFACE I2C1_0 // P0.0 SDA1, P0.1 SCL1
//#define I2C_INTERFACE I2C1_1 // P0.19 SDA1, P0.20 SCL1
#define SRF08_I2C_INTERFACE I2C2 // P0.10 SDA2, P0.11 SCL2
/** @brief Define the used I2C Interface */
#define SRF08_I2C_INTERFACE I2C2 /* P0.10 SDA2, P0.11 SCL2 */
/**