[avr-gcc-list] How to initialize an array of struct?

2013-12-14 Thread dfx
Hi, After spending more than one day to create an array of struct I have come to this code: struct Lamp { uint8_t highAddress [9] ; uint8_t lowAddress [9] ; uint8_t onoff ; uint8_t active ; uint8_t power; uint8_t brightness ; uint8_t temperatures ; uint8_t faultCount ; } ; stru

Re: [avr-gcc-list] How to initialize an array of struct?

2013-12-14 Thread Tobias Seiler
Try it like this #include struct Lamp { uint8_t highAddress [10] ; uint8_t lowAddress [10] ; uint8_t onoff ; uint8_t active ; uint8_t power; uint8_t brightness ; uint8_t temperatures ; uint8_t faultCount ; } ; struct Lamp lamps[] = {{" 0013A200 ", " 4094500D " , 0 , 1 , 0 , 0,

[avr-gcc-list] How to initialize an array of struct?

2013-12-14 Thread dfx
Hi, After spending more than one day to create an array of struct I have come to this code: struct Lamp { uint8_t highAddress [9] ; uint8_t lowAddress [9] ; uint8_t onoff ; uint8_t active ; uint8_t power; uint8_t brightness ; uint8_t temperatures ; uint8_t faultCount ;

Re: [avr-gcc-list] How to initialize an array of struct?

2013-12-14 Thread Russell Shaw
On 15/12/13 17:20, dfx wrote: Hi, After spending more than one day to create an array of struct I have come to this code: struct Lamp { uint8_t highAddress [9] ; uint8_t lowAddress [9] ; uint8_t onoff ; uint8_t active ; uint8_t power; uint8_t brightness ; uint8_t t

Re: [avr-gcc-list] How to initialize an array of struct?

2013-12-14 Thread Russell Shaw
On 15/12/13 17:20, dfx wrote: Hi, After spending more than one day to create an array of struct I have come to this code: struct Lamp { uint8_t highAddress [9] ; uint8_t lowAddress [9] ; uint8_t onoff ; uint8_t active ; uint8_t power; uint8_t brightness ; uint8_t t