From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wr0-x235.google.com ([2a00:1450:400c:c0c::235]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ehZJ8-0004sD-9K for barebox@lists.infradead.org; Fri, 02 Feb 2018 11:15:10 +0000 Received: by mail-wr0-x235.google.com with SMTP id s5so22220741wra.0 for ; Fri, 02 Feb 2018 03:14:50 -0800 (PST) From: Aleksander Morgado Date: Fri, 2 Feb 2018 12:14:33 +0100 Message-Id: <20180202111442.12444-2-aleksander@aleksander.es> In-Reply-To: <20180202111442.12444-1-aleksander@aleksander.es> References: <20180202111442.12444-1-aleksander@aleksander.es> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 01/10] ratp: define message type flags To: barebox@lists.infradead.org Cc: Aleksander Morgado 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 --- 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@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox