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 "export.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
20FASTLED_EXPORT void sketch_setup(void);
21
24FASTLED_EXPORT void sketch_loop(void);
25
26#ifdef __cplusplus
27}
28#endif
29
30// ================================================================================================
31// IMPLEMENTATIONS (when building FastLED as shared library)
32// ================================================================================================
33
34#ifdef FASTLED_LIBRARY_SHARED
35
36#ifdef __cplusplus
37// Forward declarations - provided by sketch
38extern void setup();
39extern void loop();
40
41// Provide implementations for the exported functions
42FASTLED_EXPORT void sketch_setup() {
43 setup();
44}
45
46FASTLED_EXPORT void sketch_loop() {
47 loop();
48}
49#endif // __cplusplus
50
51#endif // FASTLED_LIBRARY_SHARED
52
53#endif // FASTLED_BUILD_EXPORTS
void setup()
void loop()
#define FASTLED_EXPORT
Definition export.h:25
Cross-platform export macros for FastLED dynamic library support.