Changeset 539 for trunk/kernel/devices
- Timestamp:
- Sep 21, 2018, 10:21:42 PM (6 years ago)
- Location:
- trunk/kernel/devices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_txt.c
r527 r539 173 173 #endif 174 174 175 // get extended pointer on TXT[0] chdev 176 xptr_t dev_xp = chdev_dir.txt_tx[0]; 177 178 assert( (dev_xp != XPTR_NULL) , __FUNCTION__ , 179 "undefined TXT0 chdev descriptor" ); 180 181 // get TXTO chdev cluster and local pointer 182 cxy_t dev_cxy = GET_CXY( dev_xp ); 183 chdev_t * dev_ptr = (chdev_t *)GET_PTR( dev_xp ); 184 185 // If we use MTTYs (vci_multi_tty), we perform only sync writes 186 if( dev_ptr->impl == IMPL_TXT_MTY ) 187 { 188 // get driver command function 189 dev_aux_t * aux = (dev_aux_t *)hal_remote_lpt( XPTR( dev_cxy , &dev_ptr->aux ) ); 190 191 // build arguments structure 192 txt_sync_args_t args; 193 args.dev_xp = dev_xp; 194 args.buffer = buffer; 195 args.count = count; 196 args.channel = channel; 197 198 // call driver function 199 aux( &args ); 200 201 return 0; 202 } 203 204 // Otherwise, we use vci_tty_tsar so we can use async writes 205 else 206 { 175 207 return dev_txt_access( TXT_WRITE , channel , buffer , count ); 208 } 176 209 177 210 #if DEBUG_DEV_TXT_TX … … 238 271 args.buffer = buffer; 239 272 args.count = count; 273 args.channel = 0; 240 274 241 275 // call driver function -
trunk/kernel/devices/dev_txt.h
r534 r539 106 106 char * buffer; /*! local pointer on characters array */ 107 107 uint32_t count; /*! number of characters in buffer */ 108 uint32_t channel; /*! channel, aka which tty to write to */ 108 109 } 109 110 txt_sync_args_t;
Note: See TracChangeset
for help on using the changeset viewer.