Changeset 407 for trunk/kernel/devices/dev_txt.h
- Timestamp:
- Nov 7, 2017, 3:08:12 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_txt.h
r254 r407 36 36 * 37 37 * This multi-channels generic TXT device provides access to a text terminal. 38 * It supports three operation types : 38 * 39 * It supports two operations that must be implemented by the driver cmd() function: 39 40 * - TXT_READ : read a single character from the text terminal identified by its channel 40 41 * index, using a descheduling strategy for the calling thread. 41 42 * - TXT_WRITE : write a character string to the text terminal identified by its channel 42 43 * index, using a descheduling strategy for the calling thread. 43 * - TXT_SYNC_WRITE : write a character string to the terminal identified by its channel 44 * index, using a busy waiting strategy for the calling thread. 44 * 45 * It supports one operation, that must be implemented by the driver aux() function 46 * - TXT_SYNC_WRITE write a character string to the TXT0 kernel terminal, using a busy 47 * waiting strategy for the calling thread. 45 48 *****************************************************************************************/ 46 49 … … 58 61 59 62 /****************************************************************************************** 60 * This defines the (implementation independent) command passed to the driver.63 * This defines the arguments passed to the driver CMD function. 61 64 *****************************************************************************************/ 62 65 … … 65 68 TXT_READ = 0, 66 69 TXT_WRITE = 1, 67 TXT_SYNC_WRITE = 2,68 70 }; 69 71 … … 77 79 } 78 80 txt_command_t; 81 82 /****************************************************************************************** 83 * This defines the arguments passed to the driver AUX function. 84 * This function implement the TXT_SYNC_WRITE operation. 85 *****************************************************************************************/ 86 87 typedef struct txt_aux_s 88 { 89 xptr_t dev_xp; /*! extended pointer on the TXT0 device descriptor */ 90 char * buffer; /*! local pointer on characters array */ 91 uint32_t count; /*! number of characters in buffer */ 92 } 93 txt_aux_t; 79 94 80 95 /****************************************************************************************** … … 122 137 123 138 /*************************************************************************************** 124 * This low-level blocking function is used by the kernel to display one string on a 125 * given TXT channel without descheduling the calling thread, without registering it 126 * in the TXT device waiting queue, and without using the TXT irq. 139 * This blocking function is used by the kernel to display a string on the TXT0 140 * terminal, without descheduling the calling thread, without registering it 141 * in the TXT0 device waiting queue, without using the TXT0 irq, and without 142 * interfering with another possible TXT access to another terminal. 143 * As it is used for debug, the command arguments <buffer> and <count> are registerd 144 * in a specific "dbg_cmd" field of the calling thread. 145 * other TXT accesses. 127 146 **************************************************************************************** 128 * @ channel : TXT channel index.129 147 * @ buffer : local pointer on source buffer containing the string. 130 148 * @ count : number of characters. 131 149 * @ returns 0 if success / returns EINVAL if error. 132 150 ***************************************************************************************/ 133 error_t dev_txt_sync_write( uint32_t channel, 134 char * buffer, 151 error_t dev_txt_sync_write( char * buffer, 135 152 uint32_t count ); 136 153
Note: See TracChangeset
for help on using the changeset viewer.