#!/bin/sh

# Set divider (1Mhz)
sudo ./fip_urv write 0x100094 20

# Set ctrl char-len=5*8=0x28, tx_neg=1, rx_neg=0
sudo ./fip_urv write 0x100090 0x428

# Set tx1 (cmd)
sudo ./fip_urv write 0x100084 0x9f

# Set SS=1
sudo ./fip_urv write 0x100098 1

# Go
sudo ./fip_urv write 0x100090 0x528

# Read status
sudo ./fip_urv read 0x100090

# Read data
sudo ./fip_urv read 0x100080
sudo ./fip_urv read 0x100084

# Set SS=0
sudo ./fip_urv write 0x100098 0
