MR16/sx1281-driver-c/sx1281_header.c
2025-11-30 11:38:11 +08:00

33 lines
589 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "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