Changeset 407 for trunk/hal/tsar_mips32/drivers/soclib_tty.h
- Timestamp:
- Nov 7, 2017, 3:08:12 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/drivers/soclib_tty.h
r75 r407 38 38 ***************************************************************************************/ 39 39 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 44 45 45 #define TTY_SPAN 4// number of registers per channel46 #define TTY_SPAN 8 // number of registers per channel 46 47 47 48 /**************************************************************************************** … … 51 52 #define TTY_STATUS_RX_FULL 1 // TTY_READ_REG full if 1 52 53 #define TTY_STATUS_TX_FULL 2 // TTY_WRITE_REG full if 1 53 54 /****************************************************************************************55 * masks for TTY_CONFIG_REG56 ***************************************************************************************/57 58 #define TTY_CONFIG_RX_ENABLE 1 // TTY_RX IRQ enabled if 159 #define TTY_CONFIG_TX_ENABLE 2 // TTY_TX IRQ enabled if 160 54 61 55 /**************************************************************************************** … … 68 62 69 63 /**************************************************************************************** 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 * **************************************************************************************** 79 70 * @ thread_xp : extended pointer on client thread descriptor. 80 71 ***************************************************************************************/ 81 72 void 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 ***************************************************************************************/ 82 void soclib_tty_aux( void * args ); 82 83 83 84 /****************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.