Determine the model of board currently being used.
<rc/model.h>
The user may sometimes need to determine which board they are running on to decide which pins or modules to use. These functions are also used internally to the library for hardware specific configuration. See the rc_model example for a demonstration.
- Author
- James Strawson
- Date
- 1/31/2018
◆ rc_model_t
List of models detectable by the rc_model() function. This is not a complete list of board this library will run on. Nor is it a list of boards that the library is guaranteed to work on. Currently, MODEL_PC indicates personal computer and will be selected whenever running on an x86 or x86_64 architecture machine until more specific boards are added to this list by user request.
Enumerator |
---|
MODEL_UNKNOWN | |
MODEL_BB_BLACK | |
MODEL_BB_BLACK_RC | |
MODEL_BB_BLACK_W | |
MODEL_BB_BLACK_W_RC | |
MODEL_BB_GREEN | |
MODEL_BB_GREEN_W | |
MODEL_BB_BLUE | |
MODEL_BB_POCKET | |
MODEL_RPI_B | |
MODEL_RPI_B_PLUS | |
MODEL_RPI2_B | |
MODEL_RPI3_B | |
MODEL_RPI3_B_PLUS | |
MODEL_RPI0 | |
MODEL_RPI0_W | |
MODEL_RPI_CM | |
MODEL_RPI_CM3 | |
MODEL_PC | |
◆ rc_model_category_t
This is a list of general categories of boards.
Enumerator |
---|
CATEGORY_UNKNOWN | |
CATEGORY_BEAGLEBONE | |
CATEGORY_RPI | |
CATEGORY_PC | |
◆ rc_model()
gets the current board model name
- Returns
- rc_model_t enum representation of model
◆ rc_model_category()
gets the general category for the current board
- Returns
- rc_model_category_t enum representation of categoy
◆ rc_model_print()
void rc_model_print |
( |
void |
| ) |
|
prints to the screen the human-readable version of the model name with no trailing newline character.
- Examples:
- rc_model.c, and rc_test_drivers.c.
◆ rc_model_category_print()
void rc_model_category_print |
( |
void |
| ) |
|
prints to the screen the human-readable version of the category name with no trailing newline character.
- Examples:
- rc_model.c.