?? serial.h
字號:
/*----------------------------------------------------------------------------
* Name: serial.h
* Purpose: serial port handling
* Version: V1.00
*----------------------------------------------------------------------------
* This file is part of the uVision/ARM development tools.
* This software may only be used under the terms of a valid, current,
* end user licence from KEIL for a compatible version of KEIL software
* development tools. Nothing else gives you the right to use it.
*
* Copyright (c) 2005-2007 Keil Software.
*---------------------------------------------------------------------------*/
#include "type.h"
#define SER_BUF_SIZE 64
//#define SER_BUF_SIZE 256
/*----------------------------------------------------------------------------
buffer handling related prototypes
*---------------------------------------------------------------------------*/
typedef struct {
int in;
int out;
char *buf;
} buf_t;
void buf_Init (buf_t *buf, char *buffer);
BOOL buf_Put (buf_t *buf, char c);
BOOL buf_Get (buf_t *buf, char *c);
int buf_Free (buf_t *buf);
/*----------------------------------------------------------------------------
Serial interface related prototypes
*---------------------------------------------------------------------------*/
extern void ser_SetLineCoding (DWORD baudrate, BYTE databits, BYTE parity, BYTE stopbits);
extern void ser_Init (void);
extern BYTE ser_GetMSR (void);
extern BYTE ser_GetLSR (void);
extern int ser_GetChar (void);
extern int ser_PutChar (int);
extern int ser_PutString (const char *);
extern BOOL ser_AvailChar (void);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -