English
Language : 

AN1105 Datasheet, PDF (64/100 Pages) STMicroelectronics – ST7 pCAN PERIPHERAL DRIVER
ST7 pCAN PERIPHERAL DRIVER
if ((SCIF_MASK & CANISR)!=0)
{
return ITSCIF;
}
#endif
#endif
if ((RECEPT_MASK & CANISR)!=0) //If not debug, priority is given to recept.,
then emission, then Status-Change/Wake-up condition//
{
return ITRECEPT;
}
else if ((TRANSMIT_MASK & CANISR)!=0) //If not, tests a transmit. IT
{
return ITTRANSMIT;
}
#ifndef DEBUG
/*In this case, this IT hasn’t been tested yet*/
#ifndef SATUS_CHANGE_NOTIFICATION
else if ((SCIF_MASK & CANISR)!=0)
{
return ITSCIF;
}
#endif
#endif
}
/*--------------------------------------------------------------------------
ROUTINE NAME : CAN_Init
INPUT/OUTPUT : Pointer on an init structure/Error status
DESCRIPTION : CAN cell internal registers initialization
COMMENTS : Called by CAN_Switch_On,CAN_First_Init
Not executed if RUN bit reset
Possible status returned : CAN_INIT_FAILURE
CAN_INIT_SUCCESS
--------------------------------------------------------------------------*/
CAN_Init_Error CAN_Init(Init_Data_Ptr data_ptr,CAN_Bool run_set,CAN_Bool
wkup_set)
{
if (!ValBit(CANCSR,RUN))
64/100