Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
3b3612c6
Commit
3b3612c6
authored
Oct 8, 2016
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
esp8266: Make neopixel support configurable.
To save iRAM.
parent
dc43508c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
esp8266/espneopixel.c
+5
-0
5 additions, 0 deletions
esp8266/espneopixel.c
esp8266/modesp.c
+2
-0
2 additions, 0 deletions
esp8266/modesp.c
esp8266/mpconfigport.h
+1
-0
1 addition, 0 deletions
esp8266/mpconfigport.h
with
8 additions
and
0 deletions
esp8266/espneopixel.c
+
5
−
0
View file @
3b3612c6
...
...
@@ -5,6 +5,9 @@
// ESP8266 work for the NeoPixelBus library: github.com/Makuna/NeoPixelBus
// Needs to be a separate .c file to enforce ICACHE_RAM_ATTR execution.
#include
"py/mpconfig.h"
#if MICROPY_ESP8266_NEOPIXEL
#include
"c_types.h"
#include
"eagle_soc.h"
#include
"user_interface.h"
...
...
@@ -58,3 +61,5 @@ void /*ICACHE_RAM_ATTR*/ esp_neopixel_write(uint8_t pin, uint8_t *pixels, uint32
while
((
mp_hal_ticks_cpu
()
-
startTime
)
<
period
);
// Wait for last bit
mp_hal_quiet_timing_exit
(
irq_state
);
}
#endif // MICROPY_ESP8266_NEOPIXEL
This diff is collapsed.
Click to expand it.
esp8266/modesp.c
+
2
−
0
View file @
3b3612c6
...
...
@@ -710,7 +710,9 @@ STATIC const mp_map_elem_t esp_module_globals_table[] = {
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_socket
),
(
mp_obj_t
)
&
esp_socket_type
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_getaddrinfo
),
(
mp_obj_t
)
&
esp_getaddrinfo_obj
},
#endif
#if MICROPY_ESP8266_NEOPIXEL
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_neopixel_write
),
(
mp_obj_t
)
&
esp_neopixel_write_obj
},
#endif
#if MICROPY_ESP8266_APA102
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_apa102_write
),
(
mp_obj_t
)
&
esp_apa102_write_obj
},
#endif
...
...
This diff is collapsed.
Click to expand it.
esp8266/mpconfigport.h
+
1
−
0
View file @
3b3612c6
...
...
@@ -91,6 +91,7 @@
#define MICROPY_FSUSERMOUNT (1)
#define MICROPY_VFS_FAT (1)
#define MICROPY_ESP8266_APA102 (1)
#define MICROPY_ESP8266_NEOPIXEL (1)
#define MICROPY_EVENT_POLL_HOOK {ets_event_poll();}
#define MICROPY_VM_HOOK_COUNT (10)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment