Subversion Repositories svn.mios32

Rev

Rev 1643 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1643 Rev 1960
Line 1... Line 1...
1
// $Id: mios32_ain.h 1643 2013-01-04 18:49:10Z tk $
1
// $Id: mios32_ain.h 1960 2014-02-09 20:21:24Z tk $
2
/*
2
/*
3
 * Header file for AIN Driver
3
 * Header file for AIN Driver
4
 *
4
 *
5
 * ==========================================================================
5
 * ==========================================================================
6
 *
6
 *
Line 32... Line 32...
32
//   mask 0x0f00 will enable all J5C channels
32
//   mask 0x0f00 will enable all J5C channels
33
//   mask 0x0fff will enable all J5A/B/C channels
33
//   mask 0x0fff will enable all J5A/B/C channels
34
// (all channels are disabled by default)
34
// (all channels are disabled by default)
35
#ifndef MIOS32_AIN_CHANNEL_MASK
35
#ifndef MIOS32_AIN_CHANNEL_MASK
36
#define MIOS32_AIN_CHANNEL_MASK 0
36
#define MIOS32_AIN_CHANNEL_MASK 0
-
 
37
#endif
-
 
38
-
 
39
-
 
40
//! Normally the ADC channels are converted each mS from the programming
-
 
41
//! model (main.c) - optionally this can be skipped with
-
 
42
//! #define MIOS32_DONT_SERVICE_AIN 1 in mios32_config.h
-
 
43
//! 
-
 
44
//! In this case, the MIOS32_AIN_StartConversions() function has to be called
-
 
45
//! periodically from the application (e.g. from a timer), and conversion values
-
 
46
//! can be retrieved with MIOS32_AIN_PinGet()
-
 
47
#ifndef MIOS32_DONT_SERVICE_AIN
-
 
48
#define MIOS32_DONT_SERVICE_AIN 0
37
#endif
49
#endif
38
50
39
51
40
// define the desired oversampling rate (1..16)
52
// define the desired oversampling rate (1..16)
41
#ifndef MIOS32_AIN_OVERSAMPLING_RATE
53
#ifndef MIOS32_AIN_OVERSAMPLING_RATE
Line 119... Line 131...
119
131
120
extern s32 MIOS32_AIN_DeadbandGet(void);
132
extern s32 MIOS32_AIN_DeadbandGet(void);
121
extern s32 MIOS32_AIN_DeadbandSet(u16 deadband);
133
extern s32 MIOS32_AIN_DeadbandSet(u16 deadband);
122
134
123
extern s32 MIOS32_AIN_Handler(void *callback);
135
extern s32 MIOS32_AIN_Handler(void *callback);
-
 
136
-
 
137
extern s32 MIOS32_AIN_StartConversions(void);
124
138
125
139
126
/////////////////////////////////////////////////////////////////////////////
140
/////////////////////////////////////////////////////////////////////////////
127
// Export global variables
141
// Export global variables
128
/////////////////////////////////////////////////////////////////////////////
142
/////////////////////////////////////////////////////////////////////////////