/* Function for enabling the UART module when the SLIP layer is opened.  */
static uint32_t slip_uart_open(void)
/* Function for enabling the UART module when the SLIP layer is opened.  */
static uint32_t slip_uart_open(void)
{
    uint32_t err_code;
    app_uart_comm_params_t comm_params =
    {
        HCI_SLIP_UART_RX_PIN_NUMBER,
        HCI_SLIP_UART_TX_PIN_NUMBER,
        HCI_SLIP_UART_RTS_PIN_NUMBER,
        HCI_SLIP_UART_CTS_PIN_NUMBER,
        HCI_SLIP_UART_MODE,
        false,
        HCI_SLIP_UART_BAUDRATE
    };
    err_code = app_uart_init(&comm_params,
                             NULL,
                             slip_uart_eventhandler,
                             APP_IRQ_PRIORITY_LOW);
    if (err_code == NRF_SUCCESS)
    {
        m_current_state = SLIP_READY;
    }
    return err_code;
}