Interesting. Perhaps something like
foreign import "volatile &periphBase" :: Ptr Word32
which will declare
extern volatile uint32_t periphBase in the file, then you would just
have a linker symbol periphBase at 0x4000000. (or just import a value
with zero and do pointer arithmetic like you do)
John
On Wed, Mar 6, 2013 at 6:05 AM, Kiwamu Okabe
Hi John.
On Wed, Mar 6, 2013 at 10:06 PM, John Meacham
wrote: What do you mean by raw memory? I don't think the volatile should be needed in general for C allocated variables, but perhaps you are writing to hardware registers?
Yes. I would like to write to hardware registers.
https://github.com/ajhc/demo-cortex-m3/blob/master/stbee-mini/hs_src/Main_si...
We can do real programming with pure Haskell code, if poke function is used.
Best regards, -- Kiwamu Okabe
_______________________________________________ jhc mailing list jhc@haskell.org http://www.haskell.org/mailman/listinfo/jhc