Code for GCC
void initCanHCS12 (void)
{
newline /Init the HCS12 microcontroler for CanOpen
12();

// Init the HCS12 driver
canBusInit bi0 = {

,
* no low power







*/

,
* no time stamp






&sstarf#star;/

,
* enable MSCAN







*/

,
* clock source : oscillator (In fact, it is not used)
*/

,
* no loop back







*/

,
* no listen only






*/

,
* no low pass filter for wk up */
_Baudrates[CAN_BAUDRATE_250K],


{


x00,
* Filter on 16 bits.








Motorola Block Guide V02.14 fig 4-3 */


x00, 0xFF, /* filter 0 hight accept all msg

&sstarf#star;/


x00, 0xFF, /* filter 0 low accept all msg


&sstarf#star;/


x00, 0xFF, /* filter 1 hight filter all of &sstarf#star;/


x00, 0xFF, /* filter 1 low filter all of
&sstarf#star;/


x00, 0xFF, /* filter 2 hight filter most of */


x00, 0xFF, /* filter 2 low filter most of
*/


x00, 0xFF, /* filter 3 hight filter most of */


x00, 0xFF, /* filter 3 low filter most of
*/


}

};

epimerde 2007-06-05