📄 s12_sci.h
字号:
//=============================================================================
// File: S12_SCI.H - V1.00
// Rem.: The ACPRD Project Page on the Web -> http://hc12web.de/acprd
//=============================================================================
#ifndef __S12_SCI_H
#define __S12_SCI_H
//-- SCI Bit Mask Definitions -------------------------------------------------
// Bits in SCIxCR1:
#define BM_LOOPS 0x80
#define BM_SCISWAI 0x40
#define BM_RSRC 0x20
#define BM_M 0x10
#define BM_WAKE 0x08
#define BM_ILT 0x04
#define BM_PE 0x02
#define BM_PT 0x01
// Bits in SCIxCR2:
#define BM_TIE 0x80
#define BM_TCIE 0x40
#define BM_RIE 0x20
#define BM_ILIE 0x10
#define BM_TE 0x08
#define BM_RE 0x04
#define BM_RWU 0x02
#define BM_SBK 0x01
// Bits in SCIxSR1:
#define BM_TDRE 0x80
#define BM_TC 0x40
#define BM_RDRF 0x20
#define BM_IDLE 0x10
#define BM_OR 0x08
#define BM_NF 0x04
#define BM_FE 0x02
#define BM_PF 0x01
// Bits in SCIxSR2:
#define BM_SBK13 0x04
#define BM_TXDIR 0x02
#define BM_RAF 0x01
//-- Function Prototypes ------------------------------------------------------
void initSCI0(UINT16 bauddiv);
UINT8 getSCI0(void);
void putSCI0(UINT8 c);
void initSCI1(UINT16 bauddiv);
UINT8 getSCI1(void);
void putSCI1(UINT8 c);
#endif //__S12_SCI_H ==========================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -