📄 comm_51.c
字号:
/*
*********************************************************************************************************
* Embedded Systems Building Blocks
* Complete and Ready-to-Use Modules in C
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* INCLUDES
*********************************************************************************************************
*/
#include "..\includes\INCLUDES.H"
extern bit SemTIbusy;
/*
*********************************************************************************************************
* CONSTANTS
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* LOCAL GLOBAL VARIABLES
*********************************************************************************************************
*/
#if OS_CRITICAL_METHOD == 3 /* Allocate storage for CPU status register */
extern OS_CPU_SR cpu_sr;
#endif
/*
*********************************************************************************************************
* COMM ISR HANDLER
*串行口通信中断程序
* Description : This function processes an interrupt from a COMM port. The function verifies whether the
* interrupt comes from a received character, the completion of a transmitted character or
* both.
* Notes : 'switch' statements are used for expansion.
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* DISABLE TX INTERRUPTS
*
* Description : This function disables the character transmission.
*********************************************************************************************************
*/
/*
*********************************************************************************************************
* ENABLE TX INTERRUPTS
*
* Description : This function enables transmission of characters. Transmission of characters is
* interrupt driven. If you are using a multi-drop driver, the code must enable the driver
* for transmission.
*********************************************************************************************************
*/
void CommTxIntEn ()
{
//OS_ENTER_CRITICAL();
TI = 1; /* Enable IRQ */
SemTIbusy = 1;
//OS_EXIT_CRITICAL();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -