FastLED
3.10.8
Loading...
Searching...
No Matches
cerrno.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
fl/stl/noexcept.h
"
4
5
// IWYU pragma: begin_keep
6
#include <errno.h>
7
// IWYU pragma: end_keep // okay banned header (STL wrapper requires standard header)
8
// Use C header <errno.h> instead of C++ <cerrno> for AVR platform compatibility
9
10
// Bring errno functionality into fl:: namespace
11
// Note: errno is a macro that expands to a thread-local lvalue.
12
// Error constants (EEXIST, ENOENT, etc.) are also macros, so we access them
13
// directly rather than trying to redefine them (which would cause macro expansion conflicts).
14
15
namespace
fl
{
16
17
// Inline function to get current errno value
18
// Use this instead of accessing ::errno directly for cleaner code
19
inline
int
get_errno
()
FL_NO_EXCEPT
{
20
return
errno;
21
}
22
23
// Inline function to set errno value
24
inline
void
set_errno
(
int
value
)
FL_NO_EXCEPT
{
25
errno =
value
;
26
}
27
28
// Inline function to clear errno
29
inline
void
clear_errno
()
FL_NO_EXCEPT
{
30
errno = 0;
31
}
32
33
// Error constants are available as global macros (EEXIST, ENOENT, etc.)
34
// They can be used directly: if (errno == EEXIST) { ... }
35
// We provide them in the fl:: namespace for documentation purposes
36
37
// Note: We do NOT redefine these as they are macros and will cause conflicts.
38
// Instead, users can access them directly: EEXIST, ENOENT, etc.
39
// Or use qualified access if needed, though the macros are global.
40
41
}
// namespace fl
fl::FL_NO_EXCEPT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition
blur.h:186
fl::value
constexpr int type_rank< T >::value
Definition
static_constexpr_defs.cpp.hpp:82
fl::set_errno
void set_errno(int value) FL_NO_EXCEPT
Definition
cerrno.h:24
fl::clear_errno
void clear_errno() FL_NO_EXCEPT
Definition
cerrno.h:29
fl::get_errno
int get_errno() FL_NO_EXCEPT
Definition
cerrno.h:19
fl
Base definition for an LED controller.
Definition
crgb.hpp:179
noexcept.h
fl
stl
cerrno.h
Generated on Sun Oct 18 2026 00:56:52 for FastLED by
1.13.2