[rtems commit] Updated Legacy code in arm edb7312

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Jul 11 07:17:08 UTC 2013


On 07/10/2013 07:18 PM, Joel Sherrill wrote:
> Module:    rtems
> Branch:    master
> Commit:    893d66937a17c4bb9fb3b909cf884948b466a3b5
> Changeset: http://git.rtems.org/rtems/commit/?id=893d66937a17c4bb9fb3b909cf884948b466a3b5
>
> Author:    Vipul Nayyar <nayyar_vipul at yahoo.com>
> Date:      Wed Jul 10 09:52:28 2013 -0500
>
> Updated Legacy code in arm edb7312
>
> ---
>
>   c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c  |   49 ++++++++++--------------
>   c/src/lib/libbsp/arm/edb7312/network/network.c |   27 +++++++++----
>   2 files changed, 39 insertions(+), 37 deletions(-)
>
> diff --git a/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c b/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
> index bd77dd6..af0448f 100644
> --- a/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
> +++ b/c/src/lib/libbsp/arm/edb7312/clock/clockdrv.c
> @@ -12,24 +12,14 @@
>   #include <ep7312.h>
>   #include <bsp.h>
>   #include <bsp/irq.h>
> +#include <assert.h>
>
>   #if ON_SKYEYE==1
>     #define CLOCK_DRIVER_USE_FAST_IDLE
>   #endif
>
>   void Clock_isr(rtems_irq_hdl_param arg);

Here we still use rtems_irq_hdl_param which is a type of the legacy API.

> -static void clock_isr_on(const rtems_irq_connect_data *unused);
> -static void clock_isr_off(const rtems_irq_connect_data *unused);
> -static int clock_isr_is_on(const rtems_irq_connect_data *irq);
> -
> -rtems_irq_connect_data clock_isr_data = {
> -  .name   = BSP_TC1OI,
> -  .hdl    = Clock_isr,
> -  .handle = NULL,
> -  .on     = clock_isr_on,
> -  .off    = clock_isr_off,
> -  .isOn   = clock_isr_is_on,
> -};
> +uint32_t clock_driver_get_nanoseconds_since_last_tick(void);

Declaring of a global function in a source file a bad hack.

[...]

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list