equal
deleted
inserted
replaced
441 echo "!!! ERROR !!! Please set PCAN_LIB PCAN_HEADER [PCAN_INCLUDE] to appropriate paths ! " |
441 echo "!!! ERROR !!! Please set PCAN_LIB PCAN_HEADER [PCAN_INCLUDE] to appropriate paths ! " |
442 fi |
442 fi |
443 SUB_CAN_DLL_CFLAGS=$SUB_CAN_DLL_CFLAGS\ -liberty\ \'$PCAN_LIB\' |
443 SUB_CAN_DLL_CFLAGS=$SUB_CAN_DLL_CFLAGS\ -liberty\ \'$PCAN_LIB\' |
444 echo "Converting PcanLib header files for gcc -> $PW32DIR/cancfg.h" |
444 echo "Converting PcanLib header files for gcc -> $PW32DIR/cancfg.h" |
445 cat $PW32DIR/cancfg.h.head $PCAN_INCLUDE/$PCAN_HEADER > $PW32DIR/cancfg.h |
445 cat $PW32DIR/cancfg.h.head $PCAN_INCLUDE/$PCAN_HEADER > $PW32DIR/cancfg.h |
|
446 echo >> $PW32DIR/cancfg.h |
446 # second port handling |
447 # second port handling |
447 if [ "$PCAN2_HEADER" != "" ]; then |
448 if [ "$PCAN2_HEADER" != "" ]; then |
448 echo "Stripping down second Pcan Light header " |
449 echo "Stripping down second Pcan Light header " |
449 echo >> $PW32DIR/cancfg.h |
450 echo >> $PW32DIR/cancfg.h |
450 echo "// Stripped PcanLight header to prevent typedef conflicts ">> $PW32DIR/cancfg.h |
451 echo "// Stripped PcanLight header to prevent typedef conflicts ">> $PW32DIR/cancfg.h |
455 fi |
456 fi |
456 if grep -q CANHwType $PW32DIR/cancfg.h ; then |
457 if grep -q CANHwType $PW32DIR/cancfg.h ; then |
457 echo "Peak Init HwType, IO_Port and IRQ will be passed in environment :" |
458 echo "Peak Init HwType, IO_Port and IRQ will be passed in environment :" |
458 echo " PCANHwType PCANIO_Port PCANInterupt" |
459 echo " PCANHwType PCANIO_Port PCANInterupt" |
459 echo '#define extra_PCAN_init_params' >> $PW32DIR/cancfg.h |
460 echo '#define extra_PCAN_init_params' >> $PW32DIR/cancfg.h |
|
461 fi |
|
462 if ! grep -q CAN_Init $PW32DIR/cancfg.h ; then |
|
463 echo "Pcan Light header/lib is for second port of device only" |
|
464 echo "CAN_* calls redefined to CAN2_* " |
|
465 echo '#define CAN_Init CAN2_Init' >> $PW32DIR/cancfg.h |
|
466 echo '#define CAN_Read CAN2_Read' >> $PW32DIR/cancfg.h |
|
467 echo '#define CAN_Write CAN2_Write' >> $PW32DIR/cancfg.h |
|
468 echo '#define CAN_Close CAN2_Close' >> $PW32DIR/cancfg.h |
460 fi |
469 fi |
461 cat $PW32DIR/cancfg.h.tail >> $PW32DIR/cancfg.h |
470 cat $PW32DIR/cancfg.h.tail >> $PW32DIR/cancfg.h |
462 fi |
471 fi |
463 |
472 |
464 if [ "$SUB_CAN_DRIVER" = "none" ]; then |
473 if [ "$SUB_CAN_DRIVER" = "none" ]; then |