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
23extern "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 */
35typedef enum rc_model_t{
56
57
58/**
59 * This is a list of general categories of boards.
60 */
67
68
69/**
70 * @brief gets the current board model name
71 *
72 * @return rc_model_t enum representation of model
73 */
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 */
83
84
85/**
86 * @brief prints to the screen the human-readable version of the model name
87 * with no trailing newline character.
88 */
89void 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 */
97
98
99#ifdef __cplusplus
100}
101#endif
102
103#endif // RC_MODEL_H
104
105/** @} end group Model*/
rc_model_category_t
Definition: model.h:61
rc_model_t rc_model(void)
gets the current board model name
void rc_model_print(void)
prints to the screen the human-readable version of the model name with no trailing newline character.
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_category_t rc_model_category(void)
gets the general category for the current board
rc_model_t
Definition: model.h:35
@ CATEGORY_PC
Definition: model.h:65
@ CATEGORY_BEAGLEBONE
Definition: model.h:63
@ CATEGORY_UNKNOWN
Definition: model.h:62
@ CATEGORY_RPI
Definition: model.h:64
@ MODEL_BB_BLACK_W
Definition: model.h:39
@ MODEL_BB_BLACK_W_RC
Definition: model.h:40
@ MODEL_RPI_CM
Definition: model.h:52
@ MODEL_RPI3_B
Definition: model.h:48
@ MODEL_RPI0_W
Definition: model.h:51
@ MODEL_BB_BLUE
Definition: model.h:43
@ MODEL_BB_GREEN_W
Definition: model.h:42
@ MODEL_RPI0
Definition: model.h:50
@ MODEL_RPI3_B_PLUS
Definition: model.h:49
@ MODEL_BB_BLACK
Definition: model.h:37
@ MODEL_RPI_B
Definition: model.h:45
@ MODEL_UNKNOWN
Definition: model.h:36
@ MODEL_RPI_CM3
Definition: model.h:53
@ MODEL_RPI_B_PLUS
Definition: model.h:46
@ MODEL_BB_BLACK_RC
Definition: model.h:38
@ MODEL_RPI2_B
Definition: model.h:47
@ MODEL_BB_GREEN
Definition: model.h:41
@ MODEL_PC
Definition: model.h:54
@ MODEL_BB_POCKET
Definition: model.h:44