equal
deleted
inserted
replaced
22 |
22 |
23 /**************************************************************************/ |
23 /**************************************************************************/ |
24 /* Declaration of the value range types */ |
24 /* Declaration of the value range types */ |
25 /**************************************************************************/ |
25 /**************************************************************************/ |
26 |
26 |
|
27 #define valueRange_EMC 0x9F /* Type for index 0x1003 subindex 0x00 (only set of value 0 is possible) */ |
27 UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value) |
28 UNS32 TestMaster_valueRangeTest (UNS8 typeValue, void * value) |
28 { |
29 { |
29 switch (typeValue) { |
30 switch (typeValue) { |
|
31 case valueRange_EMC: |
|
32 if (*(UNS8*)value < (UNS8)0) return OD_VALUE_TOO_LOW; |
|
33 if (*(UNS8*)value > (UNS8)0) return OD_VALUE_TOO_HIGH; |
|
34 break; |
30 } |
35 } |
31 return 0; |
36 return 0; |
32 } |
37 } |
33 |
38 |
34 /**************************************************************************/ |
39 /**************************************************************************/ |
77 NULL, |
82 NULL, |
78 NULL, |
83 NULL, |
79 }; |
84 }; |
80 subindex TestMaster_Index1003[] = |
85 subindex TestMaster_Index1003[] = |
81 { |
86 { |
82 { RW, uint8, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1003 }, |
87 { RW, valueRange_EMC, sizeof (UNS8), (void*)&TestMaster_highestSubIndex_obj1003 }, |
83 { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1003[0] } |
88 { RO, uint32, sizeof (UNS32), (void*)&TestMaster_obj1003[0] } |
84 }; |
89 }; |
85 |
90 |
86 /* index 0x1005 : SYNC COB ID. */ |
91 /* index 0x1005 : SYNC COB ID. */ |
87 UNS32 TestMaster_obj1005 = 0x40000080; /* 1073741952 */ |
92 UNS32 TestMaster_obj1005 = 0x40000080; /* 1073741952 */ |