mg_locals.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * File : mg_locals.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2017, RT-Thread Development Team
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. * Change Logs:
  21. * Date Author Notes
  22. * 2017-08-19 armink first version
  23. */
  24. #ifndef _MONGOOSE_MG_LOCALS_H_
  25. #define _MONGOOSE_MG_LOCALS_H_
  26. #include <stdio.h>
  27. #include <stdint.h>
  28. #include <time.h>
  29. #include <lwip/sockets.h>
  30. #include <dfs_posix.h>
  31. #include <rtthread.h>
  32. #if defined(PKG_MONGOOSE_ENABLE_DEBUG)
  33. #define CS_ENABLE_DEBUG 1
  34. #else
  35. #define CS_ENABLE_DEBUG 0
  36. #endif
  37. //#define MG_ENABLE_LWIP 1
  38. //#define LWIP_TIMEVAL_PRIVATE 1
  39. #define MG_ENABLE_DEBUG 1
  40. #define MG_ARCH MG_ARCH_RTTHREAD
  41. #define CS_PLATFORM CS_P_STM32
  42. #define CS_DEFINE_DIRENT 0
  43. #define MG_ENABLE_HTTP_SSI 0
  44. #define MG_NET_IF MG_NET_IF_SOCKET
  45. #define MG_LWIP 1
  46. #define RTOS_SDK 1
  47. #define MG_MALLOC rt_malloc
  48. #define MG_CALLOC rt_calloc
  49. #define MG_REALLOC rt_realloc
  50. #define MG_FREE rt_free
  51. #define MG_STRDUP rt_strdup
  52. #define WEAK rt_weak
  53. #define MG_ENABLE_HTTP_WEBSOCKET 1
  54. #define MG_ENABLE_FILESYSTEM 1
  55. #define MG_ENABLE_HTTP_STREAMING_MULTIPART 1
  56. #define MG_ENABLE_MQTT 1
  57. #define MG_ENABLE_COAP 0
  58. #define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val)
  59. #endif /* _MONGOOSE_MG_LOCALS_H_ */