cc.h 3.1 KB

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