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
45f34168
Commit
45f34168
authored
9 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
esp8266: Enable DHT C-level driver.
Exposed as esp.dht_readinto. Probably should go somewhere less port-specific.
parent
48a7ef05
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
esp8266/Makefile
+6
-1
6 additions, 1 deletion
esp8266/Makefile
esp8266/esp_mphal.h
+4
-0
4 additions, 0 deletions
esp8266/esp_mphal.h
esp8266/modesp.c
+2
-0
2 additions, 0 deletions
esp8266/modesp.c
with
12 additions
and
1 deletion
esp8266/Makefile
+
6
−
1
View file @
45f34168
...
@@ -124,6 +124,10 @@ LIB_SRC_C = $(addprefix lib/,\
...
@@ -124,6 +124,10 @@ LIB_SRC_C = $(addprefix lib/,\
fatfs/option/ccsbcs.c
\
fatfs/option/ccsbcs.c
\
)
)
DRIVERS_SRC_C
=
$(
addprefix drivers/,
\
dht/dht.c
\
)
SRC_S
=
\
SRC_S
=
\
gchelper.s
\
gchelper.s
\
...
@@ -134,10 +138,11 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
...
@@ -134,10 +138,11 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
OBJ
+=
$(
addprefix
$(
BUILD
)
/,
$(
STM_SRC_C:.c
=
.o
))
OBJ
+=
$(
addprefix
$(
BUILD
)
/,
$(
STM_SRC_C:.c
=
.o
))
OBJ
+=
$(
addprefix
$(
BUILD
)
/,
$(
EXTMOD_SRC_C:.c
=
.o
))
OBJ
+=
$(
addprefix
$(
BUILD
)
/,
$(
EXTMOD_SRC_C:.c
=
.o
))
OBJ
+=
$(
addprefix
$(
BUILD
)
/,
$(
LIB_SRC_C:.c
=
.o
))
OBJ
+=
$(
addprefix
$(
BUILD
)
/,
$(
LIB_SRC_C:.c
=
.o
))
OBJ
+=
$(
addprefix
$(
BUILD
)
/,
$(
DRIVERS_SRC_C:.c
=
.o
))
#OBJ += $(BUILD)/pins_$(BOARD).o
#OBJ += $(BUILD)/pins_$(BOARD).o
# List of sources for qstr extraction
# List of sources for qstr extraction
SRC_QSTR
+=
$(
SRC_C
)
$(
STM_SRC_C
)
$(
EXTMOD_SRC_C
)
SRC_QSTR
+=
$(
SRC_C
)
$(
STM_SRC_C
)
$(
EXTMOD_SRC_C
)
$(
DRIVERS_SRC_C
)
# Append any auto-generated sources that are needed by sources listed in SRC_QSTR
# Append any auto-generated sources that are needed by sources listed in SRC_QSTR
SRC_QSTR_AUTO_DEPS
+=
SRC_QSTR_AUTO_DEPS
+=
...
...
This diff is collapsed.
Click to expand it.
esp8266/esp_mphal.h
+
4
−
0
View file @
45f34168
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#define _INCLUDED_MPHAL_H_
#define _INCLUDED_MPHAL_H_
#include
"py/ringbuf.h"
#include
"py/ringbuf.h"
#include
"xtirq.h"
void
mp_keyboard_interrupt
(
void
);
void
mp_keyboard_interrupt
(
void
);
extern
int
interrupt_char
;
extern
int
interrupt_char
;
...
@@ -62,6 +63,9 @@ void ets_event_poll(void);
...
@@ -62,6 +63,9 @@ void ets_event_poll(void);
#include
"osapi.h"
#include
"osapi.h"
#define mp_hal_delay_us_fast(us) os_delay_us(us)
#define mp_hal_delay_us_fast(us) os_delay_us(us)
#define mp_hal_quiet_timing_enter() disable_irq()
#define mp_hal_quiet_timing_exit(irq_state) enable_irq(irq_state)
// C-level pin HAL
// C-level pin HAL
#include
"etshal.h"
#include
"etshal.h"
#include
"gpio.h"
#include
"gpio.h"
...
...
This diff is collapsed.
Click to expand it.
esp8266/modesp.c
+
2
−
0
View file @
45f34168
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include
"py/runtime.h"
#include
"py/runtime.h"
#include
"py/mperrno.h"
#include
"py/mperrno.h"
#include
"py/mphal.h"
#include
"py/mphal.h"
#include
"drivers/dht/dht.h"
#include
"netutils.h"
#include
"netutils.h"
#include
"queue.h"
#include
"queue.h"
#include
"ets_sys.h"
#include
"ets_sys.h"
...
@@ -691,6 +692,7 @@ STATIC const mp_map_elem_t esp_module_globals_table[] = {
...
@@ -691,6 +692,7 @@ STATIC const mp_map_elem_t esp_module_globals_table[] = {
#endif
#endif
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_neopixel_write
),
(
mp_obj_t
)
&
esp_neopixel_write_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_neopixel_write
),
(
mp_obj_t
)
&
esp_neopixel_write_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_apa102_write
),
(
mp_obj_t
)
&
esp_apa102_write_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_apa102_write
),
(
mp_obj_t
)
&
esp_apa102_write_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_dht_readinto
),
(
mp_obj_t
)
&
dht_readinto_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_freemem
),
(
mp_obj_t
)
&
esp_freemem_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_freemem
),
(
mp_obj_t
)
&
esp_freemem_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_meminfo
),
(
mp_obj_t
)
&
esp_meminfo_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_meminfo
),
(
mp_obj_t
)
&
esp_meminfo_obj
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_info
),
(
mp_obj_t
)
&
pyb_info_obj
},
// TODO delete/rename/move elsewhere
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_info
),
(
mp_obj_t
)
&
pyb_info_obj
},
// TODO delete/rename/move elsewhere
...
...
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