📄 serial.h
字号:
/*****************************************************
* PHR-001 (PINO-class Humanoid Robot 001) Behavior Command Program
*
* serial.h
*
* Copyright (C) 2001 Kitano Symbiotic Systems Project,
* Japan Science and Technology Corp.
*
* This file is part of PHR-001.
*
* PHR-001 is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* PHR-001 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PHR-001; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*********************************************************************/
#ifndef __SIO_H__
#define __SIO_H__
#define TxREADY (SCI2.SC1SSR.WORD & 0x0080)
#define RxREADY (SCI2.SC1SSR.WORD & 0x0040)
#define ClearTxREADY (SCI2.SC1SSR.WORD &= ~0x0080)
#define ClearRxREADY (SCI2.SC1SSR.WORD &= ~0x0040)
#define ACK 0x06
#define NAK 0x15
#define CAN 0x18
#define SOH 0x01
#define STX 0x02
#define EOT 0x04
#define EOF 0x1A
#define SYN 0x16
#define DLE 0x10
#define XOFF 0x11
#define XON 0x13
/************************/
/* 僾儘僩僞僀僾愰尵 */
/************************/
void wait(ulong n);
void waits(ulong n);
void iniSCI2(ulong bps);
void BufFlush(void);
void s_putc(schar c);
void s_puts(schar* c);
uchar s_getc(void);
void get_cmd(char *cmd);
void s_putByte(uchar n);
void s_putWord(uint n);
void s_putLong(ulong n);
void s_putDec(uint n);
void mdump(ulong addr,ulong len,uchar typ);
void Xmodem(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -