Skip to content

Commit

Permalink
checking GPIO24 already exported
Browse files Browse the repository at this point in the history
  • Loading branch information
hilschernetpi committed Apr 2, 2020
1 parent 854a0d5 commit 8f19850
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
RUN [ "cross-build-start" ]

#version
ENV HILSCHERNETPI_CODESYS_BASIS_VERSION 1.3.1
ENV HILSCHERNETPI_CODESYS_BASIS_VERSION 1.3.2

#execute all commands as root
USER root
Expand Down
4 changes: 3 additions & 1 deletion init.d/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ if [[ -e "/dev/spidev0.0" ]]&& [[ -e "/dev/net/tun" ]]; then
echo "cifx0 hardware support (TCP/IP over RTE LAN ports) configured."

#pre-configure GPIO 24 to serve as interrupt pin between netX chip and BCM CPU
echo 24 > /sys/class/gpio/export
if [[ ! -e "/sys/class/gpio/gpio24" ]]; then
echo 24 > /sys/class/gpio/export
fi
echo rising > /sys/class/gpio/gpio24/edge
echo in > /sys/class/gpio/gpio24/direction
echo 1 > /sys/class/gpio/gpio24/active_low
Expand Down

0 comments on commit 8f19850

Please sign in to comment.