PD0 pin always high, choose PA2 as radio debugpins.
#define BSP_PIND_3 GPIO_PIN_3 //!< PD3 -- slot -RF1.6
#define BSP_PIND_2 GPIO_PIN_2 //!< PD2 -- fsm -RF1.8
#define BSP_PIND_1 GPIO_PIN_1 //!< PD1 -- task -RF1.10
-#define BSP_PIND_0 GPIO_PIN_0 //!< PD0 -- radio -RF1-12
-
+#define BSP_PINA_2 GPIO_PIN_2 //!< PA2 -- radio -RF1-12
//=========================== variables =======================================
//=========================== prototypes ======================================
@@ -35,11 +34,11 @@ void bspDBpinToggle(uint32_t base,uint8_t ui8Pin);
//=========================== public ==========================================
void debugpins_init(void) {
- GPIOPinTypeGPIOOutput(BSP_PINA_BASE, BSP_PINA_4 | BSP_PINA_5);
- GPIOPinTypeGPIOOutput(BSP_PIND_BASE, BSP_PIND_3 | BSP_PIND_2 | BSP_PIND_1 | BSP_PIND_0);
+ GPIOPinTypeGPIOOutput(BSP_PINA_BASE, BSP_PINA_2 | BSP_PINA_4 | BSP_PINA_5);
+ GPIOPinTypeGPIOOutput(BSP_PIND_BASE, BSP_PIND_3 | BSP_PIND_2 | BSP_PIND_1);
- GPIOPinWrite(BSP_PINA_BASE, (BSP_PINA_4 | BSP_PINA_5), 0x00);
- GPIOPinWrite(BSP_PIND_BASE, (BSP_PIND_3 | BSP_PIND_2 | BSP_PIND_1 | BSP_PIND_0), 0);
+ GPIOPinWrite(BSP_PINA_BASE, (BSP_PINA_2 | BSP_PINA_4 | BSP_PINA_5), 0x00);
+ GPIOPinWrite(BSP_PIND_BASE, (BSP_PIND_3 | BSP_PIND_2 | BSP_PIND_1), 0);
}
// PA4
@@ -99,13 +98,13 @@ void debugpins_isr_set(void) {
// PD0
void debugpins_radio_toggle(void) {
- bspDBpinToggle(BSP_PIND_BASE, BSP_PIND_0);
+ bspDBpinToggle(BSP_PINA_BASE, BSP_PINA_2);
}
void debugpins_radio_clr(void) {
- GPIOPinWrite(BSP_PIND_BASE, BSP_PIND_0, 0);
+ GPIOPinWrite(BSP_PINA_BASE, BSP_PINA_2, 0);
}
void debugpins_radio_set(void) {
- GPIOPinWrite(BSP_PIND_BASE, BSP_PIND_0, BSP_PIND_0);
+ GPIOPinWrite(BSP_PINA_BASE, BSP_PINA_2, BSP_PINA_2);
}
//------------ private ------------//
