Skip to content
Snippets Groups Projects
Commit d2da2738 authored by Luca Erbetta's avatar Luca Erbetta :rocket:
Browse files

[Sensos] Moved SensorErrors enum to SensorData.h

parent f83a8aac
Branches
Tags
No related merge requests found
...@@ -40,27 +40,6 @@ struct checkIfProduces ...@@ -40,27 +40,6 @@ struct checkIfProduces
{ {
}; };
/**
* @brief Generic error codes that a sensor can generate.
*
* Sensors can extend this enum by defining a new set of errors,
* starting from END_OF_BASE_ERRORS.
*/
enum SensorErrors : uint8_t
{
NO_ERRORS = 0,
INVALID_WHOAMI = 1,
INIT_FAIL = 2,
NOT_INIT = 3, // if some method called before init()
ALREADY_INIT = 4, // if init() called multiple times
SELF_TEST_FAIL = 5,
BUS_FAULT = 6,
NO_NEW_DATA = 7, // no new data available from the sensor
INVALID_FIFO_INDEX = 8,
DMA_ERROR = 9,
END_OF_BASE_ERRORS = 10 // used to extend this enum
};
/** /**
* @brief Base abstract class for sensor drivers. * @brief Base abstract class for sensor drivers.
*/ */
......
...@@ -24,6 +24,27 @@ ...@@ -24,6 +24,27 @@
#include <ostream> #include <ostream>
/**
* @brief Generic error codes that a sensor can generate.
*
* Sensors can extend this enum by defining a new set of errors,
* starting from END_OF_BASE_ERRORS.
*/
enum SensorErrors : uint8_t
{
NO_ERRORS = 0,
INVALID_WHOAMI = 1,
INIT_FAIL = 2,
NOT_INIT = 3, // if some method called before init()
ALREADY_INIT = 4, // if init() called multiple times
SELF_TEST_FAIL = 5,
BUS_FAULT = 6,
NO_NEW_DATA = 7, // no new data available from the sensor
INVALID_FIFO_INDEX = 8,
DMA_ERROR = 9,
END_OF_BASE_ERRORS = 10 // used to extend this enum
};
/** /**
* @brief Structure to handle sensor data timestamp. * @brief Structure to handle sensor data timestamp.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment