Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
3a597f16
Commit
3a597f16
authored
Jan 12, 2016
by
devsaurus
Browse files
implement architecture dependent delay functions for esp8266 port
parent
4bf2bf03
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/modules/u8g.c
View file @
3a597f16
...
...
@@ -820,6 +820,28 @@ static void lu8g_digital_write( u8g_t *u8g, uint8_t pin_index, uint8_t value )
platform_gpio_write
(
pin
,
value
);
}
void
u8g_Delay
(
uint16_t
msec
)
{
const
uint16_t
chunk
=
50
;
while
(
msec
>
chunk
)
{
os_delay_us
(
chunk
*
1000
);
msec
-=
chunk
;
}
if
(
msec
>
0
)
os_delay_us
(
msec
*
1000
);
}
void
u8g_MicroDelay
(
void
)
{
os_delay_us
(
1
);
}
void
u8g_10MicroDelay
(
void
)
{
os_delay_us
(
10
);
}
uint8_t
u8g_com_esp8266_hw_spi_fn
(
u8g_t
*
u8g
,
uint8_t
msg
,
uint8_t
arg_val
,
void
*
arg_ptr
)
{
switch
(
msg
)
...
...
app/u8glib/u8g_delay.c
View file @
3a597f16
...
...
@@ -71,7 +71,7 @@
# define USE_AVR_DELAY
#elif defined(__18CXX)
# define USE_PIC18_DELAY
#elif defined(__arm__)
#elif defined(__arm__)
|| defined(__XTENSA__)
/* do not define anything, all procedures are expected to be defined outside u8glib */
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment