Display_Lib_RPI 2.3.0
A C++ Library to connect electronic displays to Linux single board computers.
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Enumerations | Functions | Variables
rdlib Namespace Reference

Name space for common utilities. More...

Enumerations

enum  Return_Codes_e : uint8_t {
  Success = 0 , Reserved = 1 , WrongFont = 2 , CharScreenBounds = 3 ,
  CharFontASCIIRange = 4 , CharArrayNullptr = 5 , FontDataEmpty = 6 , BitmapDataEmpty = 7 ,
  BitmapScreenBounds = 8 , BitmapLargerThanScreen = 9 , BitmapVerticalSize = 10 , BitmapHorizontalSize = 11 ,
  BitmapSize = 12 , CustomCharLen = 13 , BufferSize = 14 , BufferEmpty = 15 ,
  SPIOpenFailure = 16 , SPICloseFailure = 17 , I2CbeginFail = 18 , I2CcloseFail = 19 ,
  ShapeScreenBounds = 20 , MemoryAError = 21 , WrongInputPCBType = 22 , GpioChipDevice = 23 ,
  GpioPinClaim = 24 , GpioPinFree = 25 , WrongModeChosen = 26 , GenericError = 27 ,
  UnknownError = 28 , InvalidRAMLocation = 29
}
 

Functions

std::string ReturnCodetoText (rdlib::Return_Codes_e code)
 Prints out Enum label and help message for given enum code from Return_Codes_e.
 
uint16_t LibraryVersion (void)
 get the library version number
 

Variables

constexpr std::array< const char *, 30 > ReturnCodesStrings
 

Detailed Description

Name space for common utilities.

Enumeration Type Documentation

◆ Return_Codes_e

enum rdlib::Return_Codes_e : uint8_t

Enum to define a standard return code for most functions that return failures

Enumerator
Success 

Success, Function ran without defined Error :)

Reserved 

Reserved for future use

WrongFont 

Wrong Font selected

CharScreenBounds 

Text Character is out of Screen bounds, Check x and y

CharFontASCIIRange 

Text Character is outside of chosen Fonts ASCII range, Check the selected Fonts ASCII range.

CharArrayNullptr 

Text Character Array is an invalid pointer object

FontDataEmpty 

Span to the font data is an empty object

BitmapDataEmpty 

The Bitmap span is an empty object

BitmapScreenBounds 

The Bitmap starting point is outside screen bounds, check x and y

BitmapLargerThanScreen 

The Bitmap is larger than screen, check w and h

BitmapVerticalSize 

A vertical Bitmap's height must be divisible by 8.

BitmapHorizontalSize 

A horizontal Bitmap's width must be divisible by 8

BitmapSize 

Size of the Bitmap is incorrect: BitmapSize(vertical)!=(w*(h/8),BitmapSize(horizontal)!=(w/8)*h

CustomCharLen 

Char array is incorrect size

BufferSize 

Size of the Buffer is incorrect: BufferSize(vertical)!=(w*(h/8)

BufferEmpty 

The Buffer span is an empty object

SPIOpenFailure 

Failed to open HW SPI , lgpio

SPICloseFailure 

Failed to close HW SPI , lgpio

I2CbeginFail 

Failed to open I2C , lgpio

I2CcloseFail 

Failed to close I2C , lgpio

ShapeScreenBounds 

Shape is outside screen bounds, check x and y

MemoryAError 

Could not assign memory

WrongInputPCBType 

Wrong input PCB type chosen

GpioChipDevice 

Failed to open or close GPIO chip device, lgpio

GpioPinClaim 

Failed to claim a GPIO for output or input, lgpio

GpioPinFree 

Failed to free a GPIO for output or input, lgpio

WrongModeChosen 

Wrong SPI communication mode chosen by user

GenericError 

Generic Error message, for minor errors

UnknownError 

For Unknown Errors

InvalidRAMLocation 

Invalid Display RAM location

Function Documentation

◆ LibraryVersion()

uint16_t rdlib::LibraryVersion ( void  )

get the library version number

Returns
the library version number eg 120 = 1.2.0

◆ ReturnCodetoText()

std::string rdlib::ReturnCodetoText ( rdlib::Return_Codes_e  code)

Prints out Enum label and help message for given enum code from Return_Codes_e.

Parameters
codean enum code from Return_Codes_e
Returns
A String containing the error enum and message

Variable Documentation

◆ ReturnCodesStrings

constexpr std::array<const char*, 30> rdlib::ReturnCodesStrings
constexpr

String array to hold error data so user if in possession of an error code can print out message , the message consists of the enum label and its associated comment