Changeset 0e58c4f in rtems


Ignore:
Timestamp:
May 7, 2008, 5:40:52 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, 5, master
Children:
ba737a9
Parents:
030d9e9
Message:

2008-05-07 Joel Sherrill <joel.sherrill@…>

  • clock/ckinit.c: Add nanoseconds clock tick granularity support.
Location:
c/src/lib/libbsp/sparc
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/erc32/ChangeLog

    r030d9e9 r0e58c4f  
     12008-05-07      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * clock/ckinit.c: Add nanoseconds clock tick granularity support.
     4
    152008-04-23      Joel Sherrill <joel.sherrill@OARcorp.com>
    26
  • c/src/lib/libbsp/sparc/erc32/clock/ckinit.c

    r030d9e9 r0e58c4f  
    88 *  microseconds per tick.
    99 *
    10  *  COPYRIGHT (c) 1989-2006.
     10 *  COPYRIGHT (c) 1989-2008.
    1111 *  On-Line Applications Research Corporation (OAR).
    1212 *
     
    5353  clicks = ERC32_MEC.Real_Time_Clock_Counter;
    5454
    55   return (uint32_t) (rtems_configuration_get_microseconds_per_tick() - clicks) * 1000;
     55  return (uint32_t)
     56    (rtems_configuration_get_microseconds_per_tick() - clicks) * 1000;
    5657}
    5758
  • c/src/lib/libbsp/sparc/leon2/ChangeLog

    r030d9e9 r0e58c4f  
     12008-05-07      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * clock/ckinit.c: Add nanoseconds clock tick granularity support.
     4
    152008-04-23      Joel Sherrill <joel.sherrill@OARcorp.com>
    26
  • c/src/lib/libbsp/sparc/leon2/clock/ckinit.c

    r030d9e9 r0e58c4f  
    77 *  microseconds per tick.
    88 *
    9  *  COPYRIGHT (c) 1989-2006.
     9 *  COPYRIGHT (c) 1989-2008.
    1010 *  On-Line Applications Research Corporation (OAR).
    1111 *
     
    6060  } while (0)
    6161
     62uint32_t bsp_clock_nanoseconds_since_last_tick(void)
     63{
     64  uint32_t clicks;
     65
     66  clicks = LEON_REG.Timer_Counter_1;
     67
     68  /* Down counter */
     69  return (uint32_t)
     70     (rtems_configuration_get_microseconds_per_tick() - clicks) * 1000;
     71}
     72
     73#define Clock_driver_nanoseconds_since_last_tick bsp_clock_nanoseconds_since_last_tick
     74
    6275#include "../../../shared/clockdrv_shell.c"
  • c/src/lib/libbsp/sparc/leon3/ChangeLog

    r030d9e9 r0e58c4f  
     12008-05-07      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * clock/ckinit.c: Add nanoseconds clock tick granularity support.
     4
    152008-04-23      Joel Sherrill <joel.sherrill@OARcorp.com>
    26
  • c/src/lib/libbsp/sparc/leon3/clock/ckinit.c

    r030d9e9 r0e58c4f  
    9595  } while (0)
    9696
     97uint32_t bsp_clock_nanoseconds_since_last_tick(void)
     98{
     99  uint32_t clicks;
     100  if ( !LEON3_Timer_Regs )
     101    return 0;
     102
     103  clicks = LEON3_Timer_Regs->timer[0].value;
     104
     105  /* Down counter */
     106  return (uint32_t)
     107     (rtems_configuration_get_microseconds_per_tick() - clicks) * 1000;
     108}
     109
     110#define Clock_driver_nanoseconds_since_last_tick bsp_clock_nanoseconds_since_last_tick
     111
    97112#include "../../../shared/clockdrv_shell.c"
Note: See TracChangeset for help on using the changeset viewer.