This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Help with CDL - controlling the RTC_PERIOD value
- From: Sergei Gavrikov <sergei dot gavrikov at gmail dot com>
- To: Elad Yosef <elad dot yosef at gmail dot com>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Tue, 11 Oct 2011 21:17:39 +0300 (FET)
- Subject: Re: [ECOS] Help with CDL - controlling the RTC_PERIOD value
- References: <CAOFa9c1h=otax7zxp5H3cDUZP_8DNS0EhB11JK75cO8+QK5SJg@mail.gmail.com>
On Tue, 11 Oct 2011, Elad Yosef wrote:
> Hi,
> I'm trying to overwrite the CYGNUM_HAL_RTC_PERIOD user value in-case
> another option is enabled.
>
> For example :
> if test_mode = on
> CYGNUM_HAL_RTC_PERIOD = value from ecc file
> else
> CYGNUM_HAL_RTC_PERIOD = hard coded value
>
> Thanks
>
> Elad
Hi Elad,
If I understood your question correctly then you can use the ternary
conditional operator A ? B : C in your CDL expression
http://ecos.sourceware.org/docs-latest/cdl-guide/language.values.html#LANGUAGE.EXPRESSION
However, your target is CDL option CYGNUM_HAL_RTC_PERIOD. So, be careful
when you change its value as for some targets if the period needs to be
changed, and the clock's resolution needs to be adjusted accordingly
http://ecos.sourceware.org/docs-latest/ref/hal-clocks-and-timers.html
HTH
Sergei
> --
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss