#!/bin/bash

# setup snarfed from uart_api.c in diags code

# reset the wifi module
amrothreg AMROTH_WIFI_CTRL.WIFI_RESET_N 1
amrothreg AMROTH_WIFI_CTRL.WIFI_RESET_N 0
sleep 1

# connect ttyS1 to the WIFI UART
amrothreg AMROTH_UART_MUX_SEL.ARM_UART1_RX_SEL 0x3
amrothreg AMROTH_UART_MUX_SEL.WIFI_UART_TX_SEL 0x1

#stty -F /dev/ttyS1 115200 eol ^J quit undef -iexten -brkint  ixoff -echoctl -echo
#stty -F /dev/ttyS1 115200 eol ^J quit undef -iexten -brkint  ixoff -echoctl -echo -icrnl -opost
stty -F /dev/ttyS1 115200 eol ^J quit undef -iexten -brkint  ixoff -echoctl -echo -icrnl -opost -icanon min 0 time 0
