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
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
5699fc9d
Commit
5699fc9d
authored
9 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
esp8266: Switch to standard mp_hal_delay_us() MPHAL function.
parent
a2e0d92e
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
esp8266/esp_mphal.c
+3
-3
3 additions, 3 deletions
esp8266/esp_mphal.c
esp8266/esp_mphal.h
+1
-1
1 addition, 1 deletion
esp8266/esp_mphal.h
esp8266/main.c
+1
-1
1 addition, 1 deletion
esp8266/main.c
esp8266/modpyb.c
+1
-1
1 addition, 1 deletion
esp8266/modpyb.c
with
6 additions
and
6 deletions
esp8266/esp_mphal.c
+
3
−
3
View file @
5699fc9d
...
...
@@ -46,7 +46,7 @@ void mp_hal_feed_watchdog(void) {
//wdt_feed(); // might also work
}
void
mp_hal_
u
delay
(
uint32_t
us
)
{
void
mp_hal_delay
_us
(
uint32_t
us
)
{
ets_delay_us
(
us
);
}
...
...
@@ -56,7 +56,7 @@ int mp_hal_stdin_rx_chr(void) {
if
(
c
!=
-
1
)
{
return
c
;
}
mp_hal_
u
delay
(
1
);
mp_hal_delay
_us
(
1
);
mp_hal_feed_watchdog
();
}
}
...
...
@@ -87,7 +87,7 @@ uint32_t HAL_GetTick(void) {
}
void
HAL_Delay
(
uint32_t
Delay
)
{
mp_hal_
u
delay
(
Delay
*
1000
);
mp_hal_delay
_us
(
Delay
*
1000
);
}
void
mp_hal_set_interrupt_char
(
int
c
)
{
...
...
This diff is collapsed.
Click to expand it.
esp8266/esp_mphal.h
+
1
−
1
View file @
5699fc9d
...
...
@@ -32,7 +32,6 @@ void ets_isr_mask(unsigned);
void
mp_hal_init
(
void
);
void
mp_hal_feed_watchdog
(
void
);
void
mp_hal_udelay
(
uint32_t
);
int
mp_hal_stdin_rx_chr
(
void
);
void
mp_hal_stdout_tx_str
(
const
char
*
str
);
void
mp_hal_stdout_tx_strn
(
const
char
*
str
,
uint32_t
len
);
...
...
@@ -40,6 +39,7 @@ void mp_hal_stdout_tx_strn_cooked(const char *str, uint32_t len);
uint32_t
HAL_GetTick
(
void
);
void
HAL_Delay
(
uint32_t
Delay
);
void
mp_hal_delay_us
(
uint32_t
);
void
mp_hal_set_interrupt_char
(
int
c
);
uint32_t
mp_hal_get_cpu_freq
(
void
);
...
...
This diff is collapsed.
Click to expand it.
esp8266/main.c
+
1
−
1
View file @
5699fc9d
...
...
@@ -56,7 +56,7 @@ STATIC void mp_reset(void) {
void
soft_reset
(
void
)
{
mp_hal_stdout_tx_str
(
"PYB: soft reset
\r\n
"
);
mp_hal_
u
delay
(
10000
);
// allow UART to flush output
mp_hal_delay
_us
(
10000
);
// allow UART to flush output
mp_reset
();
pyexec_event_repl_init
();
}
...
...
This diff is collapsed.
Click to expand it.
esp8266/modpyb.c
+
1
−
1
View file @
5699fc9d
...
...
@@ -137,7 +137,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(pyb_delay_obj, pyb_delay);
STATIC
mp_obj_t
pyb_udelay
(
mp_obj_t
usec_in
)
{
mp_int_t
usec
=
mp_obj_get_int
(
usec_in
);
if
(
usec
>=
0
)
{
mp_hal_
u
delay
(
usec
);
mp_hal_delay
_us
(
usec
);
}
return
mp_const_none
;
}
...
...
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