Error codes Readme

February 12, 2026 ยท View on GitHub

Error codes for rdlib::Return_Codes_e returned by most functions. The enum has a utility function that can print out the label and its comment, (ReturnCodetoText())

Enum Text LabelNumberDetails
rdlib::Success0Success, Function ran without defined Error
rdlib::Reserved1Reserved for future use
rdlib::WrongFont2Wrong Font selected
rdlib::CharScreenBounds3Text Character is out of Screen bounds, Check x and y
rdlib::CharFontASCIIRange4Text Character is outside of chosen Fonts ASCII range, Check the selected Fonts ASCII range.
rdlib::CharArrayNullptr5Text Character Array is an invalid pointer object
rdlib::FontDataEmpty6Font span is empty object
rdlib::BitmapDataEmpty7The Bitmap Span is an empty object
rdlib::BitmapScreenBounds8The Bitmap starting point is outside screen bounds, check x and y
rdlib::BitmapLargerThanScreen9The Bitmap is larger than screen, check w and h
rdlib::BitmapVerticalSize10A vertical Bitmap's height must be divisible by 8.
rdlib::BitmapHorizontalSize11A horizontal Bitmap's width must be divisible by 8
rdlib::BitmapSize12Size of the Bitmap is incorrect: BitmapSize(vertical)!=(w*(h/8),BitmapSize(horizontal)!=(w/8)*h
rdlib::CustomCharLen13CustomChar array must always be 5 bytes long
rdlib::BufferSize14Size of the Buffer is incorrect: BufferSize(vertical)!=(w*(h/8)
rdlib::BufferEmpty15The Buffer span is an empty object
rdlib::SPIOpenFailure16Failed to open HW SPI , lgpio
rdlib::SPICloseFailure17Failed to close HW SPI , lgpio
rdlib::I2CbeginFail18Failed to open I2C , lgpio
rdlib::I2CcloseFail19Failed to close I2C , lgpio
rdlib::ShapeScreenBounds20Shape is outside screen bounds, check x and y
rdlib::MemoryAError21Could not assign memory
rdlib::WrongInputPCBType22Wrong input PCB type chosen
rdlib::GpioChipDevice23Failed to open or close Gpio chip device, lgpio
rdlib::GpioPinClaim24Failed to claim a GPIO for output or input, lgpio
rdlib::GpioPinFree25Failed to free a GPIO for output or input, lgpio
rdlib::WrongModeChosen26Wrong SPI communication mode chosen by user
rdlib::GenericError27Generic Error message, for minor misc errors
rdlib::UnknownError28For unknown error events
rdlib::InvalidRAMLocation29Invalid Display RAM location
rdlib::SPIWriteFailure30Failed to write to HW SPI , lgpio
rdlib::WrongBufferMode31Wrong Buffer mode selected for function see Advanced Screen Buffer