mirror of
https://github.com/Ai-Thinker-Open/Ai-Thinker-Open_RTL8710BX_ALIOS_SDK.git
synced 2026-07-11 20:55:39 +00:00
rel_1.6.0 init
This commit is contained in:
commit
27b3e2883d
19359 changed files with 8093121 additions and 0 deletions
17
Living_SDK/framework/fsyscall/fsyscall.mk
Normal file
17
Living_SDK/framework/fsyscall/fsyscall.mk
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
NAME := fsyscall
|
||||
|
||||
$(NAME)_TYPE := framework
|
||||
$(NAME)_INCLUDES := .
|
||||
|
||||
$(NAME)_SOURCES := syscall_ftbl.c
|
||||
|
||||
ifeq ($(COMPILER),)
|
||||
$(NAME)_CFLAGS += -Wall -Werror
|
||||
else ifeq ($(COMPILER),gcc)
|
||||
$(NAME)_CFLAGS += -Wall -Werror
|
||||
endif
|
||||
|
||||
GLOBAL_INCLUDES += ./ ./syscall_kapi/
|
||||
|
||||
GLOBAL_DEFINES += AOS_BINS
|
||||
|
||||
32
Living_SDK/framework/fsyscall/syscall_ftbl.c
Normal file
32
Living_SDK/framework/fsyscall/syscall_ftbl.c
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
|
||||
*/
|
||||
|
||||
#include <k_api.h>
|
||||
#include <aos/aos.h>
|
||||
#include <aos/alink.h>
|
||||
#ifdef CONFIG_YWSS
|
||||
#include <enrollee.h>
|
||||
#endif
|
||||
#ifdef CONFIG_ALINK
|
||||
#include <accs.h>
|
||||
#include <gateway_service.h>
|
||||
#include <json_parser.h>
|
||||
#include <config.h>
|
||||
#endif
|
||||
#ifdef AOS_NETMGR
|
||||
#include <netmgr.h>
|
||||
#endif
|
||||
#include "aos/uData.h"
|
||||
|
||||
extern const char *gateway_get_uuid(void);
|
||||
extern bool gateway_is_connected(void);
|
||||
|
||||
#ifdef CONFIG_YWSS
|
||||
AOS_EXPORT(void, awss_registrar_init, void);
|
||||
AOS_EXPORT(int, awss_register_callback, unsigned char, void *);
|
||||
#endif
|
||||
|
||||
/* for syscall_ftbl.h, on the last */
|
||||
#include <syscall_ftbl.h>
|
||||
|
||||
88
Living_SDK/framework/fsyscall/syscall_kapi/syscall_kapi.h
Normal file
88
Living_SDK/framework/fsyscall/syscall_kapi/syscall_kapi.h
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* Copyright (C) 2015-2017 Alibaba Group Holding Limited
|
||||
*/
|
||||
|
||||
#include <k_api.h>
|
||||
#include <aos/aos.h>
|
||||
#include <hal/hal.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef CONFIG_AOS_MESH
|
||||
#include <umesh.h>
|
||||
#endif
|
||||
#ifdef MBEDTLS_IN_KERNEL
|
||||
#include <aos/mbedtls_ssl.h>
|
||||
#endif
|
||||
#ifdef CONFIG_ALICRYPTO
|
||||
#include <ali_crypto.h>
|
||||
#endif
|
||||
#ifdef WITH_LWIP
|
||||
#include <aos/network.h>
|
||||
#endif
|
||||
|
||||
#include <syscall_knum.h>
|
||||
|
||||
|
||||
/* ---------------------Macro--------------------- */
|
||||
|
||||
extern const int *syscall_ktbl;
|
||||
#define SYSCALL_TBL syscall_ktbl
|
||||
|
||||
#define SYS_CALL0(nr, t) ((t (*)(void))(SYSCALL_TBL[nr]))()
|
||||
#define SYS_CALL1(nr, t, t1, p1) ((t (*)(t1))(SYSCALL_TBL[nr]))(p1)
|
||||
#define SYS_CALL2(nr, t, t1, p1, t2, p2) ((t (*)(t1, t2))(SYSCALL_TBL[nr]))(p1, p2)
|
||||
#define SYS_CALL3(nr, t, t1, p1, t2, p2, t3, p3) ((t (*)(t1, t2, t3))(SYSCALL_TBL[nr]))(p1, p2, p3)
|
||||
#define SYS_CALL4(nr, t, t1, p1, t2, p2, t3, p3, t4, p4) ((t (*)(t1, t2, t3, t4))(SYSCALL_TBL[nr]))(p1, p2, p3, p4)
|
||||
#define SYS_CALL5(nr, t, t1, p1, t2, p2, t3, p3, t4, p4, t5, p5) ((t (*)(t1, t2, t3, t4, t5))(SYSCALL_TBL[nr]))(p1, p2, p3, p4, p5)
|
||||
#define SYS_CALL6(nr, t, t1, p1, t2, p2, t3, p3, t4, p4, t5, p5, t6, p6) ((t (*)(t1, t2, t3, t4, t5, t6))(SYSCALL_TBL[nr]))(p1, p2, p3, p4, p5, p6)
|
||||
#define SYS_CALL7(nr, t, t1, p1, t2, p2, t3, p3, t4, p4, t5, p5, t6, p6, t7, p7) ((t (*)(t1, t2, t3, t4, t5, t6, t7))(SYSCALL_TBL[nr]))(p1, p2, p3, p4, p5, p6, p7)
|
||||
|
||||
/* ---------------------function--------------------- */
|
||||
typedef void (*aos_event_cb)(input_event_t *event, void *private_data);
|
||||
typedef void (*aos_call_t)(void *arg);
|
||||
typedef void (*aos_poll_call_t)(int fd, void *arg);
|
||||
typedef void *aos_loop_t;
|
||||
|
||||
|
||||
#if (RHINO_CONFIG_MM_DEBUG > 0u && RHINO_CONFIG_GCC_RETADDR > 0u)
|
||||
extern void *sys_aos_malloc(unsigned int size, size_t allocator);
|
||||
extern void *sys_aos_realloc(void *mem, unsigned int size, size_t allocator);
|
||||
extern void *sys_aos_zalloc(unsigned int size, size_t allocator);
|
||||
void *aos_malloc(unsigned int size)
|
||||
{
|
||||
if ((size & AOS_UNSIGNED_INT_MSB) == 0) {
|
||||
return sys_aos_malloc(size, (size_t)__builtin_return_address(0));
|
||||
} else {
|
||||
return sys_aos_malloc(size, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void *aos_realloc(void *mem, unsigned int size)
|
||||
{
|
||||
if ((size & AOS_UNSIGNED_INT_MSB) == 0) {
|
||||
return sys_aos_realloc(mem, size, (size_t)__builtin_return_address(0));
|
||||
} else {
|
||||
return sys_aos_realloc(mem, size, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void *aos_zalloc(unsigned int size)
|
||||
{
|
||||
if ((size & AOS_UNSIGNED_INT_MSB) == 0) {
|
||||
return sys_aos_zalloc(size, (size_t)__builtin_return_address(0));
|
||||
} else {
|
||||
return sys_aos_zalloc(size, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int __wrap_vprintf(char *format, va_list param)
|
||||
{
|
||||
return aos_vprintf(format, param);
|
||||
}
|
||||
|
||||
int __wrap_fflush(FILE *stream)
|
||||
{
|
||||
return aos_fflush(stream);
|
||||
}
|
||||
|
||||
/* ---------------------syscall function--------------------- */
|
||||
Loading…
Add table
Add a link
Reference in a new issue