|
@@ -82,29 +82,29 @@ uint8_t READ_BOARD_SPI_MISO(void)
|
|
}
|
|
}
|
|
|
|
|
|
//---------------------------射频驱动IO部分---------------------
|
|
//---------------------------射频驱动IO部分---------------------
|
|
-void RF_PAN3031_IRQ_H(void)
|
|
|
|
|
|
+void RF_PAN3029_IRQ_H(void)
|
|
{
|
|
{
|
|
- GPIO_WriteBit(RF_PAN3031_IRQ, BOARD_PIN_H);
|
|
|
|
|
|
+ GPIO_WriteBit(RF_PAN3029_IRQ, BOARD_PIN_H);
|
|
}
|
|
}
|
|
-void RF_PAN3031_IRQ_L(void)
|
|
|
|
|
|
+void RF_PAN3029_IRQ_L(void)
|
|
{
|
|
{
|
|
- GPIO_WriteBit(RF_PAN3031_IRQ, BOARD_PIN_L);
|
|
|
|
|
|
+ GPIO_WriteBit(RF_PAN3029_IRQ, BOARD_PIN_L);
|
|
}
|
|
}
|
|
-void RF_PAN3031_NRST_H(void)
|
|
|
|
|
|
+void RF_PAN3029_NRST_H(void)
|
|
{
|
|
{
|
|
- GPIO_WriteBit(RF_PAN3031_NRST, BOARD_PIN_H);
|
|
|
|
|
|
+ GPIO_WriteBit(RF_PAN3029_NRST, BOARD_PIN_H);
|
|
}
|
|
}
|
|
-void RF_PAN3031_NRST_L(void)
|
|
|
|
|
|
+void RF_PAN3029_NRST_L(void)
|
|
{
|
|
{
|
|
- GPIO_WriteBit(RF_PAN3031_NRST, BOARD_PIN_L);
|
|
|
|
|
|
+ GPIO_WriteBit(RF_PAN3029_NRST, BOARD_PIN_L);
|
|
}
|
|
}
|
|
-void RF_PAN3031_IO3_H(void)
|
|
|
|
|
|
+void RF_PAN3029_IO3_H(void)
|
|
{
|
|
{
|
|
- GPIO_WriteBit(RF_PAN3031_IO3, BOARD_PIN_H);
|
|
|
|
|
|
+ GPIO_WriteBit(RF_PAN3029_IO3, BOARD_PIN_H);
|
|
}
|
|
}
|
|
-void RF_PAN3031_IO3_L(void)
|
|
|
|
|
|
+void RF_PAN3029_IO3_L(void)
|
|
{
|
|
{
|
|
- GPIO_WriteBit(RF_PAN3031_IO3, BOARD_PIN_L);
|
|
|
|
|
|
+ GPIO_WriteBit(RF_PAN3029_IO3, BOARD_PIN_L);
|
|
}
|
|
}
|
|
void RF_EXT_PA_RE_H(void)
|
|
void RF_EXT_PA_RE_H(void)
|
|
{
|
|
{
|
|
@@ -122,9 +122,9 @@ void RF_EXT_PA_TE_L(void)
|
|
{
|
|
{
|
|
GPIO_WriteBit(RF_EXTPA_TE, BOARD_PIN_L);
|
|
GPIO_WriteBit(RF_EXTPA_TE, BOARD_PIN_L);
|
|
}
|
|
}
|
|
-uint8_t READ_RF_PAN3031_IRQ(void)
|
|
|
|
|
|
+uint8_t READ_RF_PAN3029_IRQ(void)
|
|
{
|
|
{
|
|
- return GPIO_ReadInputDataBit(RF_PAN3031_IRQ);
|
|
|
|
|
|
+ return GPIO_ReadInputDataBit(RF_PAN3029_IRQ);
|
|
}
|
|
}
|
|
void EXTI0_IRQHandler(void)
|
|
void EXTI0_IRQHandler(void)
|
|
{
|
|
{
|
|
@@ -132,7 +132,7 @@ void EXTI0_IRQHandler(void)
|
|
{
|
|
{
|
|
/* Clear the EXTI line 1 pending bit */
|
|
/* Clear the EXTI line 1 pending bit */
|
|
EXTI_ClearITPendingBit(EXTI_Line0);
|
|
EXTI_ClearITPendingBit(EXTI_Line0);
|
|
- if (READ_RF_PAN3031_IRQ())
|
|
|
|
|
|
+ if (READ_RF_PAN3029_IRQ())
|
|
{
|
|
{
|
|
gpioCallback(1);
|
|
gpioCallback(1);
|
|
}
|
|
}
|
|
@@ -146,10 +146,10 @@ void myRadio_gpio_irq_init()
|
|
EXTI_InitTypeDef EXTI_InitStructure;
|
|
EXTI_InitTypeDef EXTI_InitStructure;
|
|
GPIO_InitTypeDef GPIO_InitStructure;
|
|
GPIO_InitTypeDef GPIO_InitStructure;
|
|
|
|
|
|
- GPIO_InitStructure.GPIO_Pin = RF_PAN3031_IRQ_PIN;
|
|
|
|
|
|
+ GPIO_InitStructure.GPIO_Pin = RF_PAN3029_IRQ_PIN;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
|
- GPIO_Init(RF_PAN3031_IRQ_PORT, &GPIO_InitStructure);
|
|
|
|
|
|
+ GPIO_Init(RF_PAN3029_IRQ_PORT, &GPIO_InitStructure);
|
|
|
|
|
|
EXTI_ClearITPendingBit(EXTI_Line0);
|
|
EXTI_ClearITPendingBit(EXTI_Line0);
|
|
EXTI_InitStructure.EXTI_Line = EXTI_Line0;
|
|
EXTI_InitStructure.EXTI_Line = EXTI_Line0;
|
|
@@ -219,22 +219,22 @@ void myRadio_gpio_init(RADIO_GPIO_CALLBACK cb)
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_Init(BOARD_PORT_SPI_CSN, &GPIO_InitStructure);
|
|
GPIO_Init(BOARD_PORT_SPI_CSN, &GPIO_InitStructure);
|
|
|
|
|
|
- GPIO_InitStructure.GPIO_Pin = RF_PAN3031_IRQ_PIN;
|
|
|
|
|
|
+ GPIO_InitStructure.GPIO_Pin = RF_PAN3029_IRQ_PIN;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
- GPIO_Init(RF_PAN3031_IRQ_PORT, &GPIO_InitStructure);
|
|
|
|
- GPIO_InitStructure.GPIO_Pin = RF_PAN3031_NRST_PIN;
|
|
|
|
|
|
+ GPIO_Init(RF_PAN3029_IRQ_PORT, &GPIO_InitStructure);
|
|
|
|
+ GPIO_InitStructure.GPIO_Pin = RF_PAN3029_NRST_PIN;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
- GPIO_Init(RF_PAN3031_NRST_PORT, &GPIO_InitStructure);
|
|
|
|
- GPIO_InitStructure.GPIO_Pin = RF_PAN3031_IO3_PIN;
|
|
|
|
|
|
+ GPIO_Init(RF_PAN3029_NRST_PORT, &GPIO_InitStructure);
|
|
|
|
+ GPIO_InitStructure.GPIO_Pin = RF_PAN3029_IO3_PIN;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
- GPIO_Init(RF_PAN3031_IO3_PORT, &GPIO_InitStructure);
|
|
|
|
- GPIO_InitStructure.GPIO_Pin = RF_PAN3031_IO11_PIN;
|
|
|
|
|
|
+ GPIO_Init(RF_PAN3029_IO3_PORT, &GPIO_InitStructure);
|
|
|
|
+ GPIO_InitStructure.GPIO_Pin = RF_PAN3029_IO11_PIN;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
|
- GPIO_Init(RF_PAN3031_IO11_PORT, &GPIO_InitStructure);
|
|
|
|
|
|
+ GPIO_Init(RF_PAN3029_IO11_PORT, &GPIO_InitStructure);
|
|
|
|
|
|
GPIO_InitStructure.GPIO_Pin = RF_EXTPA_RE_PIN;
|
|
GPIO_InitStructure.GPIO_Pin = RF_EXTPA_RE_PIN;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
|
|
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
|
|
@@ -246,7 +246,7 @@ void myRadio_gpio_init(RADIO_GPIO_CALLBACK cb)
|
|
GPIO_Init(RF_EXTPA_TE_PORT, &GPIO_InitStructure);
|
|
GPIO_Init(RF_EXTPA_TE_PORT, &GPIO_InitStructure);
|
|
|
|
|
|
BOARD_SPI_NSS_H();
|
|
BOARD_SPI_NSS_H();
|
|
- RF_PAN3031_NRST_H();
|
|
|
|
|
|
+ RF_PAN3029_NRST_H();
|
|
myRadio_gpio_irq_init();
|
|
myRadio_gpio_irq_init();
|
|
gpioCallback = cb;
|
|
gpioCallback = cb;
|
|
}
|
|
}
|