mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 04:33:00 +02:00
An Infix build with PROFINET gears Net-SNMP heavily towards acting as a servant to profeth (p-net stack). This will be hard-coded for now until we've integrated it all better in Clixon. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
25 lines
651 B
Bash
Executable File
25 lines
651 B
Bash
Executable File
#!/bin/sh
|
|
# Used by profeth to flash LED(s), only a dummy for now
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo "Usage: ${0} led_number led_state"
|
|
echo " where:"
|
|
echo " led_number: LED number. Number 1 for sample app data LED"
|
|
echo " Number 2 for mandatory Profinet signal LED"
|
|
echo " led_state: 1 for on, 0 for off"
|
|
echo " Exit code: 0 on success, 1 on error"
|
|
exit 1
|
|
fi
|
|
|
|
LED_NUMBER=$1
|
|
LED_STATE=$2
|
|
|
|
if ! [ "${LED_STATE}" = "0" -o "${LED_STATE}" = "1" ]; then
|
|
echo "Wrong LED state: ${LED_STATE}"
|
|
exit 1
|
|
fi
|
|
|
|
echo ${LED_STATE} > "/tmp/pnet_led_${LED_NUMBER}.txt"
|
|
|
|
exit 0
|