Nintendo R.O.B. Control Library  v1.1.2
Library to control the Nintendo Robotic Operating Buddy
hal_error.hpp
Go to the documentation of this file.
1 #ifndef HAL_ERROR_HPP
2 #define HAL_ERROR_HPP
3 
4 #ifndef __AVR__
5  #include <system_error>
6  #include <type_traits>
7 #endif
8 
9 namespace nes { namespace rob {
10 
14 enum class hal_error
15 {
16  success = 0,
18  sys_clock,
19  sys_config,
20 };
21 
22 #ifndef __AVR__
23 
25 std::error_condition make_error_condition(hal_error e);
26 
27 #else // __AVR__
28 
29 typedef int error_code;
30 
31 #endif // not __AVR__
32 
33 error_code make_error_code(hal_error e);
34 
35 }} // namespace nes::rob
36 
37 #ifndef __AVR__
38 
39 namespace std {
40 
41 template <>
42 struct is_error_code_enum<nes::rob::hal_error> : true_type {};
43 
44 }
45 
46 #endif // not __AVR__
47 
48 #endif // HAL_ERROR_HPP
std::error_code error_code
Definition: hal_error.hpp:24
hal_error
Hardware Abstraction Layer Errors.
Definition: hal_error.hpp:15
Definition: arduino_debug_driver.hpp:6