FastLED 3.10.8
Loading...
Searching...
No Matches
handler.cpp.hpp
Go to the documentation of this file.
1
3
5#include "platforms/isr.h"
6#include "fl/stl/noexcept.h"
7
8namespace fl {
9namespace isr {
10
11int attach_timer_handler(const config& cfg, handle* out_handle) FL_NO_EXCEPT {
12 return isr::platforms::attach_timer_handler(cfg, out_handle);
13}
14
15int attach_external_handler(u8 pin, const config& cfg, handle* out_handle) FL_NO_EXCEPT {
16 return isr::platforms::attach_external_handler(pin, cfg, out_handle);
17}
18
20 return isr::platforms::detach_handler(h);
21}
22
24 return isr::platforms::enable_handler(h);
25}
26
28 return isr::platforms::disable_handler(h);
29}
30
32 return isr::platforms::is_handler_enabled(h);
33}
34
35const char* get_error_string(int error_code) FL_NO_EXCEPT {
36 return isr::platforms::get_error_string(error_code);
37}
38
40 return isr::platforms::get_platform_name();
41}
42
44 return isr::platforms::get_max_timer_frequency();
45}
46
48 return isr::platforms::get_min_timer_frequency();
49}
50
52 return isr::platforms::get_max_priority();
53}
54
56 return isr::platforms::requires_assembly_handler(priority);
57}
58
59} // namespace isr
60} // namespace fl
ISR handler types and API declarations.
u32 get_min_timer_frequency() FL_NO_EXCEPT
Get the minimum timer frequency supported by this platform.
bool is_handler_enabled(const handle &h) FL_NO_EXCEPT
Query if an ISR is currently enabled.
u32 get_max_timer_frequency() FL_NO_EXCEPT
Get the maximum timer frequency supported by this platform.
u8 get_max_priority() FL_NO_EXCEPT
Get the maximum priority level supported by this platform.
bool requires_assembly_handler(u8 priority) FL_NO_EXCEPT
Check if assembly is required for a given priority level.
const char * get_error_string(int error_code) FL_NO_EXCEPT
Get platform-specific error description.
int disable_handler(handle &h) FL_NO_EXCEPT
Disable an ISR temporarily (without detaching).
const char * get_platform_name() FL_NO_EXCEPT
Get the platform name.
int enable_handler(handle &h) FL_NO_EXCEPT
Enable an ISR (after temporary disable).
int attach_timer_handler(const config &cfg, handle *out_handle) FL_NO_EXCEPT
Attach a timer-based ISR handler.
int attach_external_handler(u8 pin, const config &cfg, handle *out_handle) FL_NO_EXCEPT
Attach an external interrupt handler (GPIO-based).
int detach_handler(handle &h) FL_NO_EXCEPT
Detach an ISR handler.
unsigned char u8
Definition stdint.h:131
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Definition blur.h:186
Base definition for an LED controller.
Configuration for ISR attachment.
Definition handler.h:19
Opaque handle to an attached ISR.
Definition handler.h:36