2011-04-10 21:27:03 +03:00
|
|
|
Protocol specification
|
|
|
|
======================
|
|
|
|
|
|
|
|
Messages
|
|
|
|
--------
|
|
|
|
|
|
|
|
<open TCP session>
|
|
|
|
+[greeting]
|
|
|
|
-message
|
|
|
|
|
tools: atrf-id option -s to retrieve driver spec, with necessary infrastructure
- include/atrf.h (atrf_driver_spec), lib/atrf.c (atrf_driver_spec):
new function to retrieve the local or remote/final driver spec
- lib/atrf.c (struct atrf_dsc, atrf_open, atrf_close): record the local
driver spec
- lib/driver.h (struct atrf_driver): new driver function "driver_spec"
to retrieve the driver spec
- lib/atnet.c (struct atnet_dsc, atnet_open, atnet_close): maintain a
cache for the driver spec
- lib/atnet.c (atnet_driver_spec, atnet_driver): added support for the
"driver_spec" function
- atrf-proxy/PROTOCOL, atrf-proxy/atrf-proxy.c (cmd_zero): added command
SPEC to retrieve the (final) driver spec
- atrf-id/atrf-id.c (usage, main): added option -s to retrieve the
driver spec. One -s retrieves the local spec, -s -s the remote/final.
2011-04-20 14:58:17 +03:00
|
|
|
SPEC
|
|
|
|
+driver_spec
|
|
|
|
-message
|
|
|
|
|
2011-04-10 21:27:03 +03:00
|
|
|
RESET
|
|
|
|
+[comment]
|
|
|
|
-message
|
|
|
|
|
|
|
|
RESET_RF
|
|
|
|
+[comment]
|
|
|
|
-message
|
|
|
|
|
|
|
|
TEST
|
|
|
|
+[comment]
|
|
|
|
-message
|
|
|
|
|
2011-06-06 03:08:48 +03:00
|
|
|
SLP_TR 0|1 0|1
|
2011-04-10 21:27:03 +03:00
|
|
|
+[comment]
|
|
|
|
-message
|
|
|
|
|
|
|
|
CLKM freq_mhz
|
|
|
|
+[comment]
|
|
|
|
-message
|
|
|
|
|
|
|
|
SET register value
|
|
|
|
+[comment]
|
|
|
|
-message
|
|
|
|
|
|
|
|
GET register
|
|
|
|
+value
|
|
|
|
-message
|
|
|
|
|
|
|
|
WRITE length raw-data
|
|
|
|
+[comment]
|
|
|
|
-message
|
|
|
|
|
|
|
|
READ
|
|
|
|
+length raw-data
|
|
|
|
-message
|
|
|
|
|
2011-06-03 20:35:21 +03:00
|
|
|
SETRAM addr value
|
|
|
|
+[comment]
|
|
|
|
-message
|
|
|
|
|
|
|
|
GETRAM addr
|
|
|
|
+value
|
|
|
|
-message
|
|
|
|
|
2011-06-20 23:42:48 +03:00
|
|
|
WAIT timeout_ms
|
|
|
|
+value
|
2011-04-12 12:32:22 +03:00
|
|
|
-message
|
|
|
|
|
2011-04-10 21:27:03 +03:00
|
|
|
|
|
|
|
Message format
|
|
|
|
--------------
|
|
|
|
|
|
|
|
Commands are not case-sensitive. Messages and comments consist of printable
|
|
|
|
ASCII characters and spaces.
|
|
|
|
|
|
|
|
Whitespace separating words is always exactly one space character.
|
|
|
|
Lines end with a * single newline, without trailing whitespace.
|
|
|
|
Numeric values are in C notation, i.e., 64, 0100, and 0x40 would all
|
|
|
|
represent the same value.
|
|
|
|
|
|
|
|
"raw-data" is a string of binary data of the indicated length. The other
|
|
|
|
formatting conventions remain valid after this string, i.e., it must be
|
|
|
|
followed by a single newline.
|
|
|
|
|
|
|
|
The device is implicitly opened when establishing a TCP session. The
|
|
|
|
device is implicitly closed when closing the TCP session.
|
2011-04-12 12:32:22 +03:00
|
|
|
|
|
|
|
|
2011-06-20 23:42:48 +03:00
|
|
|
Asynchrous interrupt notification
|
2011-04-12 12:32:22 +03:00
|
|
|
---------------------------------
|
|
|
|
|
|
|
|
The WAIT command is not answered until an interrupt or another command is
|
2011-06-20 23:42:48 +03:00
|
|
|
received. WAIT returns the value of the IRQ_STATUS register. If WAIT
|
|
|
|
times out before receiving an interrupt, it returns 0.
|