Imported sources from subversion.
This commit is contained in:
48
packages/escc/default.bash
Normal file
48
packages/escc/default.bash
Normal file
@@ -0,0 +1,48 @@
|
||||
version=\
|
||||
(
|
||||
'1.0.3'
|
||||
)
|
||||
|
||||
url=\
|
||||
(
|
||||
"http://www.lsts.pt/glued/escc-$version.tar.gz"
|
||||
)
|
||||
|
||||
md5=\
|
||||
(
|
||||
'd8729636cc2d7f46f62141d392898bfa'
|
||||
)
|
||||
|
||||
if [ -d "$cfg_dir_builds/linux/linux-"* ]; then
|
||||
kernel="$(echo $cfg_dir_builds/linux/linux-*)"
|
||||
fi
|
||||
|
||||
build()
|
||||
{
|
||||
$cmd_make \
|
||||
ARCH=$cfg_target_linux \
|
||||
CROSS_COMPILE=$cfg_target_canonical- \
|
||||
M=`pwd` \
|
||||
-C "$kernel" &&
|
||||
|
||||
for util in setescc esccclock esccsettings; do
|
||||
make CC="$cmd_target_cc" -C "utils/$util"
|
||||
done
|
||||
}
|
||||
|
||||
target_install()
|
||||
{
|
||||
$cmd_make \
|
||||
ARCH=$cfg_target_linux \
|
||||
CROSS_COMPILE=$cfg_target_canonical- \
|
||||
M=`pwd` \
|
||||
INSTALL_MOD_PATH=$cfg_dir_rootfs \
|
||||
-C "$kernel" \
|
||||
modules_install &&
|
||||
|
||||
for util in setescc esccclock esccsettings; do
|
||||
$cmd_target_strip "utils/$util/$util" -o "$cfg_dir_rootfs/usr/bin/$util"
|
||||
done &&
|
||||
|
||||
tar -C "$cfg_package_spec_dir/fs" --exclude .svn -c -f - . | tar -C "$cfg_dir_rootfs" -x -v -f -
|
||||
}
|
20
packages/escc/fs/etc/escc/hg1700.cfg
Normal file
20
packages/escc/fs/etc/escc/hg1700.cfg
Normal file
@@ -0,0 +1,20 @@
|
||||
mode = 0x88
|
||||
ccr0 = 0x80
|
||||
ccr1 = 0x10
|
||||
ccr2 = 0x38
|
||||
bgr = 0x07
|
||||
n_rbufs = 600
|
||||
n_tbufs = 5
|
||||
n_rfsize_max = 64
|
||||
n_tfsize_max = 64
|
||||
timr = 0x1f
|
||||
ipc = 0x03
|
||||
imr0 = 0x44
|
||||
pim = 0xff
|
||||
pcr = 0xe0
|
||||
xad1 = 0xff
|
||||
xad2 = 0xff
|
||||
rah1 = 0xff
|
||||
rah2 = 0xff
|
||||
ral1 = 0xff
|
||||
ral2 = 0xff
|
3
packages/escc/fs/etc/escc/hg1700.sh
Executable file
3
packages/escc/fs/etc/escc/hg1700.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
/usr/bin/setescc 0 0x200 5 0 0 0
|
||||
/usr/bin/esccclock 0 0x5d1460 23
|
||||
/usr/bin/esccsettings 0 /etc/escc/hg1700.cfg
|
43
packages/escc/fs/etc/escc/ifog-imu-1-a.cfg
Normal file
43
packages/escc/fs/etc/escc/ifog-imu-1-a.cfg
Normal file
@@ -0,0 +1,43 @@
|
||||
mode = 0x88
|
||||
ccr0 = 0xc0
|
||||
ccr1 = 0x10
|
||||
ccr2 = 0x38
|
||||
ccr3 = 0x00
|
||||
ccr4 = 0x00
|
||||
bgr = 0xbf
|
||||
timr = 0x03
|
||||
imr0 = 0x04
|
||||
imr1 = 0x00
|
||||
pim = 0xff
|
||||
ipc = 0x03
|
||||
iva = 0x00
|
||||
pcr = 0xe0
|
||||
n_rbufs = 0x0a
|
||||
n_rfsize_max = 0x1000
|
||||
n_tbufs = 0x0a
|
||||
n_tfsize_max = 0x1000
|
||||
xbcl = 0x00
|
||||
xbch = 0x00
|
||||
tsax = 0x00
|
||||
tsar = 0x00
|
||||
xccr = 0x00
|
||||
rccr = 0x00
|
||||
xad1 = 0xff
|
||||
xad2 = 0xff
|
||||
ral1 = 0xff
|
||||
ral2 = 0xff
|
||||
rah1 = 0xff
|
||||
rah2 = 0xff
|
||||
rlcr = 0x00
|
||||
aml = 0x00
|
||||
amh = 0x00
|
||||
pre = 0x00
|
||||
mxn = 0x00
|
||||
mxf = 0x00
|
||||
xon = 0x00
|
||||
xoff = 0x00
|
||||
tcr = 0x00
|
||||
dafo = 0x00
|
||||
rfc = 0x00
|
||||
synl = 0x00
|
||||
synh = 0x00
|
8
packages/escc/fs/etc/escc/ifog-imu-1-a.sh
Executable file
8
packages/escc/fs/etc/escc/ifog-imu-1-a.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
# IMU
|
||||
/usr/bin/setescc 0 0x200 5 0 0 0
|
||||
/usr/bin/esccsettings 0 /etc/escc/ifog-imu-1-a.cfg
|
||||
|
||||
# PSIMAR
|
||||
/usr/bin/setescc 1 0x200 5 0 0 1
|
||||
/usr/bin/esccsettings 1 /etc/escc/psimar.cfg
|
||||
/usr/bin/esccclock 1 0xc8920 22
|
47
packages/escc/fs/etc/escc/psimar.cfg
Normal file
47
packages/escc/fs/etc/escc/psimar.cfg
Normal file
@@ -0,0 +1,47 @@
|
||||
#################################################################################
|
||||
# Standard RS-422, 8n1, 115200 baud from a 25804800 Hz clock. #
|
||||
#################################################################################
|
||||
|
||||
mode = 0x08
|
||||
ccr0 = 0xc3
|
||||
ccr1 = 0x1f
|
||||
ccr2 = 0x38
|
||||
ccr3 = 0x00
|
||||
ccr4 = 0x80
|
||||
bgr = 0x6
|
||||
timr = 0x03
|
||||
imr0 = 0x04
|
||||
imr1 = 0x00
|
||||
pim = 0xff
|
||||
ipc = 0x03
|
||||
iva = 0x00
|
||||
pcr = 0xe0
|
||||
n_rbufs = 0x0a
|
||||
n_rfsize_max = 0x1000
|
||||
n_tbufs = 0x0a
|
||||
n_tfsize_max = 0x1000
|
||||
xbcl = 0x00
|
||||
xbch = 0x00
|
||||
tsax = 0x00
|
||||
tsar = 0x00
|
||||
xccr = 0x00
|
||||
rccr = 0x00
|
||||
xad1 = 0xff
|
||||
xad2 = 0xff
|
||||
ral1 = 0xff
|
||||
ral2 = 0xff
|
||||
rah1 = 0xff
|
||||
rah2 = 0xff
|
||||
rlcr = 0x00
|
||||
aml = 0x00
|
||||
amh = 0x00
|
||||
pre = 0x00
|
||||
mxn = 0x00
|
||||
mxf = 0x00
|
||||
xon = 0x00
|
||||
xoff = 0x00
|
||||
tcr = 0x00
|
||||
dafo = 0x00
|
||||
rfc = 0x0c
|
||||
synl = 0x00
|
||||
synh = 0x00
|
18
packages/escc/fs/etc/rc.d/escc
Normal file
18
packages/escc/fs/etc/rc.d/escc
Normal file
@@ -0,0 +1,18 @@
|
||||
start()
|
||||
{
|
||||
modprobe escc &&
|
||||
rm -f /dev/escc0 &&
|
||||
mknod /dev/escc0 c 261 0 &&
|
||||
rm -f /dev/escc1 &&
|
||||
mknod /dev/escc1 c 261 1 &&
|
||||
if [ -f "$cfg_escc_script" ]; then
|
||||
source "$cfg_escc_script"
|
||||
fi
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
rmmod escc &&
|
||||
rm -f /dev/escc0 &&
|
||||
rm -f /dev/escc1
|
||||
}
|
Reference in New Issue
Block a user