Rev 15 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 15 | Rev 20 | ||
|---|---|---|---|
| Line 1... | Line 1... | ||
| 1 | // this file defines various constants |
1 | // this file defines various constants |
| 2 | 2 | ||
| - | 3 | #if !defined __INC_PLX_H |
|
| - | 4 | #define __INC_PLX_H |
|
| 3 | 5 | ||
| 4 | typedef enum { |
6 | typedef enum { |
| 5 | PLX_Start = 0x80, |
7 | PLX_Start = 0x80, |
| 6 | PLX_Stop = 0x40, |
8 | PLX_Stop = 0x40, |
| 7 | } PLX_Header; |
9 | } PLX_Header; |
| Line 45... | Line 47... | ||
| 45 | char ReadingH; |
47 | char ReadingH; |
| 46 | char ReadingL; |
48 | char ReadingL; |
| 47 | } PLX_SensorInfo; |
49 | } PLX_SensorInfo; |
| 48 | #pragma pack(pop) |
50 | #pragma pack(pop) |
| 49 | 51 | ||
| 50 | typedef struct |
- | |
| 51 | { |
- | |
| 52 | char name[8]; |
- | |
| 53 | int Units; // units to use in display (passed to PLX decoder ) |
- | |
| 54 | int Low; // low value to use on dial display |
- | |
| 55 | int High; // high value to use on dial display |
- | |
| 56 | int TickScale; // Scale values by this to give tick spacing |
- | |
| 57 | // so a dial with 0.. 1300 and TickScale=100 would display 14 major ticks on the dial face |
- | |
| 58 | int DP; // Number of decimal places to display |
- | |
| 59 | } PLX_DisplayInfo; |
- | |
| 60 | - | ||
| 61 | - | ||
| 62 | extern PLX_DisplayInfo DisplayInfo[]; |
- | |
| 63 | - | ||
| 64 | 52 | ||
| 65 | static inline int ConvPLX(char H, char L) |
53 | static inline int ConvPLX(char H, char L) |
| 66 | { |
54 | { |
| 67 | return ((H & 0x3F)<<6) | (L & 0x3F); |
55 | return ((H & 0x3F)<<6) | (L & 0x3F); |
| 68 | } |
56 | } |
| 69 | 57 | ||
| 70 | 58 | ||
| - | 59 | #endif |
|