blob: 4e7605db7f821b12bd0a47dfc71dea2128d787f3 [file] [log] [blame]
Ravago Jonesd208ae72023-02-13 02:24:07 -08001/*
2 * Copyright (c) 2022 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include "lwip/init.h"
8#include "pico/time.h"
9
10#if NO_SYS
11/* lwip has provision for using a mutex, when applicable */
12sys_prot_t sys_arch_protect(void) {
13 return 0;
14}
15
16void sys_arch_unprotect(sys_prot_t pval) {
17 (void) pval;
18}
19
20/* lwip needs a millisecond time source, and the TinyUSB board support code has one available */
21uint32_t sys_now(void) {
22 return to_ms_since_boot(get_absolute_time());
23}
24
25#endif
26