FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
FastLED/src/platforms.cpp.hpp at master · FastLED/FastLED · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
FastLED
/
FastLED
Public
Notifications
You must be signed in to change notification settings
Fork
1.8k
Star
7.5k
Code
Issues
216
Pull requests
5
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
FastLED
/
src
/
platforms.cpp.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
56 lines (48 loc) · 2.25 KB
Breadcrumbs
FastLED
/
src
/
platforms.cpp.hpp
Copy path
File metadata and controls
56 lines (48 loc) · 2.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
/ @file platforms.cpp
//
/ Platform-specific functions and variables
//
/ Disables pragma messages and warnings
#
define
FASTLED_INTERNAL
#
include
"
fl/stl/compiler_control.h
"
#
include
"
platforms/is_platform.h
"
//
Removed duplicate weak definition of timer_millis for ATtiny1604.
//
The variable is already defined in avr_millis_timer_null_counter.hpp when needed,
//
so redefining it here caused multiple-definition linkage errors.
//
Provide a single consolidated weak timer_millis symbol for AVR tiny/x-y parts
//
whose cores do not export it, satisfying MS_COUNTER binding in led_sysdefs_avr.h.
//
This complements avr_millis_timer_null_counter.hpp when that TU is not built.
#
if
defined(FL_IS_AVR)
#
if
defined(FL_IS_AVR_ATTINY_MODERN) || defined(ARDUINO_attinyxy6)
#
ifdef
__cplusplus
extern
"
C
"
{
# endif
FL_LINK_WEAK
volatile
unsigned
long
timer_millis =
0
;
#
ifdef
__cplusplus
}
#
endif
# endif
#endif
//
Interrupt handlers cannot be defined in the header.
//
They must be defined as C functions, or they won't
//
be found (due to name mangling), and thus won't
//
override any default weak definition.
#
if
defined(FL_IS_NRF52)
#
include
"
platforms/arm/is_arm.h
"
//
ok platform headers
#
include
"
platforms/arm/nrf52/led_sysdefs_arm_nrf52.h
"
//
ok platform headers
#
include
"
platforms/arm/nrf52/arbiter_nrf52.h
"
//
ok platform headers
fl::
u32
isrCount;
FL_EXTERN_C_BEGIN
//
NOTE: Update platforms.cpp in root of FastLED library if this changes
#
if
FL_NRF52_ENABLE_PWM_INSTANCE0 && FL_NRF52_USE_PWM_INTERRUPTS
void
PWM0_IRQHandler
(
void
) { ++isrCount; PWM_Arbiter<
0
>::
isr_handler
(); }
#
endif
#
if
FL_NRF52_ENABLE_PWM_INSTANCE1 && FL_NRF52_USE_PWM_INTERRUPTS
void
PWM1_IRQHandler
(
void
) { ++isrCount; PWM_Arbiter<
1
>::
isr_handler
(); }
#
endif
#
if
FL_NRF52_ENABLE_PWM_INSTANCE2 && FL_NRF52_USE_PWM_INTERRUPTS
void
PWM2_IRQHandler
(
void
) { ++isrCount; PWM_Arbiter<
2
>::
isr_handler
(); }
#
endif
#
if
FL_NRF52_ENABLE_PWM_INSTANCE3 && FL_NRF52_USE_PWM_INTERRUPTS
void
PWM3_IRQHandler
(
void
) { ++isrCount; PWM_Arbiter<
3
>::
isr_handler
(); }
#
endif
FL_EXTERN_C_END
#
endif
//
defined(FL_IS_NRF52)
Back
|
FazBrowse Home
|
New Git URL