Changeset 333 for soft/giet_vm/giet_drivers/tim_driver.c
- Timestamp:
- Jun 19, 2014, 1:31:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_drivers/tim_driver.c
r320 r333 21 21 // 22 22 // The virtual base address of the segment associated to a channel is: 23 // SEG_TIM_BASE + cluster_xy * VSEG_CLUSTER_INCREMENT + TIMER_SPAN * timer_id24 // 25 // The SEG_TIM_BASE and VSEG_CLUSTER_INCREMENT must be defined in hard_config.h.23 // SEG_TIM_BASE + cluster_xy * PERI_CLUSTER_INCREMENT + TIMER_SPAN * timer_id 24 // 25 // The SEG_TIM_BASE and PERI_CLUSTER_INCREMENT must be defined in hard_config.h. 26 26 ///////////////////////////////////////////////////////////////////////////////////// 27 27 … … 36 36 #endif 37 37 38 #if !defined( VSEG_CLUSTER_INCREMENT)39 # error: You must define VSEG_CLUSTER_INCREMENT in the hard_config.h file38 #if !defined(PERI_CLUSTER_INCREMENT) 39 # error: You must define PERI_CLUSTER_INCREMENT in the hard_config.h file 40 40 #endif 41 41 … … 99 99 100 100 unsigned int* timer_address = (unsigned int *) ( SEG_TIM_BASE + 101 (cluster_xy * VSEG_CLUSTER_INCREMENT) );101 (cluster_xy * PERI_CLUSTER_INCREMENT) ); 102 102 103 103 timer_address[local_id * TIMER_SPAN + TIMER_PERIOD] = period; … … 130 130 131 131 unsigned int* timer_address = (unsigned int *) ( SEG_TIM_BASE + 132 (cluster_xy * VSEG_CLUSTER_INCREMENT) );132 (cluster_xy * PERI_CLUSTER_INCREMENT) ); 133 133 134 134 timer_address[local_id * TIMER_SPAN + TIMER_MODE] = 0; … … 162 162 163 163 unsigned int* timer_address = (unsigned int *) ( SEG_TIM_BASE + 164 (cluster_xy * VSEG_CLUSTER_INCREMENT) );164 (cluster_xy * PERI_CLUSTER_INCREMENT) ); 165 165 166 166 timer_address[local_id * TIMER_SPAN + TIMER_RESETIRQ] = 0; … … 196 196 // We suppose that the TIMER_MODE register value is 0x3 197 197 unsigned int* timer_address = (unsigned int *) ( SEG_TIM_BASE + 198 (cluster_xy * VSEG_CLUSTER_INCREMENT) );198 (cluster_xy * PERI_CLUSTER_INCREMENT) ); 199 199 200 200 unsigned int period = timer_address[local_id * TIMER_SPAN + TIMER_PERIOD];
Note: See TracChangeset
for help on using the changeset viewer.