?? nrf905.h
字號(hào):
typedef unsigned char uchar;
typedef unsigned int uint;
static char code com_on2[]= {0xff,0x00,0x01,0xaa,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x40};
static char code com_on3[]= {0xff,0x00,0x02,0xaa,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x40};
static char code com_off2[]= {0xff,0x00,0x01,0x55,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x40};
static char code com_off3[]= {0xff,0x00,0x02,0x55,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x40};
static char code com_up[]= {0xff,0xff,0x00,0x88,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x40};
static char code com_down[]= {0xff,0xff,0x00,0x11,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x40};
static char code com_statu1[]={0xff,0x00,0x00,0xa5,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x40};
static char code com_statu2[]={0xff,0x00,0x01,0xa5,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x40};
static char code com_statu3[]={0xff,0x00,0x02,0xa5,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x40};
sbit CSN=P1^0;
sbit SCLK=P1^1;
sbit DR=P1^2;
sbit AM=P1^3;
sbit CD=P1^4;
sbit PWR_UP=P1^6;
sbit TRX_CE=P1^7;
sbit DIN=P3^0;
sbit DOUT=P3^1;
sbit TXEN=P3^2;
/*
sbit CSN=P1^3;
sbit SCLK=P1^5;
sbit DR=P1^0;
sbit AM=P1^0;
sbit CD=P1^0;
sbit PWR_UP=P1^1;
sbit TRX_CE=P3^1;
sbit DIN=P1^6;
sbit DOUT=P1^7;
sbit TXEN=P1^2;
*/
uchar data NUM;
uchar data NUMA;
uchar data add[20];
void main(void);
void init(void);
void outdata(void);
void delayms(uint n);
void SPI_write(uchar a,uchar b);
void write(uchar a);
uchar SPI_read(uchar a);
uchar read(void);
void SPI_write4(uchar a,uchar b,uchar c,uchar d,uchar e);
void SPI_write_some(uchar a,uchar *p1,uchar num);
SPI_read_some(uchar a,uchar *p1,uchar num);
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -