金牌会员
 
- 积分
- 1163
- 金钱
- 1163
- 注册时间
- 2019-10-22
- 在线时间
- 226 小时
|
4金钱
本帖最后由 Xiuer666 于 2023-3-24 11:20 编辑
static RadioCallbacks_t* RadioCallbacks;
void SX1280Init( RadioCallbacks_t *callbacks )
{
RadioCallbacks = callbacks;
}
typedef struct
{
void ( *txDone )( void );
void ( *rxDone )( void );
void ( *rxSyncWordDone )( void );
void ( *rxHeaderDone )( void );
void ( *txTimeout )( void );
void ( *rxTimeout )( void );
void ( *rxError )( IrqErrorCode_t errCode );
void ( *rangingDone )( IrqRangingCode_t val );
void ( *cadDone )( bool cadFlag );
}RadioCallbacks_t;
RadioCallbacks_t Callbacks =
{
&OnTxDone, // txDone
&OnRxDone, // rxDone
NULL, // syncWordDone
NULL, // headerDone
&OnTxTimeout, // txTimeout
&OnRxTimeout, // rxTimeout
&OnRxError, // rxError
NULL, // rangingDone
NULL, // cadDone
};void OnTxDone( void )
{
AppState = APP_TX;
}
void OnRxDone( void )
{
AppState = APP_RX;
}
void OnTxTimeout( void );
void OnRxTimeout( void );
void OnRxError( IrqErrorCode_t );
|
|