From 052685bdfb69e95d2940f081a084bb1b30b370ca Mon Sep 17 00:00:00 2001 From: Tomas Mudrunka Date: Fri, 5 Jan 2024 18:16:26 +0100 Subject: [PATCH] nyni je funkce --- bash/serial_loopback_test.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bash/serial_loopback_test.sh b/bash/serial_loopback_test.sh index d128f99..8b945fa 100755 --- a/bash/serial_loopback_test.sh +++ b/bash/serial_loopback_test.sh @@ -5,6 +5,8 @@ # #Tested in: busybox ash, bash +function serial_loopback_test() { + trylimit=0 seconds=0 baudrate=115200 @@ -71,3 +73,7 @@ exec 6<&- echo TRANSMITTED: $trycnt, ERRORS: $errcnt, SECONDS: $(($(date +%s)-$datestart)) [ "$errcnt" = "0" -a "$trycnt" -gt 0 ] && exit 0 exit 255 + +} + +serial_loopback_test "$@" -- 2.30.2