diff options
Diffstat (limited to 'lib/chibios/os/various/lwip_bindings/arch/cc.h')
-rw-r--r-- | lib/chibios/os/various/lwip_bindings/arch/cc.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/lib/chibios/os/various/lwip_bindings/arch/cc.h b/lib/chibios/os/various/lwip_bindings/arch/cc.h new file mode 100644 index 000000000..67371e828 --- /dev/null +++ b/lib/chibios/os/various/lwip_bindings/arch/cc.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | /* | ||
17 | * **** This file incorporates work covered by the following copyright and **** | ||
18 | * **** permission notice: **** | ||
19 | * | ||
20 | * Copyright (c) 2001-2004 Swedish Institute of Computer Science. | ||
21 | * All rights reserved. | ||
22 | * | ||
23 | * Redistribution and use in source and binary forms, with or without modification, | ||
24 | * are permitted provided that the following conditions are met: | ||
25 | * | ||
26 | * 1. Redistributions of source code must retain the above copyright notice, | ||
27 | * this list of conditions and the following disclaimer. | ||
28 | * 2. Redistributions in binary form must reproduce the above copyright notice, | ||
29 | * this list of conditions and the following disclaimer in the documentation | ||
30 | * and/or other materials provided with the distribution. | ||
31 | * 3. The name of the author may not be used to endorse or promote products | ||
32 | * derived from this software without specific prior written permission. | ||
33 | * | ||
34 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
35 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
36 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT | ||
37 | * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
38 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT | ||
39 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
40 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
41 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
42 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY | ||
43 | * OF SUCH DAMAGE. | ||
44 | * | ||
45 | * This file is part of the lwIP TCP/IP stack. | ||
46 | * | ||
47 | * Author: Adam Dunkels <[email protected]> | ||
48 | * | ||
49 | */ | ||
50 | |||
51 | #ifndef __CC_H__ | ||
52 | #define __CC_H__ | ||
53 | |||
54 | #include <hal.h> | ||
55 | |||
56 | /* Use errno provided by system. */ | ||
57 | #define LWIP_ERRNO_INCLUDE <errno.h> | ||
58 | |||
59 | /** | ||
60 | * @brief Use system provided struct timeval by default. | ||
61 | */ | ||
62 | #ifndef LWIP_TIMEVAL_PRIVATE | ||
63 | #define LWIP_TIMEVAL_PRIVATE 0 | ||
64 | #include <sys/time.h> | ||
65 | #endif | ||
66 | |||
67 | /** | ||
68 | * @brief Use a no-op diagnostic output macro by default. | ||
69 | */ | ||
70 | #if !defined(LWIP_PLATFORM_DIAG) | ||
71 | #define LWIP_PLATFORM_DIAG(x) | ||
72 | #endif | ||
73 | |||
74 | /** | ||
75 | * @brief Halt the system on lwIP assert failure by default. | ||
76 | */ | ||
77 | #if !defined(LWIP_PLATFORM_ASSERT) | ||
78 | #define LWIP_PLATFORM_ASSERT(x) osalSysHalt(x) | ||
79 | #endif | ||
80 | |||
81 | /** | ||
82 | * @brief The NETIF API is required by lwipthread. | ||
83 | */ | ||
84 | #ifdef LWIP_NETIF_API | ||
85 | #undef LWIP_NETIF_API | ||
86 | #endif | ||
87 | #define LWIP_NETIF_API 1 | ||
88 | |||
89 | #endif /* __CC_H__ */ | ||