[PATCH 01/10] ratp: define message type flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Split message types in 3 different groups:

  * Requests: messages generated by one RATP endpoint and sent to the
    the other endpoint to be processed.

  * Responses: messages generated by the RATP endpoint as a result of
    having received and processed a specific request message.

  * Indications: messages generated by one RATP endpoint for which
    there is no need to generate an explicit response message.

These message types are identified by new command flags.

Signed-off-by: Aleksander Morgado <aleksander@xxxxxxxxxxxxx>
---
 common/ratp.c              | 4 ++++
 scripts/remote/messages.py | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/common/ratp.c b/common/ratp.c
index 80863f81f..a1fa6fd5f 100644
--- a/common/ratp.c
+++ b/common/ratp.c
@@ -41,6 +41,10 @@
 #define BB_RATP_TYPE_FS			8
 #define BB_RATP_TYPE_FS_RETURN		9
 
+#define BB_RATP_FLAG_NONE		0
+#define BB_RATP_FLAG_RESPONSE		(1 << 0) /* Packet is a response */
+#define BB_RATP_FLAG_INDICATION		(1 << 1) /* Packet is an indication */
+
 struct ratp_bb {
 	uint16_t type;
 	uint16_t flags;
diff --git a/scripts/remote/messages.py b/scripts/remote/messages.py
index 8e8495b12..7a597bc9d 100644
--- a/scripts/remote/messages.py
+++ b/scripts/remote/messages.py
@@ -5,6 +5,11 @@ from __future__ import absolute_import, division, print_function
 
 import struct
 
+class BBFlag(object):
+    none = 0
+    response = 1 << 0
+    indication = 1 << 1
+
 
 class BBType(object):
     command = 1
-- 
2.15.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux