/* The function waits for the transmission to complete. */
static bool gzp_tx_packet(const uint8_t *tx_packet, uint8_t length, uint8_t pipe)
/* The function waits for the transmission to complete. */
static bool gzp_tx_packet(const uint8_t *tx_packet, uint8_t length, uint8_t pipe)
{
    tx_complete = false;
    tx_success = false;
    if(nrf_gzll_add_packet_to_tx_fifo(pipe,(uint8_t *)tx_packet, length))
    {
        while(tx_complete == false)
        {
            __WFI();
        }
        return tx_success;
    }
    else
    {
        return false;
    }
}