Changes in trunk/kernel/devices/dev_txt.h [3:1]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_txt.h
r3 r1 30 30 /**** Forward declarations ****/ 31 31 32 struct chdev_s ;32 struct device_s ; 33 33 34 34 /****************************************************************************************** … … 79 79 80 80 /****************************************************************************************** 81 * This function completes the TXT chdevdescriptor initialisation,81 * This function completes the TXT device descriptor initialisation, 82 82 * namely the link with the implementation specific driver. 83 * The func, impl, channel, is_rxt, base fields have beenpreviously initialised.83 * The func, impl, channel, is_rxt, base, and size fields must be previously initialised. 84 84 * It calls the specific driver initialisation function, to initialise the hardware 85 85 * device and the driver specific data structures when required. 86 * It creates the associated server thread and allocates a WTI from local ICU. 87 * It must de executed by a local thread. 86 * It creates the associated server thread. 87 * It can be executed in another cluster than cluster containing the device descriptor 88 * or the hardware device itself. 88 89 ****************************************************************************************** 89 * @ chdev : localpointer on TXT device descriptor.90 * @ xp_dev : extended pointer on TXT device descriptor. 90 91 *****************************************************************************************/ 91 void dev_txt_init( struct chdev_s * chdev );92 void dev_txt_init( xptr_t xp_dev ); 92 93 93 94 /****************************************************************************************** 94 95 * This blocking function read a single character from the terminal identified 95 96 * by the "channel" argument. The corresponding request is actually registered in the 96 * chdevrequests queue, and the calling thread is descheduled, blocked until97 * device pending requests queue, and the calling thread is descheduled, blocked until 97 98 * transfer completion. 98 99 * It must be called in the client cluster. … … 108 109 * This blocking function writes a character string on the terminal identified 109 110 * by the "channel" argument. The corresponding request is actually registered in the 110 * chdevrequests queue, and the calling thread is descheduled, blocked until111 * device pending requests queue, and the calling thread is descheduled, blocked until 111 112 * transfer completion. 112 113 * It must be called in the client cluster. … … 122 123 123 124 /*************************************************************************************** 124 * This low-level blocking function is used by the kernel to display one stringon a125 * This low-level blocking function is used by the kernel to display one character on a 125 126 * given TXT channel without descheduling the calling thread, without registering it 126 127 * in the TXT device waiting queue, and without using the TXT irq. … … 135 136 uint32_t count ); 136 137 138 /****************************************************************************************** 139 * This function is executed by the server thread associated to the TXT device descriptor. 140 * This thread is created and lauched by the dev_txt_init() function, and is used 141 * by the TXT_READ and TXT_WRITE operation types. It executes an infinite loop to handle 142 * sequencially all commands registered by the client threads in the device waiting queue. 143 * 144 * The driver CMD function is blocking, and returns only when the command is completed. 145 * can use a busy waiting policy, or block the server thread on the THREAD_BLOCKED_IO_ISR 146 * condition and deschedule, using the ISR to reactivate the server thread. 147 * 148 * When the waiting queue is empty, the server thread blocks on the THREAD_BLOCKED_IO_CMD 149 * condition and deschedule. It is re-activated by a client thread registering a command. 150 ****************************************************************************************** 151 * @ dev : local pointer on device descriptor. 152 *****************************************************************************************/ 153 void dev_txt_server( struct device_s * dev ); 154 137 155 138 156 #endif /* _DEV_TXT_H_ */
Note: See TracChangeset
for help on using the changeset viewer.