File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -85,16 +85,21 @@ typedef uint32_t sys_prot_t;
8585///////////////////////////////
8686//// MISSING
8787
88- // transparent wrapper for millis()'s return value type from ulong to u32
88+ // Arduino Core exposes time func with a generic type
8989#ifdef __cplusplus
90- extern "C" {
90+ extern "C"
91+ {
9192#endif
92- extern unsigned long millis (void ); // arduino definition
93- inline __attribute__((always_inline )) u32_t sys_now (void ) { return (u32_t )millis (); }
93+ unsigned long millis (void );
9494#ifdef __cplusplus
9595}
9696#endif
9797
98+ // b/c we have conflicting typedefs of u32_t and ulong and can't substitute funcs,
99+ // forcibly cast the `millis()` result to lwip's version of u32_t
100+ // (previous version was `#define sys_now millis`)
101+ #define sys_now () ((u32_t)millis())
102+
98103#define LWIP_RAND r_rand // old lwip uses this useful undocumented function
99104#define IPSTR "%d.%d.%d.%d"
100105#define IP2STR (ipaddr ) ip4_addr1_16(ipaddr), \
You can’t perform that action at this time.
0 commit comments