📄 pc16552d.h
字号:
/*
* +-------------------------------------------------------------------+
* | Copyright (c) 1999 by TriMedia Technologies. |
* | |
* | This software is furnished under a license and may only be used |
* | and copied in accordance with the terms and conditions of such a |
* | license and with the inclusion of this copyright notice. This |
* | software or any other copies of this software may not be provided |
* | or otherwise made available to any other person. The ownership |
* | and title of this software is not transferred. |
* | |
* | The information in this software is subject to change without |
* | any prior notice and should not be consTrued as a commitment by |
* | TriMedia Technologies. |
* | |
* | This code and information is provided "as is" without any |
* | warranty of any kind, either expressed or implied, including but |
* | not limited to the implied warranties of merchantability and/or |
* | fitness for any particular purpose. |
* +-------------------------------------------------------------------+
*
* Module name : pc16552D.h 1.5
*
* Last update : 18:43:42 - 00/11/09
*/
#ifndef _PC16552D_H_
#define _PC16552D_H_
#include <tm1/tsaUartBoard.h>
#if defined(__cplusplus)
extern "C" {
#endif
#define PC16552D_CRYSTAL_1_8432 0
#define PC16552D_CRYSTAL_3_072 1
#define PC16552D_CRYSTAL_18_432 2
#define PC16552D_BAUD_RATES_1_8432 (UART_BAUD_9600 | UART_BAUD_19200 | UART_BAUD_38400 | UART_BAUD_57600)
#define PC16552D_BAUD_RATES_3_072 (UART_BAUD_9600 | UART_BAUD_19200 | UART_BAUD_38400)
#define PC16552D_BAUD_RATES_18_432 (UART_BAUD_9600 | UART_BAUD_19200 | UART_BAUD_38400 | UART_BAUD_57600 | UART_BAUD_115200)
typedef UInt8 (*pc16552DReadRegisterFunc_t) (unitSelect_t portID, Int addr);
typedef void (*pc16552DWriteRegisterFunc_t) (unitSelect_t portID, Int addr, UInt8 data);
typedef struct
{
pc16552DReadRegisterFunc_t readRegisterFunc;
pc16552DWriteRegisterFunc_t writeRegisterFunc;
UInt32 crystalType;
}pc16552DParams_t, *ppc16552DParams_t;
extern tmLibdevErr_t pc16552DInit(ppc16552DParams_t params);
extern Bool pc16552DPICSourceDetect(UInt32 * source);
extern tmLibdevErr_t pc16552DInitPort(unitSelect_t portID, pboardUartParam_t params);
extern tmLibdevErr_t pc16552DTermPort(unitSelect_t portID);
extern tmLibdevErr_t pc16552DSetBaudRate(unitSelect_t portID, tsaUartBaud_t baudRate);
extern tmLibdevErr_t pc16552DSetSerialDataFormat(unitSelect_t portID, Int numStopBits, Int numDataBits, tsaUartParity_t parity);
extern tmLibdevErr_t pc16552DSetTxInt(unitSelect_t portID, Bool enable);
extern tmLibdevErr_t pc16552DSetRxInt(unitSelect_t portID, Bool enable);
extern tmLibdevErr_t pc16552DSetLineStatusInt(unitSelect_t portID, Bool enable);
extern tmLibdevErr_t pc16552DSetModemStatusInt(unitSelect_t portID, Bool enable);
extern tmLibdevErr_t pc16552DReadData(unitSelect_t portID, Address data);
extern tmLibdevErr_t pc16552DWriteData(unitSelect_t portID, Char data);
extern tmLibdevErr_t pc16552DUartConfig(unitSelect_t portID, tsaUartConfig_t command, Pointer value);
extern Bool pc16552DGetEvent(unitSelect_t portID, tsaUartConfigEvent_t *event);
#if defined(__cplusplus)
}
#endif
#endif /* _PC16552D_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -