[ECOS] using struct
Andrew Lunn
andrew.lunn@ascom.ch
Fri Apr 27 03:18:00 GMT 2001
On Fri, Apr 27, 2001 at 02:51:42AM -0700, Carlos Camargo wrote:
> Can I use struct in ecos?
You can use all the standard C constructs.
> I tried to declare a struct inside a thread:
Your syntax is wrong for declaring a struct. In this case hola is the
name of the structure, not the name of the variable. You now need to
use the structure to declare the variable.
I would normally do something link...
struct hola_s {
int a;
};
struct hola_s hola;
This is a C question, not ecos, so you would be better asking
questions on a C mailing list.
Andrew
> static void stimulus( cyg_addrword_t data )
> {
> int i, j;
>
> struct hola{
> int a;
> };
>
> hola.a = 5; // This is 54 line.
> ..
> ..
> }
>
> }
More information about the Ecos-discuss
mailing list