From: Gordon H. <gor...@dr...> - 2009-11-16 10:11:34
|
On Mon, 16 Nov 2009, Vaclav Peroutka wrote: > >> Noticed this when porting code from an AVR platform (using gcc-avr) - it's >> not drastically important, as I've just renamed 'data' in my code to >> something else which then compiles and works fine, but FYI... >> >> Thanks, >> >> Gordon >> > > Yes, it is used for data memory ( and "code" for code memory) in case > you use pointers, arrays etc. OK. That makes sense (and I already use __code to stuff other data in flash) > BTW: I personally prefer variable names which are more descriptive, for > example "char_to_send" or "rotation_angle". I never had any problem to > get confused (either compiler or myself). Sure - but in that case it was arbitary binary data pertinent to the function/file in question.. It was actually code to write 'data' to eeprom - as in: void eepromWrite (uint16_t addr, uint8_t data) ... s/data/value/ and it was fine. Gordon |