Ignore:
Timestamp:
Nov 7, 2017, 3:08:12 PM (6 years ago)
Author:
alain
Message:

First implementation of fork/exec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/drivers/soclib_tty.h

    r75 r407  
    3838 ***************************************************************************************/
    3939
    40 #define TTY_WRITE_REG          0
    41 #define TTY_STATUS_REG         1
    42 #define TTY_READ_REG           2
    43 #define TTY_CONFIG_REG         3
     40#define TTY_WRITE              0
     41#define TTY_STATUS             1
     42#define TTY_READ               2
     43#define TTY_RX_IRQ_ENABLE      3
     44#define TTY_TX_IRQ_ENABLE      4
    4445
    45 #define TTY_SPAN               4       // number of registers per channel
     46#define TTY_SPAN               8       // number of registers per channel
    4647
    4748/****************************************************************************************
     
    5152#define TTY_STATUS_RX_FULL     1       // TTY_READ_REG full if 1
    5253#define TTY_STATUS_TX_FULL     2       // TTY_WRITE_REG full if 1
    53 
    54 /****************************************************************************************
    55  * masks for TTY_CONFIG_REG
    56  ***************************************************************************************/
    57 
    58 #define TTY_CONFIG_RX_ENABLE   1       // TTY_RX IRQ enabled if 1
    59 #define TTY_CONFIG_TX_ENABLE   2       // TTY_TX IRQ enabled if 1
    6054
    6155/****************************************************************************************
     
    6862
    6963/****************************************************************************************
    70  * This function handles the command registered in the thread descriptor identified
    71  * by the <xp_thread> argument.
    72  * - For the TXT_READ and TXT_WRITE commands, it only unmask the proper TTY_RX / TTY_TX
    73  *   IRQ, and blocks the TXT device server thread on the THREAD_BLOCKED_DEV_ISR, as the
    74  *   data transfer is done by the ISR.
    75  * - For the TXT_SYNC_READ command, that should be only used by the kernel do display
    76  *   log or debug messages, it directly access the SOCLIB_TTY registers, using
    77  *   a busy waiting policy if required.
    78  ****************************************************************************************
     64 * This function implements the TXT_READ & TXT_WRITE commands registered in the client
     65 * thread descriptor (in the txt_cmd field), identified by the <xp_thread> argument.
     66 * Depending on the command type, it only unmasks the relevant TTY_RX / TTY_TX IRQ,
     67 * and blocks the TXT device server thread on the THREAD_BLOCKED_DEV_ISR, as the data
     68 * transfer is done by the ISR.
     69 * ****************************************************************************************
    7970 * @ thread_xp : extended pointer on client thread descriptor.
    8071 ***************************************************************************************/
    8172void soclib_tty_cmd( xptr_t thread_xp );
     73
     74/****************************************************************************************
     75 * This function implements the TXT_SYNC_WRITE command registered in the txt_aux_t
     76 * structure, using a busy waiting policy, without using the TTY IRQ.
     77 * It is used by the kernel do display debug messages on TXT0 terminal, without
     78 * interference with another TXT access to another terminal done by the same thread.
     79 ****************************************************************************************
     80 * @ thread_xp : pointer on the txt_aux_t structure containing the arguments.
     81 ***************************************************************************************/
     82void soclib_tty_aux( void * args );
    8283
    8384/****************************************************************************************
Note: See TracChangeset for help on using the changeset viewer.