![]() |
SparkFun Toolkit
v1.0.5-6-g34ffa30
Core Functionality Library
|
Header file for the SparkFun Toolkit - Base Error Code defines. More...
#include <stdint.h>
Go to the source code of this file.
Typedefs | |
typedef int32_t | sfTkError_t |
Variables | |
const sfTkError_t | ksfTkErrFail = -1 |
General error code for a failure. Note all errors are negative. More... | |
const sfTkError_t | ksfTkErrOk = 0 |
The error code value for success. This is always 0. More... | |
const sfTkError_t | ksfTkErrInvalidParam = -2 |
Invalid parameter error. More... | |
const sfTkError_t | ksfTkErrBaseBus = 0x1000 |
A base value for bus errors. All bus errors are greater than this value, in the 1000 range. More... | |
Header file for the SparkFun Toolkit - Base Error Code defines.
This file contains the base error code definitions for the SparkFun Toolkit library.
SPDX-License-Identifier: MIT
typedef int32_t sfTkError_t |
General Concept A SparkFun Toolkit error system. The goal is to keep this simple.
This mimics a variety of systems, using an int type for error codes, where: 0 = okay -1 = general failure >0 = an informative error
Since subsystems in the toolkit can have their own errors, A start range for these errors are defined. Values > than this value define the errors for the set subsystem. These start ranges are set in this file, with actual error values defined in the the respective subsystem header files.
const sfTkError_t ksfTkErrBaseBus = 0x1000 |
A base value for bus errors. All bus errors are greater than this value, in the 1000 range.
const sfTkError_t ksfTkErrFail = -1 |
General error code for a failure. Note all errors are negative.
const sfTkError_t ksfTkErrInvalidParam = -2 |
Invalid parameter error.
const sfTkError_t ksfTkErrOk = 0 |
The error code value for success. This is always 0.