Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.sys.raspberry-pi    |    Raspberry Pi computers & related hardwar    |    26,127 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 25,417 of 26,127    |
|    Andy Burns to The Natural Philosopher    |
|    Re: Fscking Pointers.    |
|    26 Mar 25 20:08:42    |
      From: usenet@andyburns.uk              The Natural Philosopher wrote:              > It seems C has caught the disease of 'we will modify your code according       > to what WE think it means'..       >       > ..my pointers to 254 byte structures are going haywire when I add 256       > bytes to them...I have to add one instead...              if C knows the thing being pointed to is a 254 byte struct, then adding       256 to it will move it by 65024 bytes surely?                     adding 1, will move it by 254 bytes.                     > ..add that to the fact that to write to flash RAM you need to specify       > the *offset* from flash RAM base, but to read it you need to use the       > actual hardware address...              are you casting pointers?              > sigh.       >       > What is the generic type for a simple pointer to presumably bytes, in       > ARM C?              traditionally char*              > Or should I resign myself to doing everything in 256byte chunks? the       > structure to be read and written from Flash is exactly that big for       > obvious hardware reasons...              --- SoupGate-DOS v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca