#!/bin/sh

start() {
    # AGC-BASE-rev1+ ttymxc2 and ttymxc3 have RS485 ports
    # SLC-BASE-rev2  ttymxc3 is RS485
    # SLC-BASE-rev5  ttymxc1 is RS485
    # Non RS485 can be configured to RS485, but it will have no effect.
    rs485conf -e 1 -r 1 /dev/ttymxc1 &>/dev/null
    rs485conf -e 1 -r 1 /dev/ttymxc2 &>/dev/null
    rs485conf -e 1 -r 1 /dev/ttymxc3 &>/dev/null
}

case "$1" in
  start)
    start
    ;;
  stop)
    : # do nothing
    ;;
  *)
    echo "Usage: $0 {start|stop}"
    exit 1
esac
