📄 at91sam9261_init.c
字号:
/*************************************************************************
*
* Used with ICCARM and AARM.
*
* (c) Copyright IAR Systems 2006
*
* File name : AT91SAM9261_init.c
* Description : Define init module
*
* History :
* 1. Data : March, 31 2006
* Author : Stanimir Bonev
* Description : Create
*
* $Revision: 1.1 $
**************************************************************************/
#include "AT91SAM9261_init.h"
/*************************************************************************
* Function Name: AT91F_DBGU_Printk
* Parameters: char *buffer
*
* Return: none
*
* Description: This function is used to send a string through the
* DBGU channel (Very low level debugging)
* Note: Arg pointer to a string ending by \0
*************************************************************************/
void AT91F_DBGU_Printk(char *buffer)
{
while(*buffer != '\0')
{
AT91F_Putc(*buffer++);
}
}
/*************************************************************************
* Function Name: AT91F_Putc
* Parameters: int ch
*
* Return: int
*
* Description: This function sends a char through the DBGU
*
*************************************************************************/
int AT91F_Putc(int ch)
{
/* Our implementation of fputc */
while (!AT91F_US_TxReady((AT91PS_USART)AT91C_BASE_DBGU));
AT91F_US_PutChar((AT91PS_USART)AT91C_BASE_DBGU, (char)ch);
return ch;
}
/*************************************************************************
* Function Name: AT91F_Getc
* Parameters: none
*
* Return: int
*
* Description: This function receives a char through the DBGU
*
*************************************************************************/
int AT91F_Getc(void)
{
while(!AT91F_US_RxReady((AT91PS_USART)AT91C_BASE_DBGU));
return((int)AT91F_US_GetChar((AT91PS_USART)AT91C_BASE_DBGU));
}
/*************************************************************************
* Function Name: AT91F_UndefHandler
* Parameters: none
*
* Return: none
*
* Description: Undef handler subroutine
*
*************************************************************************/
__arm void AT91F_UndefHandler(void)
{
while (1);
}
/*************************************************************************
* Function Name: AT91F_SpuriousHandler
* Parameters: none
*
* Return: none
*
* Description: Spurious handler subroutine
*
*************************************************************************/
__arm void AT91F_SpuriousHandler(void)
{
while (1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -