From 404dae80a9d5cb6315071fe6206b2a6026be0a09 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 27 Oct 2015 23:31:42 +0300 Subject: 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. --- extmod/lwip-include/lwipopts.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'extmod/lwip-include') 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 +#include +#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 -- cgit v1.2.3