Changes between Version 1 and Version 2 of tim_driver


Ignore:
Timestamp:
Oct 25, 2014, 8:24:09 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • tim_driver

    v1 v2  
    2626
    2727
    28  === void '''_timer_start'''( unsigned int cluster_xy,  unsigned int local_id,  unsigned int period ) ===
     28 === int '''_timer_start'''( unsigned int cluster_xy,  unsigned int local_id,  unsigned int period ) ===
    2929This function activates a timer in the vci_timer component by writing in the proper register the period value.
    3030It can be used by both the kernel to initialise a "system" timer, or by a task (through a system call) to configure an "user" timer.
     31Return 0 in case of success.
     32Return -1 if timer index too large.
    3133
    32  === void '''_timer_stop'''( unsigned int cluster_xy,  unsigned int local_id ) ===
     34 === int '''_timer_stop'''( unsigned int cluster_xy,  unsigned int local_id ) ===
    3335This function desactivates a timer in the vci_timer component by writing in the proper register.
     36Return 0 in case of success.
     37Return -1 if timer index too large.
    3438
    35  === void '''_timer_reset_irq'''( unsigned int cluster_xy,  unsigned int local_id ) ===
     39 === int '''_timer_reset_irq'''( unsigned int cluster_xy,  unsigned int local_id ) ===
    3640This function acknowlegge a timer interrupt in the vci_timer  component by writing in the proper register.
    3741It can be used by both the isr_switch() for a "system" timer, or by the _isr_timer() for an "user" timer.
     42Return 0 in case of success.
     43Return -1 if timer index too large.
    3844
    39  === void '''_timer_reset_cpt'''( unsigned int cluster_xy,   unsigned int local_id) ===
     45 === int '''_timer_reset_cpt'''( unsigned int cluster_xy,   unsigned int local_id) ===
    4046This function resets the timer counter. To do so, we re-write the period in the proper register, what causes the count to restart.
    4147This function is called during a context switch (user or preemptive).
     48Return 0 in case of success.
     49Return -1 if timer index too large.
    4250
    4351 === void '''_timer_isr'''( unsigned int irq_type,  unsigned int irq_id,  unsigned int channel ) ===