📄 ads-io.h
字号:
/* ads-io.h -- simple-minded I/O routines for Motorola MPC8xxADS board.
* Prototypes for functions in ads-io.c
*
* Copyright (c) 1998 by Scott Howard.
*
* SMC2Init (), SMC2PutChar (), SMC2GetChar () and SMC2Poll () are adapted from
* Motorola's demo program on their web site. No copyright was defined in
* the original source.
*
* The author hereby grants permission to use, copy, modify, distribute,
* and license this software and its documentation for any purpose, provided
* that existing copyright notices are retained in all copies and that this
* notice is included verbatim in any distributions. No written agreement,
* license, or royalty fee is required for any of the authorized uses.
* Modifications to this software may be copyrighted by their authors
* and need not follow the licensing terms described here, provided that
* the new terms are clearly indicated on the first page of each file where
* they apply.
*/
extern int SMC2InitDone;
/***************************************************
* UART Initializtion Routine
*
* Function: SMC2Init
* The SMC2 is initialized as a UART at 9600 Baud with 20MHZ CPU clock.
*
***************************************************/
void SMC2Init(void);
/**************************************************
* SMC2PutChar Routine
*
* Function: SMC2PutChar
* Output a character to SMC2
*
* Input:
* ch -- input character
*
**************************************************/
void SMC2PutChar(char ch);
/**************************************************
* SMC2GetChar Routine
*
* Function: SMC2GetChar
* Get a character from SMC2
*
* Return Value:
* character from SMC2
*
**************************************************/
char SMC2GetChar(void);
/**************************************************
* SMC2Poll Routine
*
* Function: SMC2Poll
* Poll the SMC2, returns true if a character available in the receive buffer.
*
* Return Value:
* Returns 1 if character available, else returns 0.
*
**************************************************/
int SMC2Poll(void);
/*
* GetIMMR() returns the current value in IMMR register.
*/
unsigned long GetIMMR(void);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -