#include "device/sx1281_driver/sx1281_header.h"
#include "bsp/uart.h"

extern void Error_Handler( void );


void SX1281_BSPInit( void )
{
    GpioInit( );
    // UartInit( );
    SpiInit( );
}


void HwSetLowPower( void )
{
    // SpiDeInit( );
    // // UartDeInit( );
    // GpioDeInit( );
    
    /* Enter Stop Mode */
    // HAL_PWREx_EnterSTOP2Mode( PWR_STOPENTRY_WFE );
}


#ifdef SX1281_VIEW
int fputc(int ch,FILE *f)
{
//采用轮询方式发送1字节数据，超时时间设置为无限等待
HAL_UART_Transmit(BSP_UART_GetHandle(BSP_UART_SX1281),(uint8_t *)&ch,1,HAL_MAX_DELAY);
return ch;
}
#endif