[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] PSTR() in static initialisers
From: |
Paul \"LeoNerd\" Evans |
Subject: |
Re: [avr-libc-dev] PSTR() in static initialisers |
Date: |
Wed, 31 Jan 2018 20:15:53 +0000 |
On Wed, 31 Jan 2018 21:04:55 +0100
Joerg Wunsch <address@hidden> wrote:
> As Paul "LeoNerd" Evans wrote:
>
> > Does anyone have a suggestion on how I can have a string pointer to
> > a flash-stored string in a static initialiser?
>
> This only works by allocating each of the string into a variable
> (well, constant actually) in flash by itself, and then mention their
> names in the struct initializer.
Hrm; that's upsettingly annoying. Is there perhaps a way this can be
convinced into working? I generally dislike the untidiness of having to
define lots of things above the main array definition, just so I can
pull them in by name into it, and use that name nowhere else. Inline
things would be nicer there.
--
Paul "LeoNerd" Evans
address@hidden | https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/
pgphhTn0ufCHC.pgp
Description: OpenPGP digital signature