canfd_v1_0: Fix for compilation errors in canfd driver

This patch fixes the compilation errors in canfd
driver.

Signed-off-by: naga sureshkumar relli <nagasure@xilinx.com>
This commit is contained in:
naga sureshkumar relli 2015-04-21 17:34:54 +05:30 committed by Nava kishore Manne
parent 4b7afd3d4e
commit e21adc57a5
3 changed files with 15 additions and 15 deletions

View file

@ -82,7 +82,7 @@
* xparameters.h file. They are defined here such that a user can easily
* change all the needed parameters in one place.
*/
#define CAN_DEVICE_ID XPAR_CAN_0_DEVICE_ID
#define CANFD_DEVICE_ID XPAR_CANFD_0_DEVICE_ID
#define CAN_INTR_VEC_ID XPAR_INTC_0_CANFD_0_VEC_ID
#ifdef XPAR_INTC_0_DEVICE_ID
@ -142,7 +142,7 @@
/************************** Function Prototypes ******************************/
static int XCanIntrExample(u16 DeviceId);
static int XCanFdIntrExample(u16 DeviceId);
static void Config(XCanFd *InstancePtr);
void Create_CanFD_Frame();
static int SendFrame(XCanFd *InstancePtr);
@ -189,7 +189,7 @@ volatile static int SendDone;
int main()
{
/* Run the Can interrupt example */
if (XCanIntrExample(CAN_DEVICE_ID)) {
if (XCanFdIntrExample(CANFD_DEVICE_ID)) {
xil_printf("XCanFd Interrupt Mode example Failed\n\r");
return XST_FAILURE;
}
@ -212,7 +212,7 @@ int main()
* an infinite loop and will never return to the caller.
*
******************************************************************************/
static int XCanIntrExample(u16 DeviceId)
static int XCanFdIntrExample(u16 DeviceId)
{
int Status;
XCanFd *CanFdInstPtr = &CanFd;

View file

@ -68,7 +68,7 @@
* xparameters.h file. They are defined here such that a user can easily
* change all the needed parameters in one place.
*/
#define CAN_DEVICE_ID XPAR_CAN_0_DEVICE_ID
#define CANFD_DEVICE_ID XPAR_CANFD_0_DEVICE_ID
/* Maximum CAN frame length in Bytes */
#define XCANFD_MAX_FRAME_SIZE_IN_BYTES 72
@ -112,7 +112,7 @@
/************************** Function Prototypes ******************************/
int XCanPolledExample(u16 DeviceId);
int XCanFdPolledExample(u16 DeviceId);
static int SendFrame(XCanFd *InstancePtr);
static int RecvFrame(XCanFd *InstancePtr);
@ -152,7 +152,7 @@ int main(void)
* in xparameters.h .
*/
if (XCanPolledExample(CAN_DEVICE_ID)) {
if (XCanFdPolledExample(CANFD_DEVICE_ID)) {
xil_printf("XCanFd Polled Mode example Failed\n\r");
return XST_FAILURE;
}
@ -182,7 +182,7 @@ int main(void)
* loop and will never return to the caller.
*
******************************************************************************/
int XCanPolledExample(u16 DeviceId)
int XCanFdPolledExample(u16 DeviceId)
{
int Status;
XCanFd *CanFdInstPtr = &CanFd;

View file

@ -1156,7 +1156,7 @@ void XCanFd_AcceptFilterGet(XCanFd *InstancePtr, u32 FilterIndex,
{
Xil_AssertVoid(InstancePtr != NULL);
Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
Xil_Assertvoid(FilterIndex < XCANFD_NOOF_AFR);
Xil_AssertVoid(FilterIndex < XCANFD_NOOF_AFR);
*MaskValue = XCanFd_ReadReg(InstancePtr->CanFdConfig.BaseAddress,
XCANFD_AFMR_OFFSET(FilterIndex));
@ -1488,8 +1488,8 @@ void XCanFd_Enable_Tranceiver_Delay_Compensation(XCanFd *InstancePtr)
{
u32 RegValue = 0;
Xil_Assertvoid(InstancePtr != NULL);
Xil_Assertvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
Xil_AssertVoid(InstancePtr != NULL);
Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
RegValue = XCanFd_ReadReg(InstancePtr->CanFdConfig.BaseAddress,
XCANFD_F_BRPR_OFFSET);
@ -1520,8 +1520,8 @@ void XCanFd_Set_Tranceiver_Delay_Compensation(XCanFd *InstancePtr,
u32 RegValue=0;
Xil_Assertvoid(InstancePtr != NULL);
Xil_Assertvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
Xil_AssertVoid(InstancePtr != NULL);
Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
if (TdcOffset <= 32) {
@ -1553,8 +1553,8 @@ void XCanFd_Disable_Tranceiver_Delay_Compensation(XCanFd *InstancePtr)
{
u32 RegValue=0;
Xil_Assertvoid(InstancePtr != NULL);
Xil_Assertvoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
Xil_AssertVoid(InstancePtr != NULL);
Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
RegValue = XCanFd_ReadReg(InstancePtr->CanFdConfig.BaseAddress,
XCANFD_F_BRPR_OFFSET);