Changeset 3 for trunk/kernel/devices/dev_txt.h
- Timestamp:
- Apr 26, 2017, 2:08:13 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/devices/dev_txt.h
r1 r3 30 30 /**** Forward declarations ****/ 31 31 32 struct device_s ;32 struct chdev_s ; 33 33 34 34 /****************************************************************************************** … … 79 79 80 80 /****************************************************************************************** 81 * This function completes the TXT devicedescriptor initialisation,81 * This function completes the TXT chdev descriptor initialisation, 82 82 * namely the link with the implementation specific driver. 83 * The func, impl, channel, is_rxt, base , and size fields must bepreviously initialised.83 * The func, impl, channel, is_rxt, base fields have been 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. 87 * It can be executed in another cluster than cluster containing the device descriptor 88 * or the hardware device itself. 86 * It creates the associated server thread and allocates a WTI from local ICU. 87 * It must de executed by a local thread. 89 88 ****************************************************************************************** 90 * @ xp_dev : extendedpointer on TXT device descriptor.89 * @ chdev : local pointer on TXT device descriptor. 91 90 *****************************************************************************************/ 92 void dev_txt_init( xptr_t xp_dev );91 void dev_txt_init( struct chdev_s * chdev ); 93 92 94 93 /****************************************************************************************** 95 94 * This blocking function read a single character from the terminal identified 96 95 * by the "channel" argument. The corresponding request is actually registered in the 97 * device pendingrequests queue, and the calling thread is descheduled, blocked until96 * chdev requests queue, and the calling thread is descheduled, blocked until 98 97 * transfer completion. 99 98 * It must be called in the client cluster. … … 109 108 * This blocking function writes a character string on the terminal identified 110 109 * by the "channel" argument. The corresponding request is actually registered in the 111 * device pendingrequests queue, and the calling thread is descheduled, blocked until110 * chdev requests queue, and the calling thread is descheduled, blocked until 112 111 * transfer completion. 113 112 * It must be called in the client cluster. … … 123 122 124 123 /*************************************************************************************** 125 * This low-level blocking function is used by the kernel to display one characteron a124 * This low-level blocking function is used by the kernel to display one string on a 126 125 * given TXT channel without descheduling the calling thread, without registering it 127 126 * in the TXT device waiting queue, and without using the TXT irq. … … 136 135 uint32_t count ); 137 136 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 used141 * by the TXT_READ and TXT_WRITE operation types. It executes an infinite loop to handle142 * 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_ISR146 * 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_CMD149 * 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 155 137 156 138 #endif /* _DEV_TXT_H_ */
Note: See TracChangeset
for help on using the changeset viewer.