summarylogtreecommitdiffstats
path: root/lib_i2c-gpio-custom-filter.sh
blob: b8780fb8ab45f428876f015ce063b73441bab38b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
. /usr/lib/gpio-present.sh

check_gpio_bus_configuration () {
    ERRORS=0
    shift;
    if ! gpio_present $1; then
        echo "SDA GPIO ($1) not detected" >&2
        ERRORS="$(($ERRORS+1))"
    fi
    shift;
    if ! gpio_present $1; then
        echo "SCL GPIO ($1) not detected" >&2
        ERRORS="$(($ERRORS+1))"
    fi
    return "$ERRORS"
}