📄 uart.h
字号:
/*==================================================================================================
- Target : mega8
- Crystal : 7.3728Mhz
- Revision : Ver1.00
- Author : cqw
- Date : 08/08/2005
----------------------------------------------------------------------------------------------------
- Function explain :
----------------------------------------------------------------------------------------------------
- Modify : 暂无
--------------------------------------------------------------------------------------------------*/
#ifndef recorder_h
#define recorder_h
/*--------------------------------------------------------------------------------------------------
宏定义
--------------------------------------------------------------------------------------------------*/
#define McuID 0x01 // ID
#define PSEL_1 ( PORTD|=0x20 ) //
#define PSEL_0 ( PORTD&=~0x20 ) // 选择1020的SPI端口
#define Pclk_1 ( PORTB|=0x02 ) // 1020的PCLK引脚为1
#define Pclk_0 ( PORTB&=~0x02 ) // 1020的PCLK引脚为0
#define PData_1 ( PORTB|=0x01 ) // 1020的PData引脚为1
#define PData_0 ( PORTB&=~0x01 ) // 1020的PData引脚为0
#define PData ( PORTB&= 0x01 ) // 定义PData为1020的数据信号
#define Dclk ( PORTD&= 0x08 ) // 定义DCLK为1020的时钟信号
#define DIO_1 ( PORTD|=0x10 ) //1020的DIO引脚为1
#define DIO_0 ( PORTD&=~0x10 ) //1020的DIO引脚为0
/* Register addresses */
#define CC1020_MAIN 0x00
#define CC1020_INTERFACE 0x01
#define CC1020_RESET 0x02
#define CC1020_SEQUENCING 0x03
#define CC1020_FREQ_2A 0x04
#define CC1020_FREQ_1A 0x05
#define CC1020_FREQ_0A 0x06
#define CC1020_CLOCK_A 0x07
#define CC1020_FREQ_2B 0x08
#define CC1020_FREQ_1B 0x09
#define CC1020_FREQ_0B 0x0A
#define CC1020_CLOCK_B 0x0B
#define CC1020_VCO 0x0C
#define CC1020_MODEM 0x0D
#define CC1020_DEVIATION 0x0E
#define CC1020_AFC_CONTROL 0x0F
#define CC1020_FILTER 0x10
#define CC1020_VGA1 0x11
#define CC1020_VGA2 0x12
#define CC1020_VGA3 0x13
#define CC1020_VGA4 0x14
#define CC1020_LOCK 0x15
#define CC1020_FRONTEND 0x16
#define CC1020_ANALOG 0x17
#define CC1020_BUFF_SWING 0x18
#define CC1020_BUFF_CURRENT 0x19
#define CC1020_PLL_BW 0x1A
#define CC1020_CALIBRATE 0x1B
#define CC1020_PA_POWER 0x1C
#define CC1020_MATCH 0x1D
#define CC1020_PHASE_COMP 0x1E
#define CC1020_GAIN_COMP 0x1F
#define CC1020_POWERDOWN 0x20
#define CC1020_TEST1 0x21
#define CC1020_TEST2 0x22
#define CC1020_TEST3 0x23
#define CC1020_TEST4 0x24
#define CC1020_TEST5 0x25
#define CC1020_TEST6 0x26
#define CC1020_TEST7 0x27
#define CC1020_STATUS 0x40
#define CC1020_RESET_DONE 0x41
#define CC1020_RSSI 0x42
#define CC1020_AFC 0x43
#define CC1020_GAUSS_FILTER 0x44
#define CC1020_STATUS1 0x45
#define CC1020_STATUS2 0x46
#define CC1020_STATUS3 0x47
#define CC1020_STATUS4 0x48
#define CC1020_STATUS5 0x49
#define CC1020_STATUS6 0x4A
#define CC1020_STATUS7 0x4B
#endif
/*--------------------------------------------------------------------------------------------------
0ooo
ooo0 ( )
( ) ) /
\ ( (_/
\_)
--------------------------------------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -