Commit f617d2d0 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

On behalf of Delia - in the process of adding Bluetooth.

parent 1cd386d4
......@@ -3,7 +3,8 @@ EXTRA_DIST = $(srcdir)/asn1crt.h \
$(srcdir)/1553.h \
$(srcdir)/ip.h \
$(srcdir)/serial.h\
$(srcdir)/spacewire.h
$(srcdir)/spacewire.h\
$(srcdir)/bluetooth.h
hsrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/include/drivers/configuration'}
......
......@@ -3,18 +3,20 @@ AUTOMAKE_OPTIONS = no-dependencies
C_FILES = $(srcdir)/1553.c \
$(srcdir)/ip.c \
$(srcdir)/serial.c \
$(srcdir)/spacewire.c
$(srcdir)/spacewire.c \
$(srcdir)/bluetooth.c
ASN_FILES = $(srcdir)/1553.asn \
$(srcdir)/ip.asn \
$(srcdir)/serial.asn \
$(srcdir)/spacewire.asn
$(srcdir)/spacewire.asn \
$(srcdir)/bluetooth.asn
csrc = ${shell $(CYGPATH_U) '$(OCARINA_RUNTIME)/polyorb-hi-c/src/drivers/configuration'}
$(srcdir)/1553.c:
mono $(which asn1.exe) -c -typePrefix __po_hi_c_ 1553.asn
mono $$(which asn1.exe) -c -typePrefix __po_hi_c_ 1553.asn
sed -e 's/Mil\_1553\_Conf\_T/mil\_1553\_conf\_t/g' 1553.h > 1553new.h
mv 1553new.h 1553.h
echo "#if (defined (__PO_HI_NEED_DRIVER_1553_RASTA))\n" > 1553new.c
......@@ -25,7 +27,7 @@ $(srcdir)/1553.c:
mv asn1crt.h ../../../include/drivers/configuration/
$(srcdir)/spacewire.c:
mono $(which asn1.exe) -c -typePrefix __po_hi_c_ spacewire.asn
mono $$(which asn1.exe) -c -typePrefix __po_hi_c_ spacewire.asn
sed -e 's/Spacewire\_Conf\_T/spacewire\_conf\_t/g' spacewire.h > spacewirenew.h
mv spacewirenew.h spacewire.h
echo "#if (defined (__PO_HI_NEED_DRIVER_SPACEWIRE_RASTA))\n" > spacewirenew.c
......@@ -36,7 +38,7 @@ $(srcdir)/spacewire.c:
mv asn1crt.h ../../../include/drivers/configuration/
$(srcdir)/ip.c:
mono $(which asn1.exe) -c -typePrefix __po_hi_c_ ip.asn
mono $$(which asn1.exe) -c -typePrefix __po_hi_c_ ip.asn
mv asn1crt.h ../../../include/drivers/configuration/
sed -e 's/IP\_Conf\_T/ip\_conf\_t/g' ip.h > ipnew.h
mv ipnew.h ip.h
......@@ -47,7 +49,7 @@ $(srcdir)/ip.c:
mv ip.h ../../../include/drivers/configuration/
$(srcdir)/serial.c:
mono $(which asn1.exe) -c -typePrefix __po_hi_c_ serial.asn
mono $$(which asn1.exe) -c -typePrefix __po_hi_c_ serial.asn
sed -e 's/Serial\_Conf\_T/serial\_conf\_t/g' serial.h > serialnew.h
mv serialnew.h serial.h
echo "#if (defined (__PO_HI_NEED_DRIVER_SERIAL_LINUX) || defined (__PO_HI_NEED_DRIVER_SERIAL_LINUX_RECEIVER) || defined (__PO_HI_NEED_DRIVER_SERIAL_LINUX_SENDER) || defined (__PO_HI_NEED_DRIVER_SERIAL_RASTA) || defined (__PO_HI_NEED_DRIVER_SERIAL_LEON) || defined (__PO_HI_NEED_DRIVER_SERIAL_LEON_SENDER) || defined (__PO_HI_NEED_DRIVER_SERIAL_LEON_RECEIVER))\n" > serialnew.c
......@@ -57,6 +59,17 @@ $(srcdir)/serial.c:
mv serial.h ../../../include/drivers/configuration/
mv asn1crt.h ../../../include/drivers/configuration/
$(srcdir)/bluetooth.c:
mono $$(which asn1.exe) -c -typePrefix __po_hi_c_ bluetooth.asn
sed -e 's/Bluetooth\_Conf\_T/bluetooth\_conf\_t/g' bluetooth.h > bluetoothnew.h
mv bluetoothnew.h bluetooth.h
echo "#if (defined (__PO_HI_NEED_DRIVER_BLUETOOTH))\n" > bluetoothnew.c
sed -e 's/Bluetooth\_Conf\_T/bluetooth\_conf\_t/g' bluetooth.c >> bluetoothnew.c
echo "\n#endif" >> bluetoothnew.c
mv bluetoothnew.c bluetooth.c
mv bluetooth.h ../../../include/drivers/configuration/
mv asn1crt.h ../../../include/drivers/configuration/
regenerate:
rm -f $(C_FILES)
for v in $(C_FILES); do $(MAKE) $$v ; done
......
POHICDRIVER-BLUETOOTH DEFINITIONS AUTOMATIC TAGS ::= BEGIN
Datarate-T ::= ENUMERATED {b250K, b1M, b2M}
Serial-Conf-T ::= SEQUENCE {
channel INTEGER (0..125),
address OCTET STRING (SIZE (5)) OPTIONAL,
datarate Datarate-T OPTIONAL
}
crazyflie-default Bluetooth-Conf-T ::= {
channel 80,
address 'E7E7E7E7E7'H,
datarate b2M
}
END
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment