Merge remote-tracking branch 'upstream/master'

This commit is contained in:
ZYH 2018-03-23 14:52:07 +08:00
commit 93060f2478
9 changed files with 30 additions and 11 deletions

View File

@ -61,7 +61,6 @@ static int set_timestamp(time_t timestamp)
return RT_EOK;
}
/* 驱动接口 */
static rt_err_t rt1052_hp_rtc_init(rt_device_t dev)
{
snvs_hp_rtc_config_t snvsRtcConfig;
@ -112,7 +111,6 @@ static rt_err_t rt1052_hp_rtc_control(rt_device_t dev, int cmd, void *args)
}
break;
/* 无效参数 */
default:
return RT_EINVAL;
}

View File

@ -5,9 +5,6 @@ ARCH='arm'
CPU='cortex-m7'
CROSS_TOOL='keil'
if os.getenv('RTT_CC'):
CROSS_TOOL = os.getenv('RTT_CC')
if CROSS_TOOL == 'keil':
PLATFORM = 'armcc'
EXEC_PATH = 'C:/Keil_v5'
@ -48,7 +45,6 @@ if PLATFORM == 'armcc':
CFLAGS += ' --c99'
POST_ACTION = 'fromelf -z $TARGET'
# POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
else:
print("only support armcc in this bsp")
exit(-1)

View File

@ -90,6 +90,7 @@ config RT_USING_RTC
default n
config RTC_SYNC_USING_NTP
bool "Using NTP auto sync RTC time"
select PKG_USING_NETUTILS
select PKG_NETUTILS_NTP
default n

View File

@ -225,6 +225,8 @@ int rt_rtc_ntp_sync_init(void)
}
init_ok = RT_TRUE;
return RT_EOK;
}
INIT_COMPONENT_EXPORT(rt_rtc_ntp_sync_init);
#endif /* RTC_SYNC_USING_NTP */

View File

@ -4,6 +4,11 @@
#include <rtthread.h>
#ifdef RT_USING_DFS
#define STDIN_FILENO 0 /* standard input file descriptor */
#define STDOUT_FILENO 1 /* standard output file descriptor */
#define STDERR_FILENO 2 /* standard error file descriptor */
#include <dfs_posix.h>
#else
#define _FREAD 0x0001 /* read enabled */

View File

View File

@ -2,6 +2,11 @@
#define _SYS_UNISTD_H
#ifdef RT_USING_DFS
#define STDIN_FILENO 0 /* standard input file descriptor */
#define STDOUT_FILENO 1 /* standard output file descriptor */
#define STDERR_FILENO 2 /* standard error file descriptor */
#include <dfs_posix.h>
#else
#define _FREAD 0x0001 /* read enabled */

View File

@ -77,11 +77,23 @@
struct stat
{
struct rt_device* st_dev;
struct rt_device *st_dev;
uint16_t st_ino;
uint16_t st_mode;
uint16_t st_nlink;
uint16_t st_uid;
uint16_t st_gid;
struct rt_device *st_rdev;
uint32_t st_size;
time_t st_atime;
long st_spare1;
time_t st_mtime;
long st_spare2;
time_t st_ctime;
long st_spare3;
uint32_t st_blksize;
uint32_t st_blocks;
long st_spare4[2];
};
#endif