source: test2.git/Hardware.h

Last change on this file was b6aa0ba, checked in by andib <andi.b@…>, 2 years ago

test with more files

  • Property mode set to 100644
File size: 3.5 KB
RevLine 
[b6aa0ba]1/*******************************************************************************
2MODULE : Hardware.h
3DESCRIPTION :
4
520101117 AB Initial
620180808 AB Adapted to CAN-Tester
7*******************************************************************************/
8
9// --- Includes ---------------------------------------------------------------
10
11// --- Pin Definitions --------------------------------------------------------
12
13// --- Defines ----------------------------------------------------------------
14//#define HW_MASTER 1 // set only for Master
15#undef HW_MASTER // without defined code works for master and slave
16 // on-the-fly switching by DIP-switches (CAN-Tester)
17
18#ifdef HW_MASTER
19 #define HW_DESCRIPTION "CAN-Mas" // description text, usually no more than 8 chars
20 #define HW_MAC_ADDRESS 0x50A0 // default hardware MAC address if not defined in NVM
21 #define HW_PRIORITY_CLASS 1 // prefered priority class
22#else
23 #define HW_SLAVE 1 // set only for Slaves
24
25 #define HW_DESCRIPTION "CAN-Slv" // description text, usually no more than 8 chars
26 #define HW_MAC_ADDRESS 0xA0A0 // default hardware MAC address if not defined in NVM
27 #define HW_PRIORITY_CLASS 16 // prefered priority class
28#endif //HW_MASTER
29
30#define HW_NUM_PRIORITY_GROUPS 32 // number of priority groups
31#define HW_NUM_SLAVES_PER_GROUP 16
32
33#define HW_LEN_DESC 0 //8
34#define HW_LEN_DESC_SHORT 0 //4
35#define HW_LEN_DESC_LONG 0 //64 // lengt of description strings without trailing '/0'
36
37#define HW_ADDR_NOT_DEFINED 0x200 // beyond top most address
38#define HW_FIRST_SLAVE_ADDR 0x10 // first valid slave address for USV_BatteryMonitor & CAN-Tester
39
40#define HW_EEPROM_24AA08 // type of EEPROM
41//#define HW_EEPROM_24LC256
42
43// --- Typedefs ---------------------------------------------------------------
44
45// --- PUBLIC Variables -------------------------------------------------------
46
47// --- Variables --------------------------------------------------------------
48
49// --- Macros -----------------------------------------------------------------
50
51// --- Functionprototypes -----------------------------------------------------
52void HwPreInit(void);
53void HwInit(void);
54void HwInit1(void);
55int HwGetMacAddr(void);
56void HwSetMacAddr(int);
57char *HwGetDescriptionShort(void);
58char *HwGetDescription(void);
59char *HwGetDescriptionLong(void);
60void HwSetDescriptionShort(char *);
61void HwSetDescription(char *);
62void HwSetDescriptionLong(char *);
63
64int HwGetIsAB(void);
65int HwGetType(void);
66int HwGetVersion(void);
67int HwGetRevision(void);
68int HwGetIssue(void);
69int HwGetBooterType(void);
70int HwGetBooterVersion(void);
71int HwGetBooterRevision(void);
72int HwGetBooterIssue(void);
73int HwGetAppType(void);
74int HwGetAppVersion(void);
75int HwGetAppRevision(void);
76int HwGetAppIssue(void);
77
78int HwGetPriorityClass (void);
79void HwSetPriorityClass (int);
80void HwTraceInfo(void);
81void HwTraceVoltages(void);
82void HwTicker500ms(void);
83void HwLoggingToggle(void);
84void HwLogging(BOOL flag);
85void HwSetCorrectionVolt(int);
86void HwSetCorrectionCurrentGain(int);
87void HwSetCorrectionCurrentZero(void);
88int HwGetLineVoltage(void);
89int HwGetVcap(void);
90int HwGetEnergy(void);
91int HwGetCurrent(void);
92void HwTraceCorrection(void);
93void HwPcmPower(BOOL bState);
94int HwGetPcmCurrent(void);
95void HwStartFastStart(BOOL bState);
96void HwSyncAddrToDIP(void);
97
98;
99void _delay_us( int us );
100
101
Note: See TracBrowser for help on using the repository browser.