新手入门
- 积分
- 10
- 金钱
- 10
- 注册时间
- 2016-4-8
- 在线时间
- 7 小时
|
楼主 |
发表于 2016-4-9 10:50:00
|
显示全部楼层
void TX_Mode(uchar * BUF)
{
CE = 0;
SPI_Write_Buf(WRITE_REG + TX_ADDR, TX_ADDRESS, TX_ADR_WIDTH);
SPI_Write_Buf(WRITE_REG + RX_ADDR_P0, TX_ADDRESS, TX_ADR_WIDTH);
SPI_Write_Buf(WR_TX_PLOAD, BUF, TX_PLOAD_WIDTH);
SPI_RW_Reg(WRITE_REG + EN_AA, 0x00);
SPI_RW_Reg(WRITE_REG + EN_RXADDR, 0x00);
SPI_RW_Reg(WRITE_REG + SETUP_RETR, 0x00);
SPI_RW_Reg(WRITE_REG + RF_CH, 73);
SPI_RW_Reg(WRITE_REG + RF_SETUP, 0x07);
SPI_RW_Reg(WRITE_REG + CONFIG, 0x0e);
CE = 1;
}
这是发送 |
|