代码搜索结果
找到约 10,000 项符合
UART 的代码
uart.c
#include "pic.h"
#include "uart.h"
void uart_send_byte(unsigned char dat)
{
TXREG = dat;
while(1)
{
if(TXIF==1)
break;
CLRWDT();
}
}
uart.h
/**************************************************************************
* C O N S T A N T S *
*******************************************
uart.c
//=============================================================
// 文件名称: UART.c
// 功能描述: UART发送和接收子程序
//维护记录:
// 2007.01.16 V1.0 by wangtao
//========================
uart.c
#include "..\startup\def.h"
#include "..\startup\44b.h"
#include "..\ucos-ii\includes.h"
#include "isr.h"
#include "uart.h"
OS_EVENT *Uart0_Rev_mbox=NULL; //Uart0 receive ma
uart.h
#ifndef __UART_H__
#define __UART_H__
#define UART0_REVBUFFER_SIZE 1024
#define UART1_REVBUFFER_SIZE 1024
void OSInitUart(void);
int OSReadUart0(U8 data[], int num, int ntimeout);
void Ope
uart.c
#include "public.h"
#include "p_main.H"
/* LF2407.H 的外部变量 */
/*SCI串行口状态寄存器*/
extern unsigned int *SCICTL2;
/*SCI串行输出缓冲寄存器*/
extern unsigned int *SCITXBUF;
extern unsigned int *PEDATDIR;
uart.c
#include
#define uchar unsigned char
uchar a,flag;
void main()
{
TMOD=0x20;
TH1=0xfd;
TL1=0xfd;
TR1=1;
SM0=0;
SM1=1;
REN=1;
EA=1;
ES=1;
PCON=0x80;
while(1)
{
if