Merge branch 'prepare_for_master' of https://git.trustie.net/xuos/xiuos into mqtt
This commit is contained in:
@@ -36,5 +36,9 @@ ifeq ($(CONFIG_ADD_XIZI_FEATURES),y)
|
||||
SRC_DIR += control_app
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_APP_USING_WEBNET),y)
|
||||
SRC_DIR += webnet
|
||||
endif
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
endif
|
||||
@@ -15,7 +15,6 @@
|
||||
// #include <user_api.h>
|
||||
#include <transform.h>
|
||||
|
||||
|
||||
extern int FrameworkInit();
|
||||
extern void ApplicationOtaTaskInit(void);
|
||||
|
||||
|
||||
3
APP_Framework/Applications/webnet/Makefile
Normal file
3
APP_Framework/Applications/webnet/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
SRC_DIR += WebNet_XiUOS
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
||||
Submodule APP_Framework/Applications/webnet/WebNet_XiUOS updated: 956eafa24b...60a8a500b9
@@ -164,7 +164,7 @@ int PrivTimerModify(timer_t timerid, int flags, const struct itimerspec *restric
|
||||
/*********************fs**************************/
|
||||
#ifdef FS_VFS
|
||||
/************************Driver Posix Transform***********************/
|
||||
int PrivOpen(const char *path, int flags)
|
||||
int PrivOpen(const char *path, int flags, ...)
|
||||
{
|
||||
return open(path, flags);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ uint32_t PrivGetTickTime();
|
||||
|
||||
/*********************driver*************************/
|
||||
|
||||
int PrivOpen(const char *path, int flags);
|
||||
int PrivOpen(const char *path, int flags, ...);
|
||||
int PrivRead(int fd, void *buf, size_t len);
|
||||
int PrivWrite(int fd, const void *buf, size_t len);
|
||||
int PrivClose(int fd);
|
||||
|
||||
@@ -40,7 +40,8 @@ struct mq_attr {
|
||||
long mq_curmsgs; /* number of messages currently queued */
|
||||
};
|
||||
|
||||
mqd_t mq_open(const char *name, int oflag, ...);
|
||||
// mqd_t mq_open(const char *name, int oflag, ...);
|
||||
mqd_t mq_open(const char *name, int oflag, mode_t mode, struct mq_attr *attr);
|
||||
int mq_close(mqd_t mqdes);
|
||||
ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio);
|
||||
int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio);
|
||||
|
||||
@@ -21,12 +21,13 @@
|
||||
|
||||
#include "include/mqueue.h"
|
||||
|
||||
mqd_t mq_open(const char *name, int oflag, ...)
|
||||
mqd_t mq_open(const char* name, int oflag, mode_t mode, struct mq_attr* attr)
|
||||
{
|
||||
|
||||
mqd_t mq;
|
||||
|
||||
mq = UserMsgQueueCreate( DEFAULT_MQUEUE_SIZE, DEFAULT_MAX_MSG_SIZE);
|
||||
// Todo: config mq by mode
|
||||
mq = UserMsgQueueCreate(attr->mq_msgsize, attr->mq_maxmsg);
|
||||
if (mq < 0) {
|
||||
return -1;
|
||||
}
|
||||
@@ -39,12 +40,12 @@ int mq_close(mqd_t mqdes)
|
||||
return UserMsgQueueDelete(mqdes);
|
||||
}
|
||||
|
||||
ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, size_t msg_len, unsigned *msg_prio)
|
||||
ssize_t mq_receive(mqd_t mqdes, char* msg_ptr, size_t msg_len, unsigned* msg_prio)
|
||||
{
|
||||
ssize_t ret;
|
||||
|
||||
*msg_prio = 0;
|
||||
ret = UserMsgQueueRecv(mqdes, msg_ptr, (unsigned long)&msg_len, 0);
|
||||
ret = UserMsgQueueRecv(mqdes, (void*)msg_ptr, msg_len, WAITING_FOREVER);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Submodule APP_Framework/lib/lorawan/lora_radio_driver updated: d21965b1cb...a94c007cb4
Reference in New Issue
Block a user