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{
55 } rc_model_t;
56 
57 
58 /**
59  * This is a list of general categories of boards.
60  */
61 typedef enum rc_model_category_t{
67 
68 
69 /**
70  * @brief gets the current board model name
71  *
72  * @return rc_model_t enum representation of model
73  */
74 rc_model_t rc_model(void);
75 
76 
77 /**
78  * @brief gets the general category for the current board
79  *
80  * @return rc_model_category_t enum representation of categoy
81  */
82 rc_model_category_t rc_model_category(void);
83 
84 
85 /**
86  * @brief prints to the screen the human-readable version of the model name
87  * with no trailing newline character.
88  */
89 void rc_model_print(void);
90 
91 
92 /**
93  * @brief prints to the screen the human-readable version of the category
94  * name with no trailing newline character.
95  */
96 void rc_model_category_print(void);
97 
98 
99 #ifdef __cplusplus
100 }
101 #endif
102 
103 #endif // RC_MODEL_H
104 
105 /** @} end group Model*/
Definition: model.h:42
Definition: model.h:64
Definition: model.h:45
Definition: model.h:44
Definition: model.h:36
Definition: model.h:54
Definition: model.h:52
Definition: model.h:49
Definition: model.h:43
Definition: model.h:40
Definition: model.h:53
rc_model_t
Definition: model.h:35
Definition: model.h:63
rc_model_category_t rc_model_category(void)
gets the general category for the current board
Definition: model.h:65
Definition: model.h:62
Definition: model.h:50
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:46
Definition: model.h:48
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:47
Definition: model.h:51
rc_model_category_t
Definition: model.h:61