Changes between Version 1 and Version 2 of tim_driver
- Timestamp:
- Oct 25, 2014, 8:24:09 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
tim_driver
v1 v2 26 26 27 27 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 ) === 29 29 This function activates a timer in the vci_timer component by writing in the proper register the period value. 30 30 It 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. 31 Return 0 in case of success. 32 Return -1 if timer index too large. 31 33 32 === void'''_timer_stop'''( unsigned int cluster_xy, unsigned int local_id ) ===34 === int '''_timer_stop'''( unsigned int cluster_xy, unsigned int local_id ) === 33 35 This function desactivates a timer in the vci_timer component by writing in the proper register. 36 Return 0 in case of success. 37 Return -1 if timer index too large. 34 38 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 ) === 36 40 This function acknowlegge a timer interrupt in the vci_timer component by writing in the proper register. 37 41 It can be used by both the isr_switch() for a "system" timer, or by the _isr_timer() for an "user" timer. 42 Return 0 in case of success. 43 Return -1 if timer index too large. 38 44 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) === 40 46 This function resets the timer counter. To do so, we re-write the period in the proper register, what causes the count to restart. 41 47 This function is called during a context switch (user or preemptive). 48 Return 0 in case of success. 49 Return -1 if timer index too large. 42 50 43 51 === void '''_timer_isr'''( unsigned int irq_type, unsigned int irq_id, unsigned int channel ) ===