ypprotocol.h
Go to the documentation of this file.
1 // Copyright (c) 2010-2016 The YP-Spur Authors, except where otherwise indicated.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to
5 // deal in the Software without restriction, including without limitation the
6 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 // sell copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 // SOFTWARE.
20 
21 #ifndef YPPROTOCOL_H
22 #define YPPROTOCOL_H
23 
24 #include <stdio.h>
25 #include <string.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif // __cplusplus
30 
32 typedef struct VERSION_INFO
33 {
34  char vender[128];
35  char product[128];
36  char firmware[128];
37  char protocol[128];
38  char serialno[128];
39 } Ver_t;
40 
42 typedef struct PARAMETER_INFO
43 {
44  char pwm_resolution[128];
45  char motor_num[128];
46  char robot_name[128];
47 } Param_t;
48 
49 int get_version(Ver_t *apVer);
50 int get_parameter(Param_t *apParam);
51 int set_baudrate(int baud);
52 int get_embedded_param(char *param);
53 
54 #ifdef __cplusplus
55 }
56 #endif // __cplusplus
57 #endif // YPPROTOCOL_H
int set_baudrate(int baud)
Definition: ypprotocol.c:57
char serialno[128]
Definition: ypprotocol.h:38
char product[128]
Definition: ypprotocol.h:35
char protocol[128]
Definition: ypprotocol.h:37
char vender[128]
Definition: ypprotocol.h:34
int get_embedded_param(char *param)
Definition: ypprotocol.c:248
struct VERSION_INFO Ver_t
int get_version(Ver_t *apVer)
Get version info.
Definition: ypprotocol.c:111
int get_parameter(Param_t *apParam)
Get version info.
Definition: ypprotocol.c:186
char firmware[128]
Definition: ypprotocol.h:36
struct PARAMETER_INFO Param_t


yp-spur
Author(s):
autogenerated on Fri May 7 2021 02:12:17