Rev 1539 | Rev 1543 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1539 | Rev 1540 | ||
|---|---|---|---|
| Line 23... | Line 23... | ||
| 23 | void sns_inputAnalog_Init(void); |
23 | void sns_inputAnalog_Init(void); |
| 24 | void sns_inputAnalog_Process(void); |
24 | void sns_inputAnalog_Process(void); |
| 25 | void sns_inputAnalog_HandleMessage(StdCan_Msg_t *rxMsg); |
25 | void sns_inputAnalog_HandleMessage(StdCan_Msg_t *rxMsg); |
| 26 | void sns_inputAnalog_List(uint8_t ModuleSequenceNumber); |
26 | void sns_inputAnalog_List(uint8_t ModuleSequenceNumber); |
| 27 | 27 | ||
| - | 28 | struct sns_inputAnalog_Config{ |
|
| - | 29 | uint16_t LowTh; //Config, low level threshold voltage |
|
| - | 30 | uint16_t HighTh; //Config, high level threshold voltage |
|
| - | 31 | uint16_t Periodicity; //Config, periodicity |
|
| - | 32 | uint8_t Type; //Config, if sensor is of type periodic or digital input |
|
| - | 33 | uint8_t PullupEnable; //Config, if the pullup should be enabled |
|
| - | 34 | uint8_t RefEnable; //Config, if the reference to GND should be enabled |
|
| - | 35 | } sns_inputAnalog_Config[sns_inputAnalog_NUM_SUPPORTED]; |
|
| 28 | 36 | ||
| 29 | #ifdef sns_inputAnalog_USEEEPROM |
37 | #ifdef sns_inputAnalog_USEEEPROM |
| 30 | struct sns_inputAnalog_Data{ |
38 | struct sns_inputAnalog_Data{ |
| - | 39 | struct sns_inputAnalog_Config Config0; |
|
| - | 40 | #if sns_inputAnalog_NUM_SUPPORTED>=2 |
|
| 31 |
|
41 | struct sns_inputAnalog_Config Config1; |
| 32 |
|
42 | #endif |
| - | 43 | #if sns_inputAnalog_NUM_SUPPORTED>=3 |
|
| - | 44 | struct sns_inputAnalog_Config Config2; |
|
| - | 45 | #endif |
|
| - | 46 | #if sns_inputAnalog_NUM_SUPPORTED>=4 |
|
| - | 47 | struct sns_inputAnalog_Config Config3; |
|
| 33 |
|
48 | #endif |
| 34 | }; |
49 | }; |
| 35 | #endif |
50 | #endif |
| 36 | 51 | ||
| 37 | #define TRUE 1 |
52 | #define TRUE 1 |
| 38 | #define FALSE 0 |
53 | #define FALSE 0 |
| - | 54 | ||
| - | 55 | #define MAX(a,b) ((a)>(b) ? (a) : (b)) |
|
| - | 56 | #define MIN(a,b) ((a)<(b) ? (a) : (b)) |
|
| 39 | 57 | ||
| 40 | #endif // SNS_INPUTANALOG |
58 | #endif // SNS_INPUTANALOG |