Changeset 435 for trunk/kernel/devices/dev_txt.c
- Timestamp:
- Feb 20, 2018, 5:32:17 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_txt.c
r433 r435 38 38 extern chdev_directory_t chdev_dir; // allocated in kernel_init.c 39 39 40 #if CONFIG_READ_DEBUG40 #if (CONFIG_DEBUG_SYS_READ & 1) 41 41 extern uint32_t enter_txt_read; 42 42 extern uint32_t exit_txt_read; 43 43 #endif 44 45 #if (CONFIG_DEBUG_SYS_WRITE & 1) 46 extern uint32_t enter_txt_write; 47 extern uint32_t exit_txt_write; 48 #endif 49 50 //////////////////////////////////////// 51 char * dev_txt_type_str( uint32_t type ) 52 { 53 if ( type == TXT_SYNC_WRITE ) return "TXT_SYNC_WRITE"; 54 else if( type == TXT_READ ) return "TXT_READ"; 55 else if( type == TXT_WRITE ) return "TXT_WRITE"; 56 else return "undefined"; 57 } 44 58 45 59 ////////////////////////////////// … … 117 131 thread_t * this = CURRENT_THREAD; 118 132 133 #if (CONFIG_DEBUG_SYS_READ & 1) 134 enter_txt_read = hal_time_stamp(); 135 #endif 136 137 #if (CONFIG_DEBUG_SYS_WRITE & 1) 138 enter_txt_write = hal_time_stamp(); 139 #endif 140 119 141 #if CONFIG_DEBUG_DEV_TXT 120 142 uint32_t cycle = (uint32_t)hal_get_cycles(); … … 151 173 #endif 152 174 175 #if (CONFIG_DEBUG_SYS_READ & 1) 176 exit_txt_read = hal_time_stamp(); 177 #endif 178 179 #if (CONFIG_DEBUG_SYS_WRITE & 1) 180 exit_txt_write = hal_time_stamp(); 181 #endif 182 153 183 // return I/O operation status from calling thread descriptor 154 184 return this->txt_cmd.error; … … 160 190 uint32_t count ) 161 191 { 162 error_t error = dev_txt_access( TXT_WRITE , channel , buffer , count ); 163 return error; 192 return dev_txt_access( TXT_WRITE , channel , buffer , count ); 164 193 } 165 194 … … 168 197 char * buffer ) 169 198 { 170 171 #if CONFIG_READ_DEBUG 172 enter_txt_read = hal_time_stamp(); 173 #endif 174 175 error_t error = dev_txt_access( TXT_READ , channel , buffer , 1 ); 176 177 #if CONFIG_READ_DEBUG 178 exit_txt_read = hal_time_stamp(); 179 #endif 180 181 return error; 182 199 return dev_txt_access( TXT_READ , channel , buffer , 1 ); 183 200 } 184 201 … … 201 218 202 219 // build arguments structure 203 txt_ aux_t args;220 txt_sync_args_t args; 204 221 args.dev_xp = dev_xp; 205 222 args.buffer = buffer;
Note: See TracChangeset
for help on using the changeset viewer.