A
alkid
Guest
C8051F320书面的源代码为C8051F120使用?无效Test_TX(无效){LED1 = LED2 = LED3 = LED4 = 1; / /清除状态带领的SPI_RW_Reg(WRITE_REG + SETUP_AW,(TX_AW - 2)); / /设置接收/发送地址宽度SPI_Write_Buf(WRITE_REG + TX_ADDR,TX_ADDRESS_, TX_AW); / /写入TX_Addr SPI_Write_Buf(WRITE_REG + RX_ADDR_P0,RX_ADDRESS_,RX_AW)/ /写RX_Addr,Pipe0 auto.ack SPI_Write_Buf(WR_TX_PLOAD,TX_PAYLOAD_,TX_PL_W); / /写TX有效载荷SPI_RW_Reg(WRITE_REG +状态,0x70) ; / /读取状态及明确的IRQ标志的SPI_RW_Reg(WRITE_REG + EN_AA,0x01的); / /启用自动应答pipe0 SPI_RW_Reg(WRITE_REG + EN_RXADDR,0X01); / /允许pipe0 SPI_RW_Reg(WRITE_REG + SETUP_RETR,0x0A返回); / /250μs+ 86μs,10重新传输... SPI_RW_Reg(WRITE_REG + RF_CH,40); / /通道40 SPI_RW_Reg(WRITE_REG +配置0x0E的); / / PWR_UP,华润(2bytes)PRIM:TX。 (SW1); / /等待,直到SW1发布LED1 = 0; / / LED1表示TX模式的EX0 = 1; / /允许外部中断}