aboutsummaryrefslogtreecommitdiff
path: root/extmod/lwip-include
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-27 23:31:42 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-27 23:31:42 +0300
commit404dae80a9d5cb6315071fe6206b2a6026be0a09 (patch)
tree1673c104f54427386044a0e739cc1adf8b6f0569 /extmod/lwip-include
parent9011815d862683711a6d79bb76a553d84b6e4556 (diff)
unix, stmhal: Introduce mp_hal_delay_ms(), mp_hal_ticks_ms().
These MPHAL functions are intended to replace previously used HAL_Delay(), HAL_GetTick() to provide better naming and MPHAL separation (they are fully equivalent otherwise). Also, refactor extmod/modlwip to use them.
Diffstat (limited to 'extmod/lwip-include')
-rw-r--r--extmod/lwip-include/lwipopts.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/extmod/lwip-include/lwipopts.h b/extmod/lwip-include/lwipopts.h
index ddb434890..a11bac935 100644
--- a/extmod/lwip-include/lwipopts.h
+++ b/extmod/lwip-include/lwipopts.h
@@ -1,6 +1,10 @@
#ifndef __LWIPOPTS_H__
#define __LWIPOPTS_H__
+#include <py/mpconfig.h>
+#include <py/misc.h>
+#include MICROPY_HAL_H
+
// We're running without an OS for this port. We don't provide any services except light protection.
#define NO_SYS 1
@@ -26,7 +30,7 @@ typedef uint32_t sys_prot_t;
// For now, we can simply define this as a macro for the timer code. But this function isn't
// universal and other ports will need to do something else. It may be necessary to move
// things like this into a port-provided header file.
-#define sys_now HAL_GetTick
+#define sys_now mp_hal_ticks_ms
#endif