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 <[email protected]> wrote: > Hi John. > > On Wed, Mar 6, 2013 at 10:06 PM, John Meacham <[email protected]> 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_simple_led.hs#L18 > > We can do real programming with pure Haskell code, > if poke function is used. > > Best regards, > -- > Kiwamu Okabe > > _______________________________________________ > jhc mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/jhc _______________________________________________ jhc mailing list [email protected] http://www.haskell.org/mailman/listinfo/jhc
