Commit 4e8660a2 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

RS14100 fixes

CL: none

PUBLISHED_FROM=4d5d68f92d6c082b5b0c25ed8935fc097939001f
parent 3fe77fa9
...@@ -58,8 +58,9 @@ ...@@ -58,8 +58,9 @@
#define CS_P_NRF51 12 #define CS_P_NRF51 12
#define CS_P_NRF52 10 #define CS_P_NRF52 10
#define CS_P_PIC32 11 #define CS_P_PIC32 11
#define CS_P_RS14100 18
#define CS_P_STM32 16 #define CS_P_STM32 16
/* Next id: 18 */ /* Next id: 19 */
/* If not specified explicitly, we guess platform by defines. */ /* If not specified explicitly, we guess platform by defines. */
#ifndef CS_PLATFORM #ifndef CS_PLATFORM
...@@ -91,6 +92,8 @@ ...@@ -91,6 +92,8 @@
#elif defined(TARGET_IS_TM4C129_RA0) || defined(TARGET_IS_TM4C129_RA1) || \ #elif defined(TARGET_IS_TM4C129_RA0) || defined(TARGET_IS_TM4C129_RA1) || \
defined(TARGET_IS_TM4C129_RA2) defined(TARGET_IS_TM4C129_RA2)
#define CS_PLATFORM CS_P_TM4C129 #define CS_PLATFORM CS_P_TM4C129
#elif defined(RS14100)
#define CS_PLATFORM CS_P_RS14100
#elif defined(STM32) #elif defined(STM32)
#define CS_PLATFORM CS_P_STM32 #define CS_PLATFORM CS_P_STM32
#endif #endif
...@@ -125,6 +128,7 @@ ...@@ -125,6 +128,7 @@
/* Amalgamated: #include "common/platforms/platform_nxp_lpc.h" */ /* Amalgamated: #include "common/platforms/platform_nxp_lpc.h" */
/* Amalgamated: #include "common/platforms/platform_nxp_kinetis.h" */ /* Amalgamated: #include "common/platforms/platform_nxp_kinetis.h" */
/* Amalgamated: #include "common/platforms/platform_pic32.h" */ /* Amalgamated: #include "common/platforms/platform_pic32.h" */
/* Amalgamated: #include "common/platforms/platform_rs14100.h" */
/* Amalgamated: #include "common/platforms/platform_stm32.h" */ /* Amalgamated: #include "common/platforms/platform_stm32.h" */
#if CS_PLATFORM == CS_P_CUSTOM #if CS_PLATFORM == CS_P_CUSTOM
#include <platform_custom.h> #include <platform_custom.h>
...@@ -1910,6 +1914,70 @@ char *inet_ntoa(struct in_addr in); ...@@ -1910,6 +1914,70 @@ char *inet_ntoa(struct in_addr in);
#endif /* CS_COMMON_PLATFORMS_PLATFORM_PIC32_H_ */ #endif /* CS_COMMON_PLATFORMS_PLATFORM_PIC32_H_ */
#ifdef MG_MODULE_LINES #ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_rs14100.h"
#endif
/*
* Copyright (c) 2014-2019 Cesanta Software Limited
* All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_
#define CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_
#if CS_PLATFORM == CS_P_RS14100
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef MGOS_HAVE_VFS_COMMON
#include <mgos_vfs.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define to64(x) strtoll(x, NULL, 10)
#define INT64_FMT "lld"
#define SIZE_T_FMT "u"
typedef struct stat cs_stat_t;
#define DIRSEP '/'
#ifndef CS_ENABLE_STDIO
#define CS_ENABLE_STDIO 1
#endif
#ifndef MG_ENABLE_FILESYSTEM
#define MG_ENABLE_FILESYSTEM 1
#endif
#ifdef __cplusplus
}
#endif
#endif /* CS_PLATFORM == CS_P_RS14100 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_ */
#ifdef MG_MODULE_LINES
#line 1 "common/platforms/platform_stm32.h" #line 1 "common/platforms/platform_stm32.h"
#endif #endif
/* /*
......
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
#define CS_P_NRF51 12 #define CS_P_NRF51 12
#define CS_P_NRF52 10 #define CS_P_NRF52 10
#define CS_P_PIC32 11 #define CS_P_PIC32 11
#define CS_P_RS14100 18
#define CS_P_STM32 16 #define CS_P_STM32 16
/* Next id: 18 */ /* Next id: 19 */
/* If not specified explicitly, we guess platform by defines. */ /* If not specified explicitly, we guess platform by defines. */
#ifndef CS_PLATFORM #ifndef CS_PLATFORM
...@@ -55,6 +56,8 @@ ...@@ -55,6 +56,8 @@
#elif defined(TARGET_IS_TM4C129_RA0) || defined(TARGET_IS_TM4C129_RA1) || \ #elif defined(TARGET_IS_TM4C129_RA0) || defined(TARGET_IS_TM4C129_RA1) || \
defined(TARGET_IS_TM4C129_RA2) defined(TARGET_IS_TM4C129_RA2)
#define CS_PLATFORM CS_P_TM4C129 #define CS_PLATFORM CS_P_TM4C129
#elif defined(RS14100)
#define CS_PLATFORM CS_P_RS14100
#elif defined(STM32) #elif defined(STM32)
#define CS_PLATFORM CS_P_STM32 #define CS_PLATFORM CS_P_STM32
#endif #endif
...@@ -89,6 +92,7 @@ ...@@ -89,6 +92,7 @@
#include "common/platforms/platform_nxp_lpc.h" #include "common/platforms/platform_nxp_lpc.h"
#include "common/platforms/platform_nxp_kinetis.h" #include "common/platforms/platform_nxp_kinetis.h"
#include "common/platforms/platform_pic32.h" #include "common/platforms/platform_pic32.h"
#include "common/platforms/platform_rs14100.h"
#include "common/platforms/platform_stm32.h" #include "common/platforms/platform_stm32.h"
#if CS_PLATFORM == CS_P_CUSTOM #if CS_PLATFORM == CS_P_CUSTOM
#include <platform_custom.h> #include <platform_custom.h>
......
/*
* Copyright (c) 2014-2019 Cesanta Software Limited
* All rights reserved
*
* Licensed under the Apache License, Version 2.0 (the ""License"");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an ""AS IS"" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_
#define CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_
#if CS_PLATFORM == CS_P_RS14100
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef MGOS_HAVE_VFS_COMMON
#include <mgos_vfs.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define to64(x) strtoll(x, NULL, 10)
#define INT64_FMT "lld"
#define SIZE_T_FMT "u"
typedef struct stat cs_stat_t;
#define DIRSEP '/'
#ifndef CS_ENABLE_STDIO
#define CS_ENABLE_STDIO 1
#endif
#ifndef MG_ENABLE_FILESYSTEM
#define MG_ENABLE_FILESYSTEM 1
#endif
#ifdef __cplusplus
}
#endif
#endif /* CS_PLATFORM == CS_P_RS14100 */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_RS14100_H_ */
...@@ -19,6 +19,7 @@ HEADERS = mg_common.h \ ...@@ -19,6 +19,7 @@ HEADERS = mg_common.h \
$(COMMON)/platforms/platform_nxp_lpc.h \ $(COMMON)/platforms/platform_nxp_lpc.h \
$(COMMON)/platforms/platform_nxp_kinetis.h \ $(COMMON)/platforms/platform_nxp_kinetis.h \
$(COMMON)/platforms/platform_pic32.h \ $(COMMON)/platforms/platform_pic32.h \
$(COMMON)/platforms/platform_rs14100.h \
$(COMMON)/platforms/platform_stm32.h \ $(COMMON)/platforms/platform_stm32.h \
$(COMMON)/platforms/lwip/mg_lwip.h \ $(COMMON)/platforms/lwip/mg_lwip.h \
$(COMMON)/cs_md5.h \ $(COMMON)/cs_md5.h \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment