#!/bin/bash

slot=$1
chan=$2

#ftw_LO0
./wr2rf -s $slot api-rfnco-write32 $chan 0x98 0x5E300000
./wr2rf -s $slot api-rfnco-write32 $chan 0x9c 0x0001C9BA 

#ftw_LO1
./wr2rf -s $slot api-rfnco-write32 $chan 0xa0 0x5E300000
./wr2rf -s $slot api-rfnco-write32 $chan 0xa4 0x0001C9BA 

#ftw_h1
./wr2rf -s $slot api-rfnco-write32 $chan 0x80 0xC8BD9D1F
./wr2rf -s $slot api-rfnco-write32 $chan 0x84 0x00000016

#ftw_h1_on
./wr2rf -s $slot api-rfnco-write32 $chan 0x90 0xB8BD9D1F
./wr2rf -s $slot api-rfnco-write32 $chan 0x94 0x00000016

#offset h1
./wr2rf -s $slot api-rfnco-write32 $chan 0x100 0x0

#rate
./wr2rf -s $slot api-rfnco-write32 $chan 0x108 0x1

#harmonic
./wr2rf -s $slot api-rfnco-write32 $chan 0x10c 4620

#offset fsk
./wr2rf -s $slot api-rfnco-write32 $chan 0x110 0x0

#slip
./wr2rf -s $slot api-rfnco-write32 $chan 0xa8 0x0

#enable fsk and external reset
./wr2rf -s $slot api-rfnco-write32 $chan 0x20 0x104000

#softload 
./wr2rf -s $slot api-rfnco-write32 $chan 0x20 0x104002
