📄 commdrv.h
字号:
/*/////////////////////////////////////////////////////////////////////////////
File Name : CommDrv.h
Author : Rene Trenado
Location : Motorola Applications Lab, Baja California
Date Created : July 2000
Current Revision : 0.0
Notes : This file contains comm port specific definitions
/////////////////////////////////////////////////////////////////////////////*/
#ifndef _H_COMMDRV_
#define _H_COMMDRV_
#include "Notation.h"
#define BAUDS_2400 3 // 8 Divisor
#define BAUDS_4800 2 // 4 Divisor
#define BAUDS_9600 1 // 2 Divisor
#define BAUDS_19200 0 // 1 Divisor
typedef enum {
ENABLE_RX = 0x04, // enable receiver
ENABLE_TX = 0x08, // enable transmitter
ENABLE_RX_EVENTS = 0x20, // enable receiver interrupts
ENABLE_TX_EVENTS = 0x80 // enable transmitter interrupts
} CommOptions;
#define SCC1 *((BYTE *)0x13) // Status and contro registers
#define SCC2 *((BYTE *)0x14)
#define SCS1 *((volatile BYTE *)0x16)
#define SCDR *((volatile BYTE *)0x18)
#define SCBR *((BYTE *)0x19)
extern void @interrupt UartRxISR (void); // export ISR
//////////////// API Functions to Export ////////////////////
void OpenComm (register BYTE BaudRate, register CommOptions Options);
void CloseComm (void);
void CommEventProc (EventProc Proc);
void WriteComm (BYTE c);
void WriteCommStr (char* string);
BYTE ReadComm (void);
void UseDefaultCommProc (void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -