Packages
circuits_gpio
2.0.0-pre.0
2.3.0
2.2.0
2.1.3
2.1.2
retired
2.1.1
retired
2.1.0
retired
2.0.2
retired
2.0.1
retired
2.0.0
retired
2.0.0-pre.6
retired
2.0.0-pre.5
retired
2.0.0-pre.4
retired
2.0.0-pre.3
retired
2.0.0-pre.2
retired
2.0.0-pre.1
retired
2.0.0-pre.0
retired
1.2.2
1.2.1
1.2.0
1.1.0
1.0.1
1.0.0
0.4.8
0.4.7
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.1
0.3.0
0.2.0
0.1.0
Use GPIOs in Elixir
Retired package: Release invalid - Use v2.0.0 or later
Current section
Files
Jump to
Current section
Files
c_src/detect_target.sh
#!/bin/sh
# SPDX-FileCopyrightText: 2018 Frank Hunleth, Mark Sebald, Matt Ludwigs
#
# SPDX-License-Identifier: Apache-2.0
#
# Detect the platform and output -D flags for use in compilation
#
if [ -z "$CC" ]; then
CC=cc
fi
#
# Raspberry Pi check
#
# Is the bcmhost.h header file available?
if [ -e /opt/vc/include/bcm_host.h ]; then
EXTRA_CFLAGS=-I/opt/vc/include
fi
$CC $CFLAGS $EXTRA_CFLAGS -o /dev/null -xc - 2>/dev/null <<EOF
#include <bcm_host.h>
int main(int argc,char *argv[]) {
return 0;
}
EOF
if [ "$?" = "0" ]; then
printf -- "-DTARGET_RPI $EXTRA_CFLAGS -lbcm_host"
fi