SparkFun Toolkit  v1.0.5-6-g34ffa30
Core Functionality Library
Loading...
Searching...
No Matches
sfTkError.h File Reference

Header file for the SparkFun Toolkit - Base Error Code defines. More...

#include <stdint.h>
Include dependency graph for sfTkError.h:
This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Header file for the SparkFun Toolkit - Base Error Code defines.

This file contains the base error code definitions for the SparkFun Toolkit library.

Author
SparkFun Electronics
Date
2024-2025

SPDX-License-Identifier: MIT

Typedef Documentation

◆ sfTkError_t

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.

Variable Documentation

◆ ksfTkErrBaseBus

const sfTkError_t ksfTkErrBaseBus = 0x1000

A base value for bus errors. All bus errors are greater than this value, in the 1000 range.

◆ ksfTkErrFail

const sfTkError_t ksfTkErrFail = -1

General error code for a failure. Note all errors are negative.

◆ ksfTkErrInvalidParam

const sfTkError_t ksfTkErrInvalidParam = -2

Invalid parameter error.

◆ ksfTkErrOk

const sfTkError_t ksfTkErrOk = 0

The error code value for success. This is always 0.