Ignore:
Timestamp:
Apr 26, 2017, 2:08:13 PM (7 years ago)
Author:
alain
Message:

Introduce dev_fbf, dev dma, dev_iob

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_txt.h

    r1 r3  
    3030/****  Forward declarations  ****/
    3131
    32 struct device_s ;
     32struct chdev_s ;
    3333
    3434/******************************************************************************************
     
    7979
    8080/******************************************************************************************
    81  * This function completes the TXT device descriptor initialisation,
     81 * This function completes the TXT chdev descriptor initialisation,
    8282 * namely the link with the implementation specific driver.
    83  * The func, impl, channel, is_rxt, base, and size fields must be previously initialised.
     83 * The func, impl, channel, is_rxt, base fields have been previously initialised.
    8484 * It calls the specific driver initialisation function, to initialise the hardware
    8585 * 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.
    8988 ******************************************************************************************
    90  * @ xp_dev     : extended pointer on TXT device descriptor.
     89 * @ chdev     : local pointer on TXT device descriptor.
    9190 *****************************************************************************************/
    92 void dev_txt_init( xptr_t xp_dev );
     91void dev_txt_init( struct chdev_s * chdev );
    9392
    9493/******************************************************************************************
    9594 * This blocking function read a single character from the terminal identified
    9695 * by the "channel" argument. The corresponding request is actually registered in the
    97  * device pending requests queue, and the calling thread is descheduled, blocked until
     96 * chdev requests queue, and the calling thread is descheduled, blocked until
    9897 * transfer completion.
    9998 * It must be called in the client cluster.
     
    109108 * This blocking function writes a character string on the terminal identified
    110109 * by the "channel" argument. The corresponding request is actually registered in the
    111  * device pending requests queue, and the calling thread is descheduled, blocked until
     110 * chdev requests queue, and the calling thread is descheduled, blocked until
    112111 * transfer completion.
    113112 * It must be called in the client cluster.
     
    123122
    124123 /***************************************************************************************
    125  * This low-level blocking function is used by the kernel to display one character on a
     124 * This low-level blocking function is used by the kernel to display one string on a
    126125 * given TXT channel without descheduling the calling thread,  without registering it
    127126 * in the TXT device waiting queue, and without using the TXT irq.
     
    136135                            uint32_t   count );
    137136
    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 
    155137
    156138#endif  /* _DEV_TXT_H_ */
Note: See TracChangeset for help on using the changeset viewer.