1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-30 02:32:53 +08:00
oh/elink/sw/tests/toggle_led.sh

32 lines
857 B
Bash
Raw Normal View History

2015-11-11 03:41:22 +00:00
#!/bin/bash
state=$1
SCRIPT=$(readlink -f "$0")
EXEPATH=$(dirname "$SCRIPT")
echo $EXEPATH
echo $state
echo "--Set EAST routing ctrlmode in FPGA--"
$EXEPATH/../bin/e-access 00000000_00000050_810f0210_05
echo "--Set EAST Epiphany link to half speed--"
$EXEPATH/../bin/e-access 00000000_00000001_88bf0300_05
echo "--Clear ctrlmode in FPGA--"
$EXEPATH/../bin/e-access 00000000_00000000_810f0210_05
echo "--Set NORTH routing ctrlmode in FPGA--"
$EXEPATH/../bin/e-access 00000000_00000110_810f0210_05
echo "--Write to North IO config register--"
$EXEPATH/../bin/e-access 00000000_03FFFFFF_80AF030C_05
echo "--Write to North IO data register--"
$EXEPATH/../bin/e-access 00000000_0000000${state}_80AF0318_05
$EXEPATH/../bin/e-access 00000000_FFFFFFFF_80AF0318_05
echo "--Set back config register--"
$EXEPATH/../bin/e-access 00000000_00000000_810f0210_05