| | |
| | | * \brief Process the IRQ if handled by the driver |
| | | */ |
| | | void SX126xProcessIrqs( void ); |
| | | |
| | | |
| | | #include "main.h" |
| | | extern LPTIM_HandleTypeDef hlptim1; |
| | | uint16_t tt3[10]; |
| | | void SX126xInit( DioIrqHandler dioIrq ) |
| | | { |
| | | tt3[0] = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | SX126xReset( ); |
| | | tt3[1] = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | SX126xWakeup( ); |
| | | tt3[2] = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | SX126xSetStandby( STDBY_RC ); |
| | | |
| | | tt3[3] = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | #ifdef USE_TCXO |
| | | CalibrationParams_t calibParam; |
| | | |
| | |
| | | SX126xCalibrate( calibParam ); |
| | | |
| | | #endif |
| | | |
| | | tt3[4] = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | SX126xSetDio2AsRfSwitchCtrl( true ); |
| | | tt3[5] = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | OperatingMode = MODE_STDBY_RC; |
| | | } |
| | | |