Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Hi doubt in C programming

Not open for further replies.
When a pointer is used to reference a structure, the structure pointer operator (->) is used:

is the same as

**broken link removed**


My doubt got cleared, i was having doubt on that reference place

struct date {
int month, day, year;

struct date todays_date, *date_pointer; //
date_pointer = &todays_date; //

The link you given was nice, thanks

this is a simple case of configuring the ECAN bus in the code...

both lines a & b are used to Define ECAN Message Buffers.

statement a : it is about Configuring DMA Channel 0 for ECAN2 Transmit (Remote Transmit Request)
ecan2msgBuf __attribute__ is the syntax that has to be used to define or use any statement here...
ECAN2MSGBUF ecan2msgBuf __attribute__((space(dma),aligned(ECAN2_MSG_BUF_LE NGTH*16)));
means you are trying to configure the size of the CAN BUFFER MESSAGE LENGTH...... space dma refers to initializing the DMA space , and the length alloted if 4 bytes *16) you have to align the memory read and write when you use DMA....

typedef unsigned int ECAN1MSGBUF [ECAN1_MSG_BUF_LENGTH][8];

is declaration of ECAN1 message buffer length 4* 8 = 32 bytes you are allocating the memory and allocating DMA to read 32 locations....

Not open for further replies.

Part and Inventory Search

Welcome to