Пример #1
0
SOL_API bool
sol_pin_mux_select_mux(const char *_board)
{
    if (!_board || _board[0] == '\0')
        return true;

    if (mux) {
        if (streq(_board, mux->plat_name))
            return true;

        if (mux->shutdown)
            mux->shutdown();

        mux = NULL;
    }

    // 'load_mux' only returns error if found a mux but failed to setup it.
    if (_find_mux(_board) || _load_mux(_board)) {
        if (mux && mux->init && mux->init())
            return false;

        return true;
    }

    return false;
}
Пример #2
0
SOL_API bool
sol_pin_mux_select_mux(const char *_board)
{
    if (!_board || _board[0] == '\0')
        return true;

    if (mux && streq(_board, mux->plat_name))
        return true;

    // it only returns error if found a mux but failed to setup it.
    return _find_mux(_board) ? true : _load_mux(_board);
}