1.repair the separate compile error;2.modify ota init task
This commit is contained in:
parent
8b2eee0aa0
commit
9959ec6470
|
@ -20,7 +20,9 @@ int main(void)
|
|||
{
|
||||
printf("Hello, world!\n");
|
||||
FrameworkInit();
|
||||
#ifdef APPLICATION_OTA
|
||||
ApplicationOtaTaskInit();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
// int cppmain(void);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
menu "config application bin ota "
|
||||
menu "ota app "
|
||||
menuconfig APPLICATION_OTA
|
||||
bool "Using app bin ota"
|
||||
default n
|
||||
|
|
|
@ -51,7 +51,7 @@ int Adapter4GInit(void)
|
|||
|
||||
struct Adapter *adapter = PrivMalloc(sizeof(struct Adapter));
|
||||
if (!adapter) {
|
||||
Privfree(adapter);
|
||||
PrivFree(adapter);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ int Adapter4GInit(void)
|
|||
ret = Adapter4GRegister(adapter);
|
||||
if (ret < 0) {
|
||||
printf("Adapter4GInit register 4G adapter error\n");
|
||||
Privfree(adapter);
|
||||
PrivFree(adapter);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ int Adapter4GInit(void)
|
|||
AdapterProductInfoType product_info = Ec200tAttach(adapter);
|
||||
if (!product_info) {
|
||||
printf("Adapter4GInit ec200t attach error\n");
|
||||
Privfree(adapter);
|
||||
PrivFree(adapter);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ int PrivTaskDelay(int32_t ms)
|
|||
}
|
||||
|
||||
/*********************fs**************************/
|
||||
|
||||
#ifdef FS_VFS
|
||||
/************************Driver Posix Transform***********************/
|
||||
int PrivOpen(const char *path, int flags)
|
||||
{
|
||||
|
@ -150,7 +150,7 @@ int PrivIoctl(int fd, int cmd, void *args)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
/********************memory api************/
|
||||
void *PrivMalloc(size_t size)
|
||||
{
|
||||
|
|
|
@ -101,7 +101,7 @@ struct PinParam
|
|||
long pin;//< pin number
|
||||
int mode;//< pin mode: input/output
|
||||
struct PinDevIrq irq_set;//< pin irq set
|
||||
uint64 arg;
|
||||
uint64_t arg;
|
||||
};
|
||||
|
||||
struct PinStat
|
||||
|
@ -128,7 +128,7 @@ struct SerialDataCfg
|
|||
uint8_t serial_invert_mode;
|
||||
uint16_t serial_buffer_size;
|
||||
|
||||
uint8 ext_uart_no;
|
||||
uint8_t ext_uart_no;
|
||||
enum ExtSerialPortConfigure port_configure;
|
||||
};
|
||||
|
||||
|
|
|
@ -22,16 +22,16 @@
|
|||
#ifndef XS_USER_API_H
|
||||
#define XS_USER_API_H
|
||||
|
||||
#include <xiuos.h>
|
||||
#include <xsconfig.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <libc.h>
|
||||
#include "../../../../../../Ubiquitous/XiUOS/arch/kswitch.h"
|
||||
|
||||
|
||||
#ifdef SEPARATE_COMPILE
|
||||
|
||||
#include "../../../../../../Ubiquitous/XiUOS/arch/kswitch.h"
|
||||
|
||||
#define TASK_INFO 1
|
||||
#define MEM_INFO 2
|
||||
#define SEM_INFO 3
|
||||
|
@ -58,22 +58,22 @@ typedef void DIR;
|
|||
|
||||
int32_t UserTaskCreate(UtaskType utask);
|
||||
|
||||
x_err_t UserTaskStartup(int32_t id);
|
||||
x_err_t UserTaskDelete(int32_t id);
|
||||
long UserTaskStartup(int32_t id);
|
||||
long UserTaskDelete(int32_t id);
|
||||
void UserTaskQuit(void);
|
||||
x_err_t UserTaskDelay(int32_t ms);
|
||||
x_err_t UserGetTaskName(int32_t id ,char *name);
|
||||
long UserTaskDelay(int32_t ms);
|
||||
long UserGetTaskName(int32_t id ,char *name);
|
||||
int32_t UserGetTaskID(void);
|
||||
uint8_t UserGetTaskStat(int32_t id);
|
||||
|
||||
#ifdef ARCH_SMP
|
||||
x_err_t UserTaskCoreCombine(int32_t id,uint8_t core_id);
|
||||
x_err_t UserTaskCoreUnCombine(int32_t id);
|
||||
long UserTaskCoreCombine(int32_t id,uint8_t core_id);
|
||||
long UserTaskCoreUnCombine(int32_t id);
|
||||
uint8_t UserGetTaskCombinedCore(int32_t id);
|
||||
uint8_t UserGetTaskRunningCore(int32_t id);
|
||||
#endif
|
||||
|
||||
x_err_t UserGetTaskErrorstatus(int32_t id);
|
||||
long UserGetTaskErrorstatus(int32_t id);
|
||||
uint8_t UserGetTaskPriority(int32_t id);
|
||||
|
||||
|
||||
|
@ -93,10 +93,10 @@ int32_t UserMutexAbandon(int32_t mutex);
|
|||
#ifdef KERNEL_SEMAPHORE
|
||||
typedef int32 sem_t;
|
||||
sem_t UserSemaphoreCreate(uint16_t val);
|
||||
x_err_t UserSemaphoreDelete(sem_t sem);
|
||||
x_err_t UserSemaphoreObtain(sem_t sem, int32_t wait_time);
|
||||
x_err_t UserSemaphoreAbandon(sem_t sem);
|
||||
x_err_t UserSemaphoreSetValue(sem_t sem, uint16_t val);
|
||||
long UserSemaphoreDelete(sem_t sem);
|
||||
long UserSemaphoreObtain(sem_t sem, int32_t wait_time);
|
||||
long UserSemaphoreAbandon(sem_t sem);
|
||||
long UserSemaphoreSetValue(sem_t sem, uint16_t val);
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -104,22 +104,22 @@ x_err_t UserSemaphoreSetValue(sem_t sem, uint16_t val);
|
|||
typedef int32 EventIdType;
|
||||
EventIdType UserEventCreate(uint8_t flag);
|
||||
void UserEventDelete(EventIdType event);
|
||||
x_err_t UserEventTrigger(EventIdType event, uint32_t set);
|
||||
x_err_t UserEventProcess(EventIdType event, uint32_t set, uint8_t option,
|
||||
long UserEventTrigger(EventIdType event, uint32_t set);
|
||||
long UserEventProcess(EventIdType event, uint32_t set, uint8_t option,
|
||||
int32_t wait_time, uint32_t *Recved);
|
||||
x_err_t UserEventReinit(EventIdType event);
|
||||
long UserEventReinit(EventIdType event);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef KERNEL_MESSAGEQUEUE
|
||||
int32_t UserMsgQueueCreate(size_t msg_size, size_t max_msgs);
|
||||
x_err_t UserMsgQueueDelete(int32_t mq );
|
||||
x_err_t UserMsgQueueSendwait(int32_t mq, const void *buffer,
|
||||
long UserMsgQueueDelete(int32_t mq );
|
||||
long UserMsgQueueSendwait(int32_t mq, const void *buffer,
|
||||
size_t size, int32_t wait_time);
|
||||
x_err_t UserMsgQueueSend(int32_t mq, const void *buffer, size_t size);
|
||||
x_err_t UserMsgQueueUrgentSend(int32_t mq, const void *buffer, size_t size);
|
||||
x_err_t UserMsgQueueRecv(int32_t mq, void *buffer, size_t size,int32_t wait_time);
|
||||
x_err_t UserMsgQueueReinit(int32_t mq);
|
||||
long UserMsgQueueSend(int32_t mq, const void *buffer, size_t size);
|
||||
long UserMsgQueueUrgentSend(int32_t mq, const void *buffer, size_t size);
|
||||
long UserMsgQueueRecv(int32_t mq, void *buffer, size_t size,int32_t wait_time);
|
||||
long UserMsgQueueReinit(int32_t mq);
|
||||
#endif
|
||||
|
||||
int open(const char *path, int flags, ...);
|
||||
|
@ -154,14 +154,18 @@ struct statfs {
|
|||
};
|
||||
|
||||
int statfs(const char *path, struct statfs *buf);
|
||||
#endif
|
||||
|
||||
/* NOTE!!!: when cutting out file system, the 'printf' function can not output angthing */
|
||||
int Userprintf(const char *fmt, ...);
|
||||
#define printf Userprintf
|
||||
|
||||
#define printf Userprintf
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
|
||||
#include <xiuos.h>
|
||||
|
||||
#ifdef FS_VFS
|
||||
#include <iot-vfs_posix.h>
|
||||
#endif
|
||||
|
@ -182,7 +186,7 @@ int32_t UserTaskCreate(UtaskType utask);
|
|||
#define UserTaskQuit KTaskQuit
|
||||
#define UserTaskDelay MdelayKTask
|
||||
|
||||
x_err_t UserGetTaskName(int32_t id ,char *name);
|
||||
long UserGetTaskName(int32_t id ,char *name);
|
||||
int32_t UserGetTaskID(void);
|
||||
uint8_t UserGetTaskStat(int32_t id);
|
||||
|
||||
|
@ -194,7 +198,7 @@ uint8_t UserGetTaskCombinedCore(int32_t id);
|
|||
uint8_t UserGetTaskRunningCore(int32_t id);
|
||||
#endif
|
||||
|
||||
x_err_t UserGetTaskErrorstatus(int32_t id);
|
||||
long UserGetTaskErrorstatus(int32_t id);
|
||||
uint8_t UserGetTaskPriority(int32_t id);
|
||||
|
||||
#define UserMalloc x_malloc
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include <xs_sem.h>
|
||||
#include <xs_memory.h>
|
||||
#include <xs_mutex.h>
|
||||
#include <xs_event.h>
|
||||
#include <xs_msg.h>
|
||||
|
||||
#ifdef FS_VFS
|
||||
#include <iot-vfs_posix.h>
|
||||
|
|
Loading…
Reference in New Issue