[rtems commit] bsp/mpc55xx: Add e200z7 specific idle task

Joel Sherrill joel.sherrill at OARcorp.com
Fri Sep 28 15:23:47 UTC 2012


On 09/28/2012 10:07 AM, Sebastian Huber wrote:
> On 09/28/2012 04:57 PM, Joel Sherrill wrote:
>> On 9/28/2012 9:47 AM, Sebastian Huber wrote:
>>> Module:    rtems
>>> Branch:    master
>>> Commit:    b762488ef5cd1fe18b620dd960dcbab9587aefe9
>>> Changeset:
>>> http://git.rtems.org/rtems/commit/?id=b762488ef5cd1fe18b620dd960dcbab9587aefe9
>>>
>>> Author:    Sebastian Huber<sebastian.huber at embedded-brains.de>
>>> Date:      Fri Sep 28 16:02:28 2012 +0200
>>>
>>> bsp/mpc55xx: Add e200z7 specific idle task
>>>
>>> ---
>>>
>>>    c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h |   13 +++++++++++++
>>>    1 files changed, 13 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
>>> b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
>>> index b486820..e1b1405 100644
>>> --- a/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
>>> +++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/include/bsp.h
>>> @@ -74,6 +74,19 @@ rtems_status_code bsp_register_i2c(void);
>>>    void bsp_restart(void *addr);
>>> +#if MPC55XX_CHIP_TYPE / 10 == 567
>> Could you put parentheses around the "MPC55XX_CHIP_TYPE / 10"
>> portion?
> The operator precedence of "/" and "==" should be well known.
Yes but the parentheses emphasize that.
>> And could you add a comment block explaining this?  Or even better what
>> does 567 mean? Should that be a constant?
> If you work with these chips it should be clear.  You can derive certain
> features from the chip type.
>
I could also write this sentence in hexadecimal for the ASCII letters
but it wouldn't be as clear.

Just because something is "well known" doesn't mean using constants
to define the possible set of values and assign meaning to them has no
value. RTEMS is about readability and functionality.


-- 
Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985





More information about the devel mailing list