summaryrefslogtreecommitdiffstatshomepage
path: root/unix/unix_mphal.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-10-30 23:03:58 +0000
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-31 19:14:30 +0300
commit731f359292c0e2630873df1a19c5baac7287024f (patch)
tree3aef09fd15b82baa9fff7c72fe3bc7e05a869614 /unix/unix_mphal.c
parent0bd3f3291d3ea0252a91653a1edcbfa83d524834 (diff)
downloadmicropython-731f359292c0e2630873df1a19c5baac7287024f.tar.gz
micropython-731f359292c0e2630873df1a19c5baac7287024f.zip
all: Add py/mphal.h and use it in all ports.
py/mphal.h contains declarations for generic mp_hal_XXX functions, such as stdio and delay/ticks, which ports should provide definitions for. A port will also provide mphalport.h with further HAL declarations.
Diffstat (limited to 'unix/unix_mphal.c')
-rw-r--r--unix/unix_mphal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/unix_mphal.c b/unix/unix_mphal.c
index 54a710a3ba..308349c60e 100644
--- a/unix/unix_mphal.c
+++ b/unix/unix_mphal.c
@@ -30,7 +30,7 @@
#include <sys/time.h>
#include "py/mpstate.h"
-#include MICROPY_HAL_H
+#include "py/mphal.h"
#ifndef _WIN32
#include <signal.h>
@@ -119,7 +119,7 @@ void mp_hal_stdout_tx_str(const char *str) {
mp_hal_stdout_tx_strn(str, strlen(str));
}
-uint32_t mp_hal_ticks_ms(void) {
+mp_uint_t mp_hal_ticks_ms(void) {
struct timeval tv;
gettimeofday(&tv, NULL);
return tv.tv_sec * 1000 + tv.tv_usec / 1000;