📄 main.c
字号:
/*------------------------------------------------------------------------------
; This file is part of the RLC instruction
; Copyright (c)
; Version: 1.0
;-------------------------------------------------------------------------------
; Filename:
; main.c
; Function:
;
; Author:
; pirate
;
; Writedate:
; Oct.15 2005
; Moddate(latest):
; Oct.15 2005
;-------------------------------------------------------------------------------
*/
//--------------------------------------
// Included files
//--------------------------------------
#include <reg52.h> //51head file
#include <intrins.h> //application function
#include ".\HEAD\dtype.h"
#include ".\HEAD\externf.h"
//--------------------------------------
// Local Definitions and Types
//--------------------------------------
/*******************************************************************************
/*
// Function: main control
//
//! Description:
//! - After a reset and power cycle the crystal is given time to
//! settle and then it comes out of reset and then the radio is
//! configured
//!
//! Inputs: None
//!
//! Returns: Void
/*
/*******************************************************************************
/*/
void main()
{
uchar i;
uchar j;
uchar bomb;
SP = 0x70;
//Uart_init();
//TR1 = 1;
//TR2 = 1;
nop(); //nop function
nop();
CalBaudrate(0xDC);
TR2 = 1;
bomb = UartReceiveChar();
TR2 = 0;
for(i = 0; i < 29; i++) //用这种方法可以很方便地计算出未知晶振频率的
{ //情况下,确定一波特率,所对应的计时器载入值
CalBaudrate(0xDC);
TR2 = 1;
//UartSendChar(0x99);
UartSendChar(bomb);
//UartSendChar(0x55);
TR2 = 0;
DelayXs(1); //delay 1 second
}
for(j = 0; j < 2; ++j)
{
test();
}
for(i=0;i<2;++i)
{
RlcChar(0x55);
j = i;
}
//shifting every bit of a char
shiftchar();
while(1);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -