Changeset 2a90ae7 in rtems


Ignore:
Timestamp:
Dec 7, 2007, 9:10:55 AM (12 years ago)
Author:
Till Straumann <strauman@…>
Branches:
4.10, 4.11, 4.9, master
Children:
d875597c
Parents:
8272b10
Message:

2007-12-06 Till Straumann <strauman@…>

  • shared/openpic/openpic.c, shared/openpic/openpic.h: added routines to set timer period and interupt mask and to read current count.
Location:
c/src/lib/libbsp/powerpc
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/ChangeLog

    r8272b10 r2a90ae7  
     12007-12-06      Till Straumann <strauman@slac.stanford.edu>
     2
     3        * shared/openpic/openpic.c, shared/openpic/openpic.h:
     4        added routines to set timer period and interupt mask
     5        and to read current count.
     6
    172007-12-06      Till Straumann <strauman@slac.stanford.edu>
    28
  • c/src/lib/libbsp/powerpc/shared/openpic/openpic.c

    r8272b10 r2a90ae7  
    493493}
    494494
     495    /*
     496     *  Set base count and / or enable / disable interrupt.
     497     */
     498
     499
     500void openpic_settimer(unsigned int timer, unsigned int base_count, int irq_enable)
     501{
     502        check_arg_timer(timer);
     503        if ( base_count )
     504                openpic_write(&OpenPIC->Global.Timer[timer].Base_Count, base_count);
     505        if ( irq_enable )
     506                openpic_clearfield(&OpenPIC->Global.Timer[timer].Vector_Priority, OPENPIC_MASK);
     507        else
     508                openpic_setfield(&OpenPIC->Global.Timer[timer].Vector_Priority, OPENPIC_MASK);
     509}
     510
     511unsigned int openpic_gettimer(unsigned int timer)
     512{
     513        check_arg_timer(timer);
     514        return (openpic_read(&OpenPIC->Global.Timer[timer]) & ~OPENPIC_MASK);
     515}
     516
    495517/* -------- Interrupt Sources ---------------------------------------------- */
    496518
  • c/src/lib/libbsp/powerpc/shared/openpic/openpic.h

    r8272b10 r2a90ae7  
    364364/* Timer Interrupts */
    365365extern void openpic_inittimer(unsigned int timer, unsigned int pri, unsigned int vector);
     366extern void openpic_settimer(unsigned int timer, unsigned int base_count, int irq_enable);
     367extern unsigned int openpic_gettimer(unsigned int timer);
    366368extern void openpic_maptimer(unsigned int timer, unsigned int cpumask);
    367369
Note: See TracChangeset for help on using the changeset viewer.