1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Add conditional for rx_xn297.c

XN297 is near clone of nRF24L01, and it is only used by nrf24_cx10.c
This commit is contained in:
jflyper 2018-10-01 23:31:12 +09:00
parent 8980ba1065
commit d5aa7243ad
2 changed files with 8 additions and 0 deletions

View file

@ -26,6 +26,8 @@
#include "platform.h"
#if defined(USE_RX_XN297)
#include "common/crc.h"
#include "pg/rx.h"
@ -95,3 +97,4 @@ uint8_t XN297_WritePayload(uint8_t *data, int len, const uint8_t *rxAddr)
packet[RX_TX_ADDR_LEN + len + 1] = crc & 0xff;
return NRF24L01_WritePayload(packet, RX_TX_ADDR_LEN + len + 2);
}
#endif

View file

@ -180,3 +180,8 @@
#if defined(USE_GYRO_SPI_ICM20689) || defined(USE_GYRO_SPI_MPU6000) || defined(USE_GYRO_SPI_MPU6500) || defined(USE_GYRO_SPI_MPU9250)
#define USE_SPI_GYRO
#endif
// CX10 is a special case of SPI RX which requires XN297
#if defined(USE_RX_CX10)
#define USE_RX_XN297
#endif