HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
Loading...
Searching...
No Matches
tmc51x0_result.hpp File Reference

Result type for error handling in TMC51x0 driver. More...

#include <cstddef>
#include <cstdint>
#include <tuple>
#include <type_traits>
#include <utility>
Include dependency graph for tmc51x0_result.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tmc51x0::Result< T >
 Result type for operations that return a value. More...
 
class  tmc51x0::Result< void >
 Result type for operations that don't return a value. More...
 
struct  std::tuple_size< tmc51x0::Result< T > >
 
struct  std::tuple_size< tmc51x0::Result< void > >
 
struct  std::tuple_element< 0, tmc51x0::Result< T > >
 
struct  std::tuple_element< 1, tmc51x0::Result< T > >
 
struct  std::tuple_element< 0, tmc51x0::Result< void > >
 

Namespaces

namespace  tmc51x0
 
namespace  std
 

Typedefs

using tmc51x0::ResultVoid = Result<void>
 

Enumerations

enum class  tmc51x0::ErrorCode : uint8_t {
  tmc51x0::OK = 0 , tmc51x0::NOT_INITIALIZED , tmc51x0::COMM_ERROR , tmc51x0::INVALID_VALUE ,
  tmc51x0::INVALID_STATE , tmc51x0::TIMEOUT , tmc51x0::CANCELLED , tmc51x0::HARDWARE_ERROR ,
  tmc51x0::SHORT_CIRCUIT , tmc51x0::OPEN_LOAD , tmc51x0::OVERTEMP_WARNING , tmc51x0::OVERTEMP_SHUTDOWN ,
  tmc51x0::UNSUPPORTED
}
 Error codes for TMC51x0 operations. More...
 

Functions

const char * tmc51x0::ErrorMessage (ErrorCode code)
 Get human-readable error message.
 
template<std::size_t N, typename T >
decltype(auto) tmc51x0::get (Result< T > &r) noexcept
 Tuple-like access for structured bindings (C++17)
 
template<std::size_t N, typename T >
decltype(auto) tmc51x0::get (const Result< T > &r) noexcept
 
template<std::size_t N, typename T >
decltype(auto) tmc51x0::get (Result< T > &&r) noexcept
 
template<std::size_t N>
std::enable_if_t< N==0, ErrorCodetmc51x0::get (Result< void > &r) noexcept
 
template<std::size_t N>
std::enable_if_t< N==0, ErrorCodetmc51x0::get (const Result< void > &r) noexcept
 
template<std::size_t N>
std::enable_if_t< N==0, ErrorCodetmc51x0::get (Result< void > &&r) noexcept
 

Detailed Description

Result type for error handling in TMC51x0 driver.