Added Software projects

git-svn-id: file:///srv/dev-disk-by-uuid-17e88007-4d0c-45e0-8757-cacfcc458630/repositories/svn/Diplomarbeit@55 9fe90eed-be63-e94b-8204-d34ff4c2ff93
This commit is contained in:
Matthias
2008-12-23 10:34:08 +00:00
parent ee5a771818
commit 373a8c32b2
348 changed files with 86781 additions and 0 deletions
+90
View File
@@ -0,0 +1,90 @@
/* ---------------------------------------------------------------------------
* adc.h - v0.1 (c) 2007 Micro-key bv
* ---------------------------------------------------------------------------
* Micro-key bv
* Industrieweg 28, 9804 TG Noordhorn
* Postbus 92, 9800 AB Zuidhorn
* The Netherlands
* Tel: +31 594 503020
* Fax: +31 594 505825
* Email: support@microkey.nl
* Web: www.microkey.nl
* ---------------------------------------------------------------------------
* Description: Analog to digital signal interface.
* ---------------------------------------------------------------------------
* Version(s): 0.1, 10-09-2007, Marcel Mulder.
* Creation.
* ---------------------------------------------------------------------------
*/
#ifndef __ADC_H__
#define __ADC_H__
/** \file adc.h
\brief Analog to digital signal interface.
*/
/* ---------------------------------------------------------------------------
* System include files.
* ---------------------------------------------------------------------------
*/
#include "lpc23xx.h"
#include "types.h"
/* ---------------------------------------------------------------------------
* Application include files.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Constant and macro definitions.
* ---------------------------------------------------------------------------
*/
/** Maximum number of real analog channels*/
#define maxADC_Channels (8)
#define maxADC_VOLTAGE (10000)
#define maxADC_CURRENT (20000)
/* ---------------------------------------------------------------------------
* Type definitions.
* ---------------------------------------------------------------------------
*/
typedef enum
{
adcVOLTAGE, /**< Voltage mode 0 to 10V */
adcCURRENT /**< Current mode 0 to 20mA */
} t_adc_mode;
/* ---------------------------------------------------------------------------
* Variable declarations.
* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
* Function declarations.
* ---------------------------------------------------------------------------
*/
/** \brief Initialize ADC.*/
void adcInit (void);
// \MARK NEW PINSETTINGS FOR TESTER (2)
void adc_MuxEn (BOOLEAN mode);
BOOLEAN adc_MuxRB (void);
/** \brief Select input mode (Voltage or Current) of a certain channel. */
void adcMode (
UINT8 channel, /**< 0..7 = valid, 8..255 = future use */
t_adc_mode mode
);
/** \brief Read analog value in mV or uA depending on adcMode
\retval value VOLTAGE: 0..10000[mV], CURRENT: 0..20000[uA] */
UINT16 adcRead (
UINT8 device, /**< 0 = Self, 1..32 = Remote device */
UINT8 channel /**< 0..7 = valid, 8..255 = future use */
);
void adcModeAll (t_adc_mode mode);
#endif /* __ADC_H__ */