FastLED 3.9.15
Loading...
Searching...
No Matches
dll.h
Go to the documentation of this file.
1#pragma once
2
5
6#ifndef FASTLED_BUILD_EXPORTS
7#define FASTLED_BUILD_EXPORTS 0
8#endif
9
10#if FASTLED_BUILD_EXPORTS
11
12#include "fl/system/export.h"
13
15
18FASTLED_EXPORT void sketch_setup(void);
19
22FASTLED_EXPORT void sketch_loop(void);
23
25
26// ================================================================================================
27// IMPLEMENTATIONS (when building FastLED as shared library)
28// ================================================================================================
29
30#ifdef FASTLED_LIBRARY_SHARED
31
32#ifdef __cplusplus
33// Forward declarations - provided by sketch
34extern void setup();
35extern void loop();
36
37// Provide implementations for the exported functions
38FASTLED_EXPORT void sketch_setup() {
39 setup();
40}
41
42FASTLED_EXPORT void sketch_loop() {
43 loop();
44}
45#endif // __cplusplus
46
47#endif // FASTLED_LIBRARY_SHARED
48
49#endif // FASTLED_BUILD_EXPORTS
void setup()
void loop()
#define FASTLED_EXPORT
Definition export.h:27
Cross-platform export macros for FastLED dynamic library support.
#define FL_EXTERN_C_BEGIN
#define FL_EXTERN_C_END