Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 2:dc4217ca1fff, committed 2014-01-28
- Comitter:
- MarioPoneder
- Date:
- Tue Jan 28 13:18:17 2014 +0000
- Parent:
- 1:00d6e45e037a
- Commit message:
- doc done
Changed in this revision
| AD7190.cpp | Show annotated file Show diff for this revision Revisions of this file |
| AD7190.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/AD7190.cpp Tue Jan 28 10:56:01 2014 +0000 +++ b/AD7190.cpp Tue Jan 28 13:18:17 2014 +0000 @@ -1,19 +1,7 @@ -/***************************************************************************//** - * @file AD7190.cpp - * @brief Implementation of the AD7190 driver. - * @author Mario Poneder - * @date 28/01/2013 - * - * This class is based on the implementation from Dan Nechita (Analog Devices). -*******************************************************************************/ - -/******************************************************************************/ -/***************************** Include Files **********************************/ -/******************************************************************************/ #include "AD7190.h" /***************************************************************************//** - * @brief Creates an instance of the AD7190 class. This library is designed + * @brief Creates an instance of the AD7190 class. This class is designed * for single slave operation. Therefore no chip-select pin is required. * * @param rdy RDY (DOUT/RDY) @@ -31,8 +19,7 @@ * @brief This interrupt routine gets called after every finished conversion * in continous read mode. It reads 4 bytes of data, the sample takes * 3 bytes and the status register 1 byte. - * Moreover the sample callback function, which has to to take the - * parameters 'data' and 'channel', gets called. + * Moreover the sample callback function gets called. * * @return None, because this is an interrupt routine. *******************************************************************************/ @@ -52,9 +39,9 @@ * @brief Starts the interrupt-driven sampling process and sets the AD7190's * continuous read mode flag. * - * @param sampleCallbackFunction Pointer to the sample callback function, - * which has to to take the parameters 'data' - * and 'channel'. + * @param sampleCallbackFunction Pointer to the sample callback function. + * Example prototype: + * @code void SampleCallback(unsigned long data, unsigned char channel); @endcode * * @return None. *******************************************************************************/
--- a/AD7190.h Tue Jan 28 10:56:01 2014 +0000
+++ b/AD7190.h Tue Jan 28 13:18:17 2014 +0000
@@ -1,18 +1,6 @@
-/***************************************************************************//**
- * @file AD7190.h
- * @brief Header of the AD7190 driver.
- * @author Mario Poneder
- * @date 28/01/2013
- *
- * This class is based on the implementation from Dan Nechita (Analog Devices).
-*******************************************************************************/
-
#ifndef __AD7190_H__
#define __AD7190_H__
-/******************************************************************************/
-/***************************** Include Files **********************************/
-/******************************************************************************/
#include "mbed.h"
/******************************************************************************/
@@ -118,13 +106,16 @@
#define GPOCON_P0DAT (1 << 0) // P0 state
/***************************************************************************//**
- * @brief Specifies the prototype of the sample callback function.
- * Example: void SampleCallback(unsigned long data, unsigned char channel);
+ * @brief Driver for the AD7190 (Ultralow Noise 24-Bit Sigma-Delta ADC).
+ * @author Mario Poneder
+ * @date 28/01/2014
+ *
+ * This class is based on the implementation from Dan Nechita (Analog Devices).
*******************************************************************************/
-typedef void (*pSampleCallback_t)(unsigned long, unsigned char);
-
class AD7190
{
+ typedef void (*pSampleCallback_t)(unsigned long, unsigned char);
+
private:
DigitalIn _rdy; // Ready input pin (DOUT/RDY)