Robot Control Library
Model

Description

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

Typedefs

typedef enum rc_model_t rc_model_t
 
typedef enum rc_model_category_t rc_model_category_t
 

Functions

rc_model_t rc_model (void)
 gets the current board model name More...
 
rc_model_category_t rc_model_category (void)
 gets the general category for the current board More...
 
void rc_model_print (void)
 prints to the screen the human-readable version of the model name with no trailing newline character. More...
 
void rc_model_category_print (void)
 prints to the screen the human-readable version of the category name with no trailing newline character. More...
 

Enumeration Type Documentation

◆ rc_model_t

enum 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_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 

Function Documentation

◆ rc_model()

rc_model_t rc_model ( void  )

gets the current board model name

Returns
rc_model_t enum representation of model

◆ rc_model_category()

rc_model_category_t rc_model_category ( void  )

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.