OLE Developer Guide  Latest Git
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
transport.h
Go to the documentation of this file.
1 /*
2  * This library is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU Lesser General Public
4  * License as published by the Free Software Foundation; either
5  * version 2.1 of the License, or (at your option) any later version.
6  *
7  * This library is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10  * Lesser General Public License for more details.
11  *
12  * You should have received a copy of the GNU Lesser General Public
13  * License along with this library; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15  *
16  * transport.h
17  * Copyright (C) 2015 Simon Newton
18  */
19 
33 #ifndef FIRMWARE_SRC_TRANSPORT_H_
34 #define FIRMWARE_SRC_TRANSPORT_H_
35 
36 #include <stdint.h>
37 #include "constants.h"
38 #include "iovec.h"
39 
43 typedef enum {
47 
57 typedef bool (*TransportTXFunction)(uint8_t, Command, uint8_t, const IOVec*,
58  unsigned int);
59 
65 typedef void (*TransportRxFunction)(const uint8_t*, unsigned int);
66 
67 #endif // FIRMWARE_SRC_TRANSPORT_H_
68 
Flags have changed.
Definition: transport.h:44
Various constants.
An IOVector, with a pointer to memory and a length attribute.
Definition: iovec.h:35
bool(* TransportTXFunction)(uint8_t, Command, uint8_t, const IOVec *, unsigned int)
A function pointer to send a message to the host.
Definition: transport.h:57
The message has been truncated.
Definition: transport.h:45
Command
The Ja Rule message commands.
Definition: constants.h:87
Vector I/O.
TransportFlags
Flags use in a response message.
Definition: transport.h:43
void(* TransportRxFunction)(const uint8_t *, unsigned int)
A function pointer to call when data is received from the host.
Definition: transport.h:65