diff -r f45fd4cd3832 -r 34654679f262 doc/doxygen/html/candriver_8h-source.html --- a/doc/doxygen/html/candriver_8h-source.html Fri Jul 06 10:53:15 2007 +0200 +++ b/doc/doxygen/html/candriver_8h-source.html Mon Jul 16 08:56:03 2007 +0200 @@ -18,7 +18,7 @@
00001 /* 00002 This file is part of CanFestival, a library implementing CanOpen Stack. 00003 @@ -56,7 +56,7 @@ 00035 */ 00036 00037 /* Be free to change this value */ -00038 #define MAX_STACK_MSG_RCV 5 +00038 #define MAX_STACK_MSG_RCV 5 00039 00040 /* Number of incomings and outcomings CAN Line. The layer CanOpen must be 00041 used only for ONE line CAN. But you may used one or more CAN drivers, without @@ -64,35 +64,35 @@ 00043 Only 2 lines are implemented. If more lines are needed, copy void __attribute__((interrupt)) can0HdlRcv (void) to void __attribute__((interrupt)) canXHdlRcv (void) and make 00044 changes : [0] to [x], CAN0 to CANX, etc 00045 */ -00046 #define NB_LINE_CAN 1 +00046 #define NB_LINE_CAN 1 00047 00048 /* Whose hardware HCS12 CAN block is used for CanOpen ? Chose between CAN0, ..., CAN4 00049 If you use CANOPEN_LINE_NUMBER_USED = CANI, the value of NB_LINE_CAN must be 00050 more or equal to I + 1 00051 Value other than CAN0 not tested, but should work fine. 00052 */ -00053 #define CANOPEN_LINE_NUMBER_USED CAN0 +00053 #define CANOPEN_LINE_NUMBER_USED CAN0 00054 00055 /* Stack of received messages 00056 MSG received on CAN0 module is stored in stackMsgRcv[0], etc 00057 */ -00058 extern volatile Message stackMsgRcv[NB_LINE_CAN][MAX_STACK_MSG_RCV]; +00058 extern volatile Message stackMsgRcv[NB_LINE_CAN][MAX_STACK_MSG_RCV]; 00059 00060 00061 /* Copy from the stack of the message to treat */ -00062 extern Message msgRcv; +00062 extern Message msgRcv; 00063 00064 00065 /* To move on the stack of messages 00066 */ 00067 typedef struct { -00068 UNS8 w ; /* received */ -00069 UNS8 r ; /* To transmit */ +00068 UNS8 w ; /* received */ +00069 UNS8 r ; /* To transmit */ 00070 } t_pointerStack; 00071 00072 00073 /* Pointer for write or read a message in/from the reception stack */ -00074 extern volatile t_pointerStack ptrMsgRcv[NB_LINE_CAN]; +00074 extern volatile t_pointerStack ptrMsgRcv[NB_LINE_CAN]; 00075 00076 /* 00077 Parameters to define the clock system for the CAN bus @@ -118,35 +118,35 @@ 00097 }; 00098 */ 00099 typedef struct { -00100 UNS8 clksrc; /* use of internal clock or clock bus */ -00101 UNS8 brp; /* define the bus speed */ -00102 UNS8 sjw; /* Number of time quantum for synchro - 1 */ -00103 UNS8 samp; /* Number of sample per bit (1 or 3) */ -00104 UNS8 tseg2; /* Width of the time segment 2 (in tq) - 1 */ -00105 UNS8 tseg1; /* Width of the time segment 1 (in tq) - 1 */ +00100 UNS8 clksrc; /* use of internal clock or clock bus */ +00101 UNS8 brp; /* define the bus speed */ +00102 UNS8 sjw; /* Number of time quantum for synchro - 1 */ +00103 UNS8 samp; /* Number of sample per bit (1 or 3) */ +00104 UNS8 tseg2; /* Width of the time segment 2 (in tq) - 1 */ +00105 UNS8 tseg1; /* Width of the time segment 1 (in tq) - 1 */ 00106 } canBusTime; 00107 00108 /* 00109 Parameters to init the filters for received messages 00110 */ 00111 typedef struct { -00112 UNS8 idam; /* Put 0x01 for 16 bits acceptance filter */ -00113 UNS8 canidar0; -00114 UNS8 canidmr0; -00115 UNS8 canidar1; -00116 UNS8 canidmr1; -00117 UNS8 canidar2; -00118 UNS8 canidmr2; -00119 UNS8 canidar3; -00120 UNS8 canidmr3; -00121 UNS8 canidar4; -00122 UNS8 canidmr4; -00123 UNS8 canidar5; -00124 UNS8 canidmr5; -00125 UNS8 canidar6; -00126 UNS8 canidmr6; -00127 UNS8 canidar7; -00128 UNS8 canidmr7; +00112 UNS8 idam; /* Put 0x01 for 16 bits acceptance filter */ +00113 UNS8 canidar0; +00114 UNS8 canidmr0; +00115 UNS8 canidar1; +00116 UNS8 canidmr1; +00117 UNS8 canidar2; +00118 UNS8 canidmr2; +00119 UNS8 canidar3; +00120 UNS8 canidmr3; +00121 UNS8 canidar4; +00122 UNS8 canidmr4; +00123 UNS8 canidar5; +00124 UNS8 canidmr5; +00125 UNS8 canidar6; +00126 UNS8 canidmr6; +00127 UNS8 canidar7; +00128 UNS8 canidmr7; 00129 } canBusFilterInit; 00130 00131 /* @@ -172,21 +172,21 @@ 00151 */ 00152 00153 typedef struct { -00154 UNS8 cswai; /* Low power/normal in wait mode (1/0) */ -00155 UNS8 time; /* Timer for time-stamp enable/disable (1/0) */ -00156 UNS8 cane; /* Enable MSCAN (yes=1) Do it ! */ -00157 UNS8 clksrc; /* clock source bus/oscillator (1/0) */ -00158 UNS8 loopb; /* loop back mode for test (yes=1/no=0) */ -00159 UNS8 listen; /* MSCAN is listen only (yes=1/no=0 ie normal)*/ -00160 UNS8 wupm; /* low pas filter for wake up (yes=1/no=0) */ +00154 UNS8 cswai; /* Low power/normal in wait mode (1/0) */ +00155 UNS8 time; /* Timer for time-stamp enable/disable (1/0) */ +00156 UNS8 cane; /* Enable MSCAN (yes=1) Do it ! */ +00157 UNS8 clksrc; /* clock source bus/oscillator (1/0) */ +00158 UNS8 loopb; /* loop back mode for test (yes=1/no=0) */ +00159 UNS8 listen; /* MSCAN is listen only (yes=1/no=0 ie normal)*/ +00160 UNS8 wupm; /* low pas filter for wake up (yes=1/no=0) */ 00161 canBusTime -00162 clk; /* Values for clock system init */ +00162 clk; /* Values for clock system init */ 00163 canBusFilterInit -00164 fi; /* Values for filter acceptance msg init */ +00164 fi; /* Values for filter acceptance msg init */ 00165 00166 } canBusInit; 00167 -00168 extern canBusInit bi; +00168 extern canBusInit bi; 00169 00170 00171 @@ -204,16 +204,16 @@ 00183 nFilter : 0 to 3 00184 Must be in init mode before. 00185 */ -00186 char canAddIdToFilter ( -00187 UNS16 adrCAN, -00188 UNS8 nFilter, -00189 UNS16 id /* 11 bits, the 5 msb not used */ +00186 char canAddIdToFilter ( +00187 UNS16 adrCAN, +00188 UNS8 nFilter, +00189 UNS16 id /* 11 bits, the 5 msb not used */ 00190 ); 00191 00192 /* 00193 Use this function to change the CAN message acceptance filters and masks. 00194 */ -00195 char canChangeFilter (UNS16 adrCAN, canBusFilterInit fi); +00195 char canChangeFilter (UNS16 adrCAN, canBusFilterInit fi); 00196 00197 00198 /* @@ -221,8 +221,8 @@ 00200 Must be done only one time after a reset of the CPU. 00201 To do before any CAN initialisation 00202 */ -00203 char canEnable ( -00204 UNS16 adrCAN /* First address of MSCANx registers */ +00203 char canEnable ( +00204 UNS16 adrCAN /* First address of MSCANx registers */ 00205 ); 00206 00207 @@ -234,8 +234,8 @@ 00213 mscan is on sleep mode with wake up disabled. 00214 is not on init mode 00215 */ -00216 char canInit ( -00217 UNS16 adrCAN, /* First address of MSCANx registers */ +00216 char canInit ( +00217 UNS16 adrCAN, /* First address of MSCANx registers */ 00218 canBusInit 00219 bi /* All the parameters to init the bus */ 00220 ); @@ -245,8 +245,8 @@ 00224 Return 0 : OK 00225 1 : Not in sleep mode. Unable to init MSCAN 00226 */ -00227 char canInitClock ( -00228 UNS16 adrCAN, /* First address of MSCANx registers */ +00227 char canInitClock ( +00228 UNS16 adrCAN, /* First address of MSCANx registers */ 00229 canBusTime clk); 00230 00231 /* @@ -265,11 +265,11 @@ 00244 for example if nFilter = 2, hight byte of ar -> CANIDMR4 00245 low byte of ar -> CANIDMR5 00246 */ -00247 char canInit1Filter ( -00248 UNS16 adrCAN, -00249 UNS8 nFilter, -00250 UNS16 ar, -00251 UNS16 mr +00247 char canInit1Filter ( +00248 UNS16 adrCAN, +00249 UNS8 nFilter, +00250 UNS16 ar, +00251 UNS16 mr 00252 ); 00253 00254 /* @@ -279,16 +279,16 @@ 00258 1 : Not in init mode. Unable to init MSCAN 00259 */ 00260 -00261 char canInitFilter ( -00262 UNS16 adrCAN, /* First address of MSCANx registers */ +00261 char canInitFilter ( +00262 UNS16 adrCAN, /* First address of MSCANx registers */ 00263 canBusFilterInit fi); 00264 /* 00265 Put one of the 5 mscan in Init mode 00266 Loop until init mode is reached. 00267 */ 00268 -00269 char canInitMode ( -00270 UNS16 adrCAN /* First address of MSCANx registers */ +00269 char canInitMode ( +00270 UNS16 adrCAN /* First address of MSCANx registers */ 00271 ); 00272 00273 /* @@ -296,8 +296,8 @@ 00275 loop until init mode leaved. 00276 */ 00277 -00278 char canInitModeQ ( -00279 UNS16 adrCAN /* First address of MSCANx registers */ +00278 char canInitModeQ ( +00279 UNS16 adrCAN /* First address of MSCANx registers */ 00280 ); 00281 00282 @@ -308,15 +308,15 @@ 00287 other error : no buffer available to make the transmission 00288 */ 00289 -00290 char canMsgTransmit ( -00291 UNS16 adrCAN, /* First address of MSCANx registers */ +00290 char canMsgTransmit ( +00291 UNS16 adrCAN, /* First address of MSCANx registers */ 00292 Message msg /* Message to transmit */ 00293 ); 00294 00295 /* 00296 Set the interruptions. Must be call just after having left the init mode. 00297 */ -00298 char canSetInterrupt (UNS16 adrCAN); +00298 char canSetInterrupt (UNS16 adrCAN); 00299 00300 /* 00301 Put one of the 5 mscan in sleep mode @@ -329,8 +329,8 @@ 00308 Stay in this function until the sleep mode 00309 is reached. 00310 */ -00311 char canSleepMode ( -00312 UNS16 adrCAN /* First address of MSCANx registers */ +00311 char canSleepMode ( +00312 UNS16 adrCAN /* First address of MSCANx registers */ 00313 ); 00314 00315 /* @@ -339,8 +339,8 @@ 00318 return 0 : OK 00319 return 1 : error : in init mode 00320 */ -00321 char canSleepModeQ ( -00322 UNS16 adrCAN /* First address of MSCANx registers */ +00321 char canSleepModeQ ( +00322 UNS16 adrCAN /* First address of MSCANx registers */ 00323 ); 00324 00325 /* @@ -353,8 +353,8 @@ 00332 Loop until sleep mode reached. 00333 return 0 if 0K, other if error 00334 */ -00335 char canSleepWupMode ( -00336 UNS16 adrCAN /* First address of MSCANx registers */ +00335 char canSleepWupMode ( +00336 UNS16 adrCAN /* First address of MSCANx registers */ 00337 ); 00338 00339 /* @@ -363,8 +363,8 @@ 00342 0 -> Not in init mode 00343 other -> In init mode 00344 */ -00345 char canTestInitMode ( -00346 UNS16 adrCAN /* First address of MSCANx registers */ +00345 char canTestInitMode ( +00346 UNS16 adrCAN /* First address of MSCANx registers */ 00347 ); 00348 00349 /* @@ -373,15 +373,15 @@ 00352 0 -> Not in sleep mode 00353 other -> In sleep mode 00354 */ -00355 char canTestSleepMode ( -00356 UNS16 adrCAN /* First address of MSCANx registers */ +00355 char canTestSleepMode ( +00356 UNS16 adrCAN /* First address of MSCANx registers */ 00357 ); 00358 00359 00360 00361 #endif /*__CANDRIVER__*/ 00362 -