This is a piece of code
epwm_info->EPwm_CMPB_Direction == EPWM_CMP_UP
What does '->' mean here?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
epwm_info is probably a pointer to a structure. When accessing a field in structure when you are doing it from a _pointer_, you use the (->) instead of a (.)
For example
typedef struct
{
int a, b;
} My_struct_type;
My_struct_type a_struct;
My_struct_type *a_struct_pointer = &a_struct;
a_struct.a = 1;
a_struct_pointer->b = 2;
samir hazra said:What does '->' mean here?
Exactly the same as it means anywhere else!
This is basic textbook stuff - nothing specifically to do with TI or the C2000: '->' is the 'C' operator for accessing a stucture element from a pointer.
Here are some 'C' learning & reference resources: http://blog.antronics.co.uk/2010/12/12/things-you-shouldve-learned-in-c-class-0-introduction/
A portaion of C-code is..
struct ADCTRL1_BITS { // bits description
Uint16 rsvd1:4; // 3:0 reserved
Uint16 SEQ_CASC:1; // 4 Cascaded sequencer mode
Uint16 SEQ_OVRD:1; // 5 Sequencer override
Uint16 CONT_RUN:1; // 6 Continuous run
What is the meaning of declaration ..... Uint16 rsvd1:4?? does it assign 4 to rsvd1?
I know this is a trivial question but i am not an expert in C. so bear with me for this silly question...
Sam12 said:I know this is a trivial question but i am not an expert in C.
So you really need to be looking into your 'C' textbooks!
You already have a list of 'C' reference and learning resources: http://blog.antronics.co.uk/2010/12/12/things-you-shouldve-learned-in-c-class-0-introduction/
Sam12 said:so bear with me for this silly question
People aren't going to continue answering your basic questions forever - you need to put in the study & effort to learn the 'C' language if you're going to use it...