[jhc] [BUG] Poke should use volatile.
john at repetae.net
Wed Mar 6 15:17:51 CET 2013
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)
On Wed, Mar 6, 2013 at 6:05 AM, Kiwamu Okabe <kiwamu at gmail.com> wrote:
> Hi John.
> On Wed, Mar 6, 2013 at 10:06 PM, John Meacham <john at repetae.net> 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.
> We can do real programming with pure Haskell code,
> if poke function is used.
> Best regards,
> Kiwamu Okabe
> jhc mailing list
> jhc at haskell.org
More information about the jhc