📄 os_viewc.c
字号:
/*
*********************************************************************************************************
* uC/OS-View
*
* (c) Copyright 2004, Micrium, Inc., Weston, FL
* All Rights Reserved
*
* STMicroelectronics
* STR91xF
*********************************************************************************************************
*/
#include <includes.h>
#if OS_VIEW_MODULE > 0
/*
*********************************************************************************************************
* EXIT uC/OS-View
*
* Description: This function is not used in this port.
*********************************************************************************************************
*/
void OSView_Exit (void)
{
}
/*
*********************************************************************************************************
* Obtain CPU name
*
* Description: This routine allows the OSView application to display the name of the processor.
*********************************************************************************************************
*/
void OSView_GetCPUName (INT8U *s)
{
OS_StrCopy(s, "STR91x");
}
/*
*********************************************************************************************************
* Obtain Interrupt Stack Base
*
* Description: This function simply returns a zero
* Returns : 0
*********************************************************************************************************
*/
INT32U OSView_GetIntStkBase (void)
{
return ((INT32U)0); /* There is no seperate interrupt stack */
}
/*
*********************************************************************************************************
* Obtain Interrupt Stack Size
*
* Description: This function simply returns a zero
* Returns : 0
*********************************************************************************************************
*/
INT32U OSView_GetIntStkSize (void)
{
return ((INT32U)0); /* There is no seperate interrupt stack */
}
/*
*********************************************************************************************************
* INITIALIZE uC/OS-View COM PORT
*
* Description: Initialize the hardware required for the OS to run. It is assumed that the timer has
* already been initialized by a BSP function.
*********************************************************************************************************
*/
void OSView_InitTarget (INT32U baud_rate)
{
OSView_TmrCntsPrev = 0;
OSView_TmrInit();
OSView_UARTInit(baud_rate);
}
/*
*********************************************************************************************************
* Disable Rx Interrupts
*
* Description: Disable receive interrupts from the UART
*********************************************************************************************************
*/
void OSView_RxIntDis (void)
{
UART_ITConfig(UART1, UART_IT_Receive, DISABLE);
}
/*
*********************************************************************************************************
* Enable Rx Interrupts
*
* Description: Enable receive interrupts from the UART
*********************************************************************************************************
*/
void OSView_RxIntEn (void)
{
UART_ITConfig(UART1, UART_IT_Receive, ENABLE);
}
/*
*********************************************************************************************************
* Rx Communication handler for uC/OS-View
*
* Description: This routine is not used because the UART produces a single interrupt for receives and
* transmits
*********************************************************************************************************
*/
void OSView_RxISRHandler (void)
{
}
/*
*********************************************************************************************************
* Rx/Tx Communication handler for uC/OS-View
*
* Description: This interrupt handler is not needed. UART1_IRQHandler(), in 91x_it.c, is used instead.
*********************************************************************************************************
*/
void OSView_RxTxISRHandler (void)
{
}
/*$PAGE*/
/*
*********************************************************************************************************
* Transmit a Character
*
* Description: Send 1 character to COM Port
*********************************************************************************************************
*/
void OSView_Tx1 (INT8U c)
{
UART_SendData(UART1, c);
}
/*
*********************************************************************************************************
* Disable Tx Interrupts
*
* Description: This routine disables transmit interrupts from the UART
*********************************************************************************************************
*/
void OSView_TxIntDis (void)
{
UART_ITConfig(UART1, UART_IT_Transmit, DISABLE);
}
/*
*********************************************************************************************************
* Enable Tx Interrupts
*
* Description: This routine enables transmit interrupts from the UART
*********************************************************************************************************
*/
void OSView_TxIntEn (void)
{
UART_ITConfig(UART1, UART_IT_Transmit, ENABLE);
}
/*
*********************************************************************************************************
* Tx Communication handler for uC/OS-View
*
* Description: This routine is not used because the UART produces a single interrupt for receives and
* transmits
*********************************************************************************************************
*/
void OSView_TxISRHandler (void)
{
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -