/*! * This function is used to transmit data * * */ void SI4463_Transmit(U8 * Packet,U8 length) { static SEGMENT_VARIABLE(lPktSending, U8) = 0u; uint8 temp; // Check if the radio packet sent successfully if (TRUE == gRadio_CheckTransmitted()) { /* Clear Packet Sending flag */ temp = 2; UartSendByte(&temp,1); lPktSending = 0u; } else { temp = 3; UartSendByte(&temp,1); } //lPktSending = 0; if ((0u == lPktSending)) { uint8 flag=vSampleCode_SendFixPacket((U8 *)Packet,length); UartSendByte(&flag,1); if (TRUE == flag) { //lPer_SecCntr = 0u; /* Set Packet Sending flag */ lPktSending = 1u; } } }
/** * Demo Application Poll-Handler * * @note This function must be called periodically. * */ void DemoApp_Pollhandler() { static SEGMENT_VARIABLE(lPktSending, U8, SEG_XDATA) = 0u; // Check if the radio packet sent successfully if (TRUE == gRadio_CheckTransmitted()) { switch (fixRadioPacket[6u]) { case '1': vHmi_ChangeLedState(eHmi_Led1_c, eHmi_LedBlinkOnce_c); break; case '2': vHmi_ChangeLedState(eHmi_Led2_c, eHmi_LedBlinkOnce_c); break; case '3': vHmi_ChangeLedState(eHmi_Led3_c, eHmi_LedBlinkOnce_c); break; case '4': vHmi_ChangeLedState(eHmi_Led4_c, eHmi_LedBlinkOnce_c); break; } /* Clear Packet Sending flag */ lPktSending = 0u; } if ((lPer_SecCntr >= PACKET_SEND_INTERVAL) && (0u == lPktSending)) { if (TRUE == vSampleCode_SendFixPacket()) { lPer_SecCntr = 0u; /* Set Packet Sending flag */ lPktSending = 1u; } } }