/** ****************************************************************************** * @file : KWireLess.h * @brief : Header for KWireLess.c file. * This file contains the common defines of the application. ****************************************************************************** */ #include "KMachine.h" #include #include "user.h" #include "radio/inc/sx126x-board.h" #ifndef __KWIRELESS_H__ #define __KWIRELESS_H__ typedef unsigned char uchar; /************************************************************************************************************************************** Demo ³ÌÐòÁ÷³Ì RadioEnableMaster=true ΪÖ÷»ú¶Ë£¬Ö÷»ú¶Ë·¢ËÍÒ»¸ö"PING"Êý¾ÝºóÇл»µ½½ÓÊÕ£¬µÈ´ý´Ó»ú·µ»ØµÄÓ¦´ð"PONG"Êý¾ÝLEDÉÁ˸ RadioEnableMaster=false Ϊ´Ó»ú¶Ë£¬´Ó»ú¶Ë½ÓÊÕµ½Ö÷»ú¶Ë·¢¹ýÀ´µÄ"PING"Êý¾ÝºóLEDÉÁ˸²¢·¢ËÍÒ»¸ö"PONG"Êý¾Ý×÷ΪӦ´ð ***************************************************************************************************************************************/ void SendPingMsg(void ); int KWireLessInit(bool bRadioEnableMaster); int KWireLessStart(void); void OnTxDone( void ); void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ); void OnTxTimeout( void ); void OnRxTimeout( void ); void OnRxError( void ); void LedToggle(void); typedef enum tag_KWStates { KW_PON, KW_UNINIT, KW_INITED, KW_UNCONFIGED, KW_CONFIGING, KW_CONFIGED, KW_READY, KW_STARTING, KW_OPERATION, KW_ERROR1, KW_ERROR2, KW_ERROR3, }KWStates; int KWMasterProc(void); int KWSlaveProc(void); int MkKwPkg(void* pPkg, int len); int KWSendPkg(void* pPkg, int len); int KWProcPkg(void); #endif ///* __KBUS_H__ */