/* Function for handling the reception of a SLIP end byte. If the number of bytes received is greater than zero it will call m_slip_event_handler with number of bytes received and invalidate the mp_rx_buffer to protect against data corruption. No new bytes can be received until a new RX buffer is supplied.  */
static void handle_slip_end(void)
/* Function for handling the reception of a SLIP end byte. If the number of bytes received is greater than zero it will call m_slip_event_handler with number of bytes received and invalidate the mp_rx_buffer to protect against data corruption. No new bytes can be received until a new RX buffer is supplied.  */
static void handle_slip_end(void)
{
    if (m_rx_received_count > 0)
    {
        if (m_slip_event_handler != NULL)
        {
            hci_slip_evt_t event = {HCI_SLIP_RX_RDY, mp_rx_buffer, m_rx_received_count};
            m_rx_received_count  = 0;
            mp_rx_buffer         = NULL;
            m_slip_event_handler(event);
        }
    }
}