HRI board firmware  v2.1
Microcontroller firmware of the board used during the HRI labs.
definitions.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 EPFL-LSRO (Laboratoire de Systemes Robotiques).
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef DEF_DEFINITIONS_H
18 #define DEF_DEFINITIONS_H
19 
20 #include <stdbool.h>
21 
22 // Message IDs sent by host (PC) to the device (STM).
23 typedef enum
24 {
32 
33 // Message IDs sent by device (STM) to the device (PC).
34 typedef enum
35 {
43 
44 // SyncVar.
45 #define N_SYNCVARS_MAX 255 // Maximum number of SyncVars.
46 #define SYNCVAR_NAME_SIZE 50 // Max size of a SyncVar name, including the '\0' trailing character.
47 
48 typedef enum
49 {
50  READONLY = 0,
54 
55 typedef enum
56 {
57  BOOL = 0,
60 } comm_VarType;
61 
62 // UART baudrate [b/s].
63 #define UART_BAUDRATE 1843200
64 
65 #endif
Definition: definitions.h:52
Definition: definitions.h:59
Definition: definitions.h:58
Definition: definitions.h:57
Definition: definitions.h:58
Request the board an answer, to check the connection status.
Definition: definitions.h:26
Variable state.
Definition: definitions.h:37
Definition: definitions.h:58
Definition: definitions.h:58
Set the variables to be streamed continuously.
Definition: definitions.h:28
Definition: definitions.h:51
Definition: definitions.h:59
Definition: definitions.h:58
Notification that the board has (re)started.
Definition: definitions.h:41
Response to a ping request.
Definition: definitions.h:36
Monitored variables list.
Definition: definitions.h:40
Definition: definitions.h:50
Definition: definitions.h:58
comm_VarType
Definition: definitions.h:55
Request the device to send the selected value.
Definition: definitions.h:29
comm_VarAccess
Definition: definitions.h:48
Definition: definitions.h:58
Debug text message.
Definition: definitions.h:39
Definition: definitions.h:58
Streaming packet.
Definition: definitions.h:38
Do nothing.
Definition: definitions.h:25
comm_StmMessage
Definition: definitions.h:34
Request the SyncVars list.
Definition: definitions.h:27
comm_PcMessage
Definition: definitions.h:23
Set the selected variable.
Definition: definitions.h:30