Ravago Jones | d208ae7 | 2023-02-13 02:24:07 -0800 | [diff] [blame^] | 1 | /* |
| 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 */ |
| 12 | sys_prot_t sys_arch_protect(void) { |
| 13 | return 0; |
| 14 | } |
| 15 | |
| 16 | void 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 */ |
| 21 | uint32_t sys_now(void) { |
| 22 | return to_ms_since_boot(get_absolute_time()); |
| 23 | } |
| 24 | |
| 25 | #endif |
| 26 | |