/* Function for checking the current index and length of the RX buffer to determine if the buffer is full. If an event handler has been registered, the callback function will be executed..  */
static bool rx_buffer_overflowed(void)
/* Function for checking the current index and length of the RX buffer to determine if the buffer is full. If an event handler has been registered, the callback function will be executed..  */
static bool rx_buffer_overflowed(void)
{
    if (mp_rx_buffer == NULL || m_rx_received_count >= m_rx_buffer_length)
    {
        if (m_slip_event_handler != NULL)
        {
            hci_slip_evt_t event = {HCI_SLIP_RX_OVERFLOW, mp_rx_buffer, m_rx_received_count};
            m_slip_event_handler(event);
        }
        return true;
    }
    return false;
}