FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
errors Namespace Reference

This namespace defines common errors that can be returned by some FastArduino API methods, e.g. More...

Variables

constexpr const int EIO = -5
 Input/output error. More...
 
constexpr const int EAGAIN = -11
 Try again. More...
 
constexpr const int EINVAL = -22
 Invalid argument or invalid Future. More...
 
constexpr const int ETIME = -62
 Timer expired. More...
 
constexpr const int EPROTO = -71
 Protocol error. More...
 
constexpr const int EILSEQ = -84
 Illegal byte sequence. More...
 
constexpr const int EMSGSIZE = -90
 Message too long. More...
 

Detailed Description

This namespace defines common errors that can be returned by some FastArduino API methods, e.g.

devices::rf::NRF24L01. New errors will be added here as required. These definitions are similar to standard C errno.h; however, please note that FastArduino does not define a global errno, as in standard C, to store the last occurred error. The error constants defined here are directly returned, as int, by some methods in FastArduino API. Also, only error codes potentially returned by FastArduino API are defined here.

By convention, in order to allow methods to return sizes (positive int) and report errors at the same time, all errors defined must be strictly negative.

Variable Documentation

◆ EIO

constexpr const int errors::EIO = -5
constexpr

Input/output error.

Definition at line 40 of file errors.h.

◆ EAGAIN

constexpr const int errors::EAGAIN = -11
constexpr

Try again.

This may happen when limited resources are exhausted but could be released.

Definition at line 46 of file errors.h.

◆ EINVAL

constexpr const int errors::EINVAL = -22
constexpr

Invalid argument or invalid Future.

Definition at line 49 of file errors.h.

◆ ETIME

constexpr const int errors::ETIME = -62
constexpr

Timer expired.

Definition at line 52 of file errors.h.

◆ EPROTO

constexpr const int errors::EPROTO = -71
constexpr

Protocol error.

This may happen on I2C transactions.

Definition at line 58 of file errors.h.

◆ EILSEQ

constexpr const int errors::EILSEQ = -84
constexpr

Illegal byte sequence.

This may happen in I2C transactions when an associated Future cannot be read or written.

Definition at line 65 of file errors.h.

◆ EMSGSIZE

constexpr const int errors::EMSGSIZE = -90
constexpr

Message too long.


Definition at line 68 of file errors.h.