Robot Control Library
model.h
Go to the documentation of this file.
1 /**
2  * <rc/model.h>
3  *
4  * @brief Determine the model of board currently being used.
5  *
6  * The user may sometimes need to determine which board they are running on to
7  * decide which pins or modules to use. These functions are also used internally
8  * to the library for hardware specific configuration. See the rc_model example
9  * for a demonstration.
10  *
11  * @author James Strawson
12  * @date 1/31/2018
13  *
14  * @addtogroup Model
15  * @{
16  */
17 
18 
19 #ifndef RC_MODEL_H
20 #define RC_MODEL_H
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 
27 /**
28  * List of models detectable by the rc_model() function. This is not a complete
29  * list of board this library will run on. Nor is it a list of boards that the
30  * library is guaranteed to work on. Currently, MODEL_PC indicates personal
31  * computer and will be selected whenever running on an x86 or x86_64
32  * architecture machine until more specific boards are added to this list by
33  * user request.
34  */
35 typedef enum rc_model_t{
54 } rc_model_t;
55 
56 
57 /**
58  * This is a list of general categories of boards.
59  */
60 typedef enum rc_model_category_t{
66 
67 
68 /**
69  * @brief gets the current board model name
70  *
71  * @return rc_model_t enum representation of model
72  */
73 rc_model_t rc_model(void);
74 
75 
76 /**
77  * @brief gets the general category for the current board
78  *
79  * @return rc_model_category_t enum representation of categoy
80  */
81 rc_model_category_t rc_model_category(void);
82 
83 
84 /**
85  * @brief prints to the screen the human-readable version of the model name
86  * with no trailing newline character.
87  */
88 void rc_model_print(void);
89 
90 
91 /**
92  * @brief prints to the screen the human-readable version of the category
93  * name with no trailing newline character.
94  */
95 void rc_model_category_print(void);
96 
97 
98 #ifdef __cplusplus
99 }
100 #endif
101 
102 #endif // RC_MODEL_H
103 
104 /** @} end group Model*/
Definition: model.h:42
Definition: model.h:63
Definition: model.h:44
Definition: model.h:36
Definition: model.h:53
Definition: model.h:51
Definition: model.h:48
Definition: model.h:43
Definition: model.h:40
Definition: model.h:52
rc_model_t
Definition: model.h:35
Definition: model.h:62
rc_model_category_t rc_model_category(void)
gets the general category for the current board
Definition: model.h:64
Definition: model.h:61
Definition: model.h:49
void rc_model_category_print(void)
prints to the screen the human-readable version of the category name with no trailing newline charact...
rc_model_t rc_model(void)
gets the current board model name
Definition: model.h:45
Definition: model.h:47
Definition: model.h:41
Definition: model.h:39
Definition: model.h:37
void rc_model_print(void)
prints to the screen the human-readable version of the model name with no trailing newline character...
Definition: model.h:38
Definition: model.h:46
Definition: model.h:50
rc_model_category_t
Definition: model.h:60