2024-12-10 20:11:28 +08:00
|
|
|
/*
|
|
|
|
* user_main.h
|
|
|
|
*
|
|
|
|
* Created on: Nov 11, 2024
|
|
|
|
* Author: 10425
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "user.h"
|
|
|
|
|
|
|
|
void user_main()
|
|
|
|
{
|
|
|
|
user_init();
|
2024-12-27 18:16:23 +08:00
|
|
|
rn8209d_Init();
|
|
|
|
|
|
|
|
bsp_StartAutoTimer(0,1000);
|
|
|
|
uint16_t tmp16 =0,tmp162=0;
|
|
|
|
uint8_t tmp1;
|
2024-12-10 20:11:28 +08:00
|
|
|
while(1)
|
|
|
|
{
|
2024-12-27 18:16:23 +08:00
|
|
|
if(bsp_CheckTimer(0))
|
|
|
|
{
|
|
|
|
HAL_GPIO_TogglePin (LED_GPIO_Port,LED_Pin);
|
|
|
|
// tmp16 = READ_SPI(0x00,2);
|
|
|
|
// sprintf(Tx1_Buff,"%d",tmp16);
|
|
|
|
rn8209_ReadAll();
|
|
|
|
// tmp16 = READ_SPI(WAVE_IF,1);
|
|
|
|
// tmp1 = READ_SPI(ADIF,1);
|
|
|
|
// sprintf(Tx3_Buff,"WAVE_IF:0x%x ADIF:0x%x\r\n",tmp16,tmp1);
|
|
|
|
// HAL_UART_Transmit_DMA(&huart3,Tx3_Buff,strlen(Tx3_Buff));
|
|
|
|
}
|
|
|
|
|
|
|
|
if(usart1_count>0)
|
|
|
|
{
|
|
|
|
usart1_count = 0;
|
|
|
|
}
|
|
|
|
if(usart3_count>0)
|
|
|
|
{
|
|
|
|
Usart_Receive();
|
|
|
|
usart3_count = 0;
|
|
|
|
}
|
2024-12-10 20:11:28 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|