File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ bool AP_Radio::init(void)
168
168
driver = NEW_NOTHROW AP_Radio_beken (*this );
169
169
break ;
170
170
#endif
171
- #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_SKYVIPER_F412
171
+ #if AP_RADIO_AUTO_ENABLED
172
172
case RADIO_TYPE_AUTO:
173
173
// auto-detect between cc2500 and beken radios
174
174
#if AP_RADIO_CC2500_ENABLED
@@ -182,7 +182,7 @@ bool AP_Radio::init(void)
182
182
}
183
183
#endif
184
184
break ;
185
- #endif // CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_SKYVIPER_F412
185
+ #endif // AP_RADIO_AUTO_ENABLED
186
186
default :
187
187
break ;
188
188
}
Original file line number Diff line number Diff line change 21
21
#ifndef AP_RADIO_BK2425_ENABLED
22
22
#define AP_RADIO_BK2425_ENABLED AP_RADIO_BACKEND_DEFAULT_ENABLED
23
23
#endif
24
+
25
+ // tries both CC2500 and BK2425 drivers:
26
+ #ifndef AP_RADIO_AUTO_ENABLED
27
+ #define AP_RADIO_AUTO_ENABLED 0
28
+ #endif // AP_RADIO_AUTO_ENABLED
Original file line number Diff line number Diff line change @@ -20,14 +20,13 @@ extern const AP_HAL::HAL& hal;
20
20
#include < hal.h>
21
21
#endif
22
22
23
- // This assumes we are using ChiBios instead of the pixhawk o/s for accessing GPIO
24
- #if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_SKYVIPER_F412
25
23
#define BEKEN_SELECT () (dev->set_chip_select (true ))
26
24
#define BEKEN_DESELECT () (dev->set_chip_select (false ))
27
25
#define BEKEN_CE_HIGH () (palSetLine(HAL_GPIO_PIN_RADIO_CE)) // (hal.gpio->write(HAL_CHIBIOS_GPIO_RADIO_CE, 1))
28
26
#define BEKEN_CE_LOW () (palClearLine(HAL_GPIO_PIN_RADIO_CE)) // (hal.gpio->write(HAL_CHIBIOS_GPIO_RADIO_CE, 0))
29
27
#define BEKEN_PA_HIGH () (palSetLine(HAL_GPIO_PIN_RADIO_PA_CTL)) // (hal.gpio->write(HAL_CHIBIOS_GPIO_RADIO_PA_CTL, 1))
30
28
#define BEKEN_PA_LOW () (palClearLine(HAL_GPIO_PIN_RADIO_PA_CTL)) // (hal.gpio->write(HAL_CHIBIOS_GPIO_RADIO_PA_CTL, 0))
29
+
31
30
#if SUPPORT_BK_DEBUG_PINS
32
31
#define DEBUG1_HIGH () (palSetLine(HAL_GPIO_PIN_DEBUG1))
33
32
#define DEBUG1_LOW () (palClearLine(HAL_GPIO_PIN_DEBUG1))
@@ -39,9 +38,6 @@ extern const AP_HAL::HAL& hal;
39
38
#define DEBUG2_HIGH () do {} while (0 )
40
39
#define DEBUG2_LOW () do {} while (0 )
41
40
#endif
42
- #else
43
- #error This configuration is not supported.
44
- #endif
45
41
46
42
// --------------------------------------------------------------------
47
43
// Radio initialisation tables
You can’t perform that action at this time.
0 commit comments