code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
#ifndef HEADER_CURL_TOOL_LIBINFO_H #define HEADER_CURL_TOOL_LIBINFO_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_libinfo.h
C
apache-2.0
1,329
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_main.c
C
apache-2.0
9,900
#ifndef HEADER_CURL_TOOL_MAIN_H #define HEADER_CURL_TOOL_MAIN_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_main.h
C
apache-2.0
1,496
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_metalink.c
C
apache-2.0
26,261
#ifndef HEADER_CURL_TOOL_METALINK_H #define HEADER_CURL_TOOL_METALINK_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_metalink.h
C
apache-2.0
5,482
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_msgs.c
C
apache-2.0
3,286
#ifndef HEADER_CURL_TOOL_MSGS_H #define HEADER_CURL_TOOL_MSGS_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_msgs.h
C
apache-2.0
1,328
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_operate.c
C
apache-2.0
72,776
#ifndef HEADER_CURL_TOOL_OPERATE_H #define HEADER_CURL_TOOL_OPERATE_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_operate.h
C
apache-2.0
1,239
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_operhlp.c
C
apache-2.0
5,155
#ifndef HEADER_CURL_TOOL_OPERHLP_H #define HEADER_CURL_TOOL_OPERHLP_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_operhlp.h
C
apache-2.0
1,483
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_panykey.c
C
apache-2.0
1,453
#ifndef HEADER_CURL_TOOL_PANYKEY_H #define HEADER_CURL_TOOL_PANYKEY_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_panykey.h
C
apache-2.0
1,296
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_paramhlp.c
C
apache-2.0
16,479
#ifndef HEADER_CURL_TOOL_PARAMHLP_H #define HEADER_CURL_TOOL_PARAMHLP_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_paramhlp.h
C
apache-2.0
2,116
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_parsecfg.c
C
apache-2.0
10,193
#ifndef HEADER_CURL_TOOL_PARSECFG_H #define HEADER_CURL_TOOL_PARSECFG_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_parsecfg.h
C
apache-2.0
1,233
#ifndef HEADER_CURL_TOOL_SDECLS_H #define HEADER_CURL_TOOL_SDECLS_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_sdecls.h
C
apache-2.0
5,052
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_setopt.c
C
apache-2.0
19,793
#ifndef HEADER_CURL_TOOL_SETOPT_H #define HEADER_CURL_TOOL_SETOPT_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_setopt.h
C
apache-2.0
5,695
#ifndef HEADER_CURL_TOOL_SETUP_H #define HEADER_CURL_TOOL_SETUP_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_setup.h
C
apache-2.0
2,356
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_sleep.c
C
apache-2.0
1,664
#ifndef HEADER_CURL_TOOL_SLEEP_H #define HEADER_CURL_TOOL_SLEEP_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_sleep.h
C
apache-2.0
1,185
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_strdup.c
C
apache-2.0
1,425
#ifndef HEADER_TOOL_STRDUP_H #define HEADER_TOOL_STRDUP_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (...
YifuLiu/AliOS-Things
components/curl/src/tool_strdup.h
C
apache-2.0
1,209
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_urlglob.c
C
apache-2.0
20,200
#ifndef HEADER_CURL_TOOL_URLGLOB_H #define HEADER_CURL_TOOL_URLGLOB_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_urlglob.h
C
apache-2.0
2,270
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_util.c
C
apache-2.0
3,905
#ifndef HEADER_CURL_TOOL_UTIL_H #define HEADER_CURL_TOOL_UTIL_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_util.h
C
apache-2.0
1,453
#ifndef HEADER_CURL_TOOL_VERSION_H #define HEADER_CURL_TOOL_VERSION_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_version.h
C
apache-2.0
1,470
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_vms.c
C
apache-2.0
6,401
#ifndef HEADER_CURL_TOOL_VMS_H #define HEADER_CURL_TOOL_VMS_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_vms.h
C
apache-2.0
1,645
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_writeout.c
C
apache-2.0
13,314
#ifndef HEADER_CURL_TOOL_WRITEOUT_H #define HEADER_CURL_TOOL_WRITEOUT_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_writeout.h
C
apache-2.0
1,242
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\...
YifuLiu/AliOS-Things
components/curl/src/tool_xattr.c
C
apache-2.0
3,860
#ifndef HEADER_CURL_TOOL_XATTR_H #define HEADER_CURL_TOOL_XATTR_H /*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * ...
YifuLiu/AliOS-Things
components/curl/src/tool_xattr.h
C
apache-2.0
1,194
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #if AOS_COMP_CLI #include "aos/debug.h" #include "aos/cli.h" static void debug_help_show(void) { aos_cli_printf("You can use debug cmd to show api test:\r\n"); aos_cli_printf("debug_api help --- show this\r\n"); aos_cli_printf("debug_api 1 --- ...
YifuLiu/AliOS-Things
components/debug/example/debug_example.c
C
apache-2.0
2,009
/** * @file debug.h * @copyright Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef AOS_DBG_H #define AOS_DBG_H #ifdef __cplusplus extern "C" { #endif /** @defgroup debug_aos_api debug * @{ */ #include <stdint.h> #include <k_api.h> /** * Show current contex backtrace * * @param[in] print_fun...
YifuLiu/AliOS-Things
components/debug/include/aos/debug.h
C
apache-2.0
3,666
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include "debug_api.h" typedef int32_t (*BT_PRINT)(const char *fmt, ...); void aos_debug_backtrace_now(int32_t (*print_func)(const char *fmt, ...)) { BT_PRINT bt_printf = print_func ? print_func : printf; debug_backtrace_now(bt_printf); } voi...
YifuLiu/AliOS-Things
components/debug/src/debug.c
C
apache-2.0
2,435
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef DBG_API_H #define DBG_API_H #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include "k_api.h" #include "debug_infoget.h" #include "debug_overview.h" #include "debug_panic.h" #include "debug_backtrace.h" #include "debug_print.h" #incl...
YifuLiu/AliOS-Things
components/debug/src/debug_api.h
C
apache-2.0
971
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <stdio.h> #include "k_api.h" /* follow functions should defined by arch\...\backtrace.c */ extern int backtrace_now(int (*print_func)(const char *fmt, ...)); extern int backtrace_task(void *task, int (*print_func)(const char *fmt, ...)); void d...
YifuLiu/AliOS-Things
components/debug/src/debug_backtrace.c
C
apache-2.0
1,469
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef DEBUG_BACKTRACE_H #define DEBUG_BACKTRACE_H #ifdef __cplusplus extern "C" { #endif void debug_backtrace_now(int32_t (*print_func)(const char *fmt, ...)); void debug_backtrace_task(char *taskname, int32_t (*print_func)(const char *fmt, ...)); #...
YifuLiu/AliOS-Things
components/debug/src/debug_backtrace.h
C
apache-2.0
379
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #if AOS_COMP_CLI #include <stdlib.h> #include <unistd.h> #include "k_api.h" #include "aos/cli.h" #include "aos/kernel.h" #include "debug_api.h" #if (RHINO_CONFIG_UCLI) #include "ucli.h" #endif #if defined (__CC_ARM) && defined(__MICROLIB) #de...
YifuLiu/AliOS-Things
components/debug/src/debug_cli_cmd.c
C
apache-2.0
8,489
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef DEBUG_CLI_CMD_H #define DEBUG_CLI_CMD_H #ifdef __cplusplus extern "C" { #endif void debug_cli_cmd_init(void); #ifdef __cplusplus } #endif #endif /* DEBUG_CLI_CMD_H */
YifuLiu/AliOS-Things
components/debug/src/debug_cli_cmd.h
C
apache-2.0
244
/* * Copyright (C) 2015-2019 Alibaba Group Holding Limited */ #if AOS_COMP_CLI #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include "k_api.h" #include "debug_api.h" #include "aos/cli.h" #if (RHINO_CONFIG_SYS_STATS > 0) #define CPU_USA...
YifuLiu/AliOS-Things
components/debug/src/debug_cpuusage.c
C
apache-2.0
13,716
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef DEBUG_CPUUSAGE_H #define DEBUG_CPUUSAGE_H #ifdef __cplusplus extern "C" { #endif #define CPU_USAGE_MAX_TASKNAME_LEN 32 struct cpuusage_data { char taskname[CPU_USAGE_MAX_TASKNAME_LEN]; float *cpuusage; }; void debug_task_cpu_usage_...
YifuLiu/AliOS-Things
components/debug/src/debug_cpuusage.h
C
apache-2.0
693
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #if AOS_COMP_CLI #include <string.h> #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include "aos/cli.h" #include "debug_api.h" typedef struct { char task_name[32]; uint32_t task_id; uint32_t task_state; uint32_t s...
YifuLiu/AliOS-Things
components/debug/src/debug_dumpsys.c
C
apache-2.0
8,976
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef DEBUG_DUMPSYS_H #define DEBUG_DUMPSYS_H #ifdef __cplusplus extern "C" { #endif void debug_dumpsys_cmds_register(void); #ifdef __cplusplus } #endif #endif /* DEBUG_DUMPSYS_H */
YifuLiu/AliOS-Things
components/debug/src/debug_dumpsys.h
C
apache-2.0
253
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include "debug_api.h" ktask_t *debug_task_find(char *name) { #if (RHINO_CONFIG_KOBJ_LIST > 0) klist_t *listnode; ktask_t *task; for (listnode = g_kobj_list.task_head.next; listnode != &g_kobj_list.task_head; listnode = listnode->ne...
YifuLiu/AliOS-Things
components/debug/src/debug_infoget.c
C
apache-2.0
2,222
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef DEBUG_INFOGET_H #define DEBUG_INFOGET_H #ifdef __cplusplus extern "C" { #endif /** * This function will get task handle by its name. */ ktask_t *debug_task_find(char *name); /** * This function will return the running task and its name. */ ...
YifuLiu/AliOS-Things
components/debug/src/debug_infoget.h
C
apache-2.0
920
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <stdarg.h> #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include "debug_api.h" #define MIN(x,y) (((x)<(y))?(x):(y)) #if DEBUG_LAST_WORD_ENABLE #ifdef CONFIG_VFS_LSOPEN static void debug_paniclog_to_file(void); #endif static int p...
YifuLiu/AliOS-Things
components/debug/src/debug_lastword.c
C
apache-2.0
12,857
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef DEBUG_LASTWORD_H #define DEBUG_LASTWORD_H #ifdef __cplusplus extern "C" { #endif #define DEBUG_PANIC_HEADER_MAGIC 0xdeba5a5aa5a5abed #define DEBUG_PANIC_LOG_MAGIC 0xdeba5a5aa5a5abed #define DEFAULT_REBOOT_REASON 0x01 #define RUNTIME_COUNT...
YifuLiu/AliOS-Things
components/debug/src/debug_lastword.h
C
apache-2.0
1,057
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include "k_api.h" #include "debug_api.h" /* convert int to ascii(HEX) while using format % in libc, malloc/free is involved. this function avoid using malloc/free. so it works when heap corrupt. */ char *k_int2str(int num, char *str) { char ...
YifuLiu/AliOS-Things
components/debug/src/debug_overview.c
C
apache-2.0
18,017
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef DEBUG_OVERVIEW_H #define DEBUG_OVERVIEW_H #ifdef __cplusplus extern "C" { #endif #define DEBUG_PANIC_IN_USER 1 #define DEBUG_PANIC_IN_KERNEL 0 typedef struct { int32_t total_size; int32_t free_size; int32_t used_size; ...
YifuLiu/AliOS-Things
components/debug/src/debug_overview.h
C
apache-2.0
2,283
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <stdarg.h> #include <stdbool.h> #include <time.h> #include "debug_api.h" #include "k_compiler.h" #include "aos/kernel.h" #include "aos/debug.h" #include "aos/errno.h" int backtrace_now(int (*print_func)(const char *fmt, ...)); void debug_panic_ba...
YifuLiu/AliOS-Things
components/debug/src/debug_panic.c
C
apache-2.0
14,103
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef DEBUG_PANIC_H #define DEBUG_PANIC_H #ifdef __cplusplus extern "C" { #endif #define DEBUG_PANIC_STEP_MAX 32 #define OS_PANIC_BY_NMI 0x31415926 #define OS_PANIC_NOT_REBOOT 0x21314916 /* how many steps has finished when crash */ extern volat...
YifuLiu/AliOS-Things
components/debug/src/debug_panic.h
C
apache-2.0
871
#include <stdarg.h> #include <stdint.h> #include <stddef.h> #include <string.h> #include <stdio.h> #include "aos/debug.h" #include "debug_api.h" #define LONGFLAG 0x00000001 #define LONGLONGFLAG 0x00000002 #define HALFFLAG 0x00000004 #define HALFHALFFLAG 0x00000008 #define SIZETFLAG 0x00000010 #def...
YifuLiu/AliOS-Things
components/debug/src/debug_print.c
C
apache-2.0
19,599
#ifndef __DEBUG_PRINT_H #define __DEBUG_PRINT_H #ifdef __cplusplus extern "C" { #endif #include <stdarg.h> int printk_direct(const char *fmt, ...); /* for ulog encoder*/ int print_driver(const char *fmt, va_list ap, unsigned int buf[]); #ifdef __cplusplus } #endif #endif /* __DEBUG_PRINT_H */
YifuLiu/AliOS-Things
components/debug/src/debug_print.h
C
apache-2.0
300
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #if AOS_COMP_CLI #include <stdio.h> #include <assert.h> #include "debug_api.h" #include "aos/debug.h" #include "aos/cli.h" #ifdef AOS_COMP_ULOG #include "ulog/ulog.h" #endif #define MAX_32 ((long)(~0UL)) #define MAX_64 ((long long)(~0ULL)) typedef int (*...
YifuLiu/AliOS-Things
components/debug/src/debug_test.c
C
apache-2.0
2,439
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef DEBUG_TEST_H #define DEBUG_TEST_H #ifdef __cplusplus extern "C" { #endif /* show cpu regs(armv7a)*/ void arch_regs_show(void); #ifdef __cplusplus } #endif #endif /* DEBUG_TEST_H */
YifuLiu/AliOS-Things
components/debug/src/debug_test.h
C
apache-2.0
258
/* * Copyright (C) 2021-2022 Alibaba Group Holding Limited */ #ifndef AOS_DEVFS_H #define AOS_DEVFS_H #include <unistd.h> #include <fcntl.h> #include <sys/types.h> #include <aos/kernel.h> #include <aos/device.h> #ifdef AOS_COMP_VFS #include <poll.h> #include <aos/vfs.h> #else #error Unsupported OS. #endif #define ...
YifuLiu/AliOS-Things
components/devfs/include/aos/devfs.h
C
apache-2.0
3,868
#include <stdlib.h> #include <stdio.h> #include <aos/device_core.h> #include <aos/devfs.h> static const char path_prefix[] = "/dev/"; typedef struct { aos_dev_ref_t ref; } devfs_file_data_t; static int devfs_open(inode_t *inode, file_t *file) { aos_devfs_node_t *node = (aos_devfs_node_t *)inode->i_arg; a...
YifuLiu/AliOS-Things
components/devfs/src/devfs_aos.c
C
apache-2.0
5,880
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include <stddef.h> #include <stdlib.h> #include <string.h> #include <errno.h> #if AOS_COMP_CLI #include "aos/cli.h" #endif #include "aos/list.h" #include <drivers/u_ld.h> #include <drivers/spinlock.h> #include <drivers/char/u_device.h> #include <driver...
YifuLiu/AliOS-Things
components/drivers/core/base/core/u_bus.c
C
apache-2.0
17,544
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include <errno.h> #include "aos/list.h" #include <drivers/char/u_cdev.h> #include <drivers/char/u_device.> int g_cdev_log_level = CDEV_LOG_DEBUG; //TODO: need to add lock to protect operations on g_cdev_list_head dlist_t g_cdev_list_head; #ifdef ENA...
YifuLiu/AliOS-Things
components/drivers/core/base/core/u_cdev.c
C
apache-2.0
9,229
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include <stddef.h> #include <errno.h> #include <string.h> #include <stdlib.h> #if AOS_COMP_CLI #include "aos/cli.h" #endif #include "aos/list.h" #include <drivers/char/u_device.h> #include <drivers/char/u_driver.h> #include <drivers/char/u_bus.h> #incl...
YifuLiu/AliOS-Things
components/drivers/core/base/core/u_device.c
C
apache-2.0
12,696
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include <stddef.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include "aos/list.h" #include <drivers/spinlock.h> #include <drivers/char/u_device.h> #include <drivers/char/u_driver.h> #include <drivers/char/u_bus.h> ...
YifuLiu/AliOS-Things
components/drivers/core/base/core/u_driver.c
C
apache-2.0
4,241
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include <errno.h> #include <pthread.h> #include "aos/list.h" #include <drivers/bug.h> #include <drivers/compat.h> #include <drivers/char/u_device.h> #include <drivers/u_interrupt.h> //TODO: use rbtree instead #if U_IRQ_DESC_LIST_RBTREE #else dlist_t g...
YifuLiu/AliOS-Things
components/drivers/core/base/core/u_interrupt.c
C
apache-2.0
13,226
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include <errno.h> #include <stddef.h> #include <stdio.h> #include <stdint.h> #if defined(USER_SPACE_DRIVER) && defined(ENABLE_IO_MMAP) #include <iomap.h> #endif #include <drivers/u_ld.h> /** * unified driver initialization entry * do register map pr...
YifuLiu/AliOS-Things
components/drivers/core/base/core/u_ld.c
C
apache-2.0
2,616
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifdef USER_SPACE_DRIVER #include <rpc.h> #endif #include "aos/vfs.h" #include "aos/list.h" #include <devicevfs/devicevfs.h> #include <drivers/char/u_cdev_msg.h> #include <drivers/u_mode.h> #define MAJOR_OFFSET 120 #define NODE_PREFIX "/dev/" static d...
YifuLiu/AliOS-Things
components/drivers/core/base/devicevfs/src/device_vfs_core.c
C
apache-2.0
34,139
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include <stddef.h> #ifdef USER_SPACE_DRIVER #include <rpc.h> #endif #include <drivers/char/u_device.h> #include <drivers/u_ld.h> #include <drivers/char/u_device.h> #include <drivers/char/u_cdev_msg.h> extern long __core_driver_start__; extern long __cor...
YifuLiu/AliOS-Things
components/drivers/core/base/devicevfs/src/u_driver_hub.c
C
apache-2.0
3,256
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #include <errno.h> #include <sys/types.h> #include <unistd.h> #include <drivers/bug.h> #include <drivers/u_ld.h> #include <drivers/char/u_device.h> #include <drivers/char/u_cdev_msg.h> #include <devicevfs/devicevfs_rpc.h> #ifdef USER_SPACE_DRIVER #include...
YifuLiu/AliOS-Things
components/drivers/core/base/devicevfs/src/u_driver_main.c
C
apache-2.0
6,098
/* * Copyright (C) 2020-2021 Alibaba Group Holding Limited */ #ifndef AOS_DEVICE_H #define AOS_DEVICE_H #include <aos/kernel.h> typedef enum { AOS_DEV_TYPE_MISC = 0, AOS_DEV_TYPE_INTC, AOS_DEV_TYPE_TTY, AOS_DEV_TYPE_GPIOC, AOS_DEV_TYPE_GPIO, AOS_DEV_TYPE_WATCHDOG, AOS_DEV_TYPE...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/device.h
C
apache-2.0
1,184
/* * Copyright (C) 2020-2021 Alibaba Group Holding Limited */ #ifndef AOS_DEVICE_CORE_H #define AOS_DEVICE_CORE_H #include <aos/kernel.h> #include <aos/list.h> #include <k_rbtree.h> #include <aos/device.h> #ifdef AOS_COMP_DEVFS #include <aos/devfs.h> #endif #if defined(CONFIG_DRV_CORE) && CONFIG_DRV_CORE != 0 #incl...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/device_core.h
C
apache-2.0
1,538
/** * @file can.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_CAN_H #define HAL_CAN_H #ifdef __cplusplus extern "C" { #endif #include <stdint.h> /** @addtogroup hal_can CAN * CAN hal API. * * @{ */ /* * CAN handle configuration */ typedef struct { uint32_t baud_...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/can.h
C
apache-2.0
3,185
/** * @file i2s.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_I2S_H #define HAL_I2S_H #ifdef __cplusplus extern "C" { #endif /** @addtogroup hal_i2s I2S * i2s hal API. * * @{ */ #include <stdint.h> /* Define the wait forever timeout macro */ #define HAL_WAIT_FOREVER 0...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/i2s.h
C
apache-2.0
3,533
/** * @file interpt.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_INTERPT_H #define HAL_INTERPT_H #ifdef __cplusplus extern "C" { #endif /** @addtogroup hal_interpt INTERPT * interpt hal API. * * @{ */ #include <stdint.h> /* interrupt proc handle */ typedef void (*hal...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/interpt.h
C
apache-2.0
1,343
/** * @file nand.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_NAND_H #define HAL_NAND_H #ifdef __cplusplus extern "C" { #endif /** @addtogroup hal_nand NAND * nand hal API. * * @{ */ #include <stdint.h> typedef struct { uint32_t page_size; /**< NAND memory ...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/nand.h
C
apache-2.0
3,487
#ifndef _NAND_FLASH_HAL_ #define _NAND_FLASH_HAL_ #include <hal/flash.h> typedef struct { /* manufacturer ID */ uint8_t mid; /* Device ID */ uint8_t did; /* Organization ID */ uint8_t oid; /* internal chip number: * 0b00 - 1, * 0b01 - 2, * 0b10 - 4, * 0b11 - ...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/nand_flash.h
C
apache-2.0
5,430
/** * @file nor.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_NOR_H #define HAL_NOR_H #ifdef __cplusplus extern "C" { #endif /** @addtogroup hal_nor NOR * nor hal API. * * @{ */ #include <stdint.h> typedef struct { uint32_t block_size; /**< NOR memory block size n...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/nor.h
C
apache-2.0
2,518
/** * @file rng.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_RNG_H #define HAL_RNG_H #ifdef __cplusplus extern "C" { #endif /** @addtogroup hal_rng RNG * rng hal API. * * @{ */ #include <stdint.h> typedef struct { uint8_t port; /**< random device port */ voi...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/rng.h
C
apache-2.0
890
/** * @file rtc.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_RTC_H #define HAL_RTC_H #ifdef __cplusplus extern "C" { #endif /** @addtogroup hal_rtc RTC * rtc hal API. * * @{ */ #include <stdint.h> /* Decode format list */ #define HAL_RTC_FORMAT_DEC 1 #define HAL_RTC_...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/rtc.h
C
apache-2.0
2,460
/** * @file sd.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_SD_H #define HAL_SD_H #ifdef __cplusplus extern "C" { #endif /** @addtogroup hal_sd SD * sd hal API. * * @{ */ #include <stdint.h> /* This enum lists all SD states */ typedef enum { SD_STAT_RESET, SD...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/sd.h
C
apache-2.0
3,247
/** * @file usbd.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_USBD_H #define HAL_USBD_H #ifdef __cplusplus extern "C" { #endif /** @addtogroup hal_usbd USBD * usbd hal API. * * @{ */ #include <stdint.h> #include "usb_device.h" /* Endpoint transfer status, for endpoi...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/usbd.h
C
apache-2.0
5,964
/** * @file usbh.h * @copyright Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #ifndef HAL_USBH_H #define HAL_USBH_H #ifdef __cplusplus extern "C" { #endif /** @addtogroup hal_usbh USBH * usbh hal API. * * @{ */ #include <stdint.h> /** * @brief Initialize The USB Host Controller * * @param[in...
YifuLiu/AliOS-Things
components/drivers/core/base/include/aos/hal/usbh.h
C
apache-2.0
2,985
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _DEVICE_VFS_H_ #define _DEVICE_VFS_H_ #include <errno.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <aos/kernel.h> #include <drivers/mutex.h> #include <drivers/u_ld.h> #include <drivers/platform/u_platform_bus.h> #defin...
YifuLiu/AliOS-Things
components/drivers/core/base/include/devicevfs/devicevfs.h
C
apache-2.0
4,724
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _DEVICEVFS_RPC_H_ #define _DEVICEVFS_RPC_H_ /** * * open RPC message handler, called when OPEN rpc message arrived in main rpc service's handler * * @param parg - pointer to u_fops_arg_u * @param crpc_handle - rpc client's handle, * respons...
YifuLiu/AliOS-Things
components/drivers/core/base/include/devicevfs/devicevfs_rpc.h
C
apache-2.0
921
/* atomic operations */ /* * Copyright (c) 1997-2015, Wind River Systems, Inc. * * SPDX-License-Identifier: Apache-2.0 */ #ifndef __ATOMIC_H__ #define __ATOMIC_H__ #ifdef __cplusplus static "C" { #endif typedef int atomic_t; typedef atomic_t atomic_val_t; /** * @defgroup atomic_apis Atomic Services APIs * @in...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/atomic.h
C
apache-2.0
11,832
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _BUG_H_ #define _BUG_H_ #include <stdio.h> #define BUG() do {} while(1) #define panic(...) BUG_ON_MSG(1, ##__VA_ARGS__) #define BUG_ON(condition) do { \ if (unlikely(condition)) { \ printf("BUG at %s:%d!\r\n", __func__, __LINE__); \ ...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/bug.h
C
apache-2.0
1,247
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _U_BUS_H_ #define _U_BUS_H_ #include "aos/list.h" #include <drivers/spinlock.h> #include <drivers/char/u_driver.h> /** * struct u_bus_private - bus private information * should only be accessed by char_core * @dev_list: device list belongs t...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/char/u_bus.h
C
apache-2.0
3,565
/** * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _CHAR_DEV_H_ #define _CHAR_DEV_H_ #include "aos/list.h" #define CDEV_LOG_DEBUG 0 #define CDEV_LOG_INFO 1 #define CDEV_LOG_WARN 2 #define CDEV_LOG_ERROR 3 extern int g_cdev_log_level; static char cdev_level_tag[] = { 'D', 'I', 'W', 'E' }...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/char/u_cdev.h
C
apache-2.0
1,981
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _U_CDEV_MSG_H_ #define _U_CDEV_MSG_H_ #define U_CDEV_RPC_BUFFER_SIZE (4 * 1024 + 64) typedef enum fops_msg_id { FOPS_MIN = 0, /* Application -> C */ FOPS_OPEN, /* open operation */ FOPS_READ, /* read operation */ FOPS_...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/char/u_cdev_msg.h
C
apache-2.0
3,632
/** * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _U_DEVICE_H_ #define _U_DEVICE_H_ #include <stdio.h> #include "aos/list.h" #include "aos/vfs.h" #include <drivers/spinlock.h> #include <drivers/ddkc_log.h> #define LOG_TAG "UDEV" #include <ulog/ulog.h> struct u_device; struct u_device_private...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/char/u_device.h
C
apache-2.0
3,881
/** * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _U_DRIVER_H_ #define _U_DRIVER_H_ #include <drivers/spinlock.h> enum U_PM_EVENT { E_PM_ENTER, E_PM_L0, E_PM_L1, E_PM_EXIT, }; // TODO: should move this to power manager header file typedef struct u_pm_ops { int event; } u_pm_ops_t; /** ...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/char/u_driver.h
C
apache-2.0
2,094
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _DDKC_LOG_H_ #define _DDKC_LOG_H_ #include <unistd.h> #include <sys/types.h> /*!!!!!!!!!! ONLY loglevel and log format should be modified !!!!!!!!!*/ extern int g_ddkc_log_level; extern char ddkc_level_tag[]; /*!!!!!!!!!! NEVER TRY to modify th...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/ddkc_log.h
C
apache-2.0
1,258
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _DRIVERS_TEST_H_ #define _DRIVERS_TEST_H_ int drivers_test(void); #endif //_DRIVERS_TEST_H_
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/drivers_test.h
C
apache-2.0
167
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _MUTEX_H_ #define _MUTEX_H_ #include <pthread.h> #include <drivers/bug.h> #include <drivers/spinlock.h> #include <drivers/ddkc_log.h> #include <drivers/spinlock.h> #define MUTEX_INIT_DONE_FLAG 0xACBDFDBC /** * DEFINE_MUTEX(x) will define a mu...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/mutex.h
C
apache-2.0
3,376
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef NETDEVICE_H #define NETDEVICE_H #include <stdint.h> #include <stddef.h> #include <assert.h> #include "object.h" #include "device.h" #include "aos/kernel.h" #include "aos/vfs.h" #ifdef __cplusplus extern "C" { #endif typedef enum net_device_typ...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/netdevice.h
C
apache-2.0
1,346
/** * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _U_PLATFORM_BUS_H_ #define _U_PLATFORM_BUS_H_ #include <stdbool.h> #include "aos/list.h" #include <drivers/char/u_device.h> #include <drivers/char/u_driver.h> #include <drivers/char/u_bus.h> typedef struct u_platform_device { const char *name...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/platform/u_platform_bus.h
C
apache-2.0
1,979
/* * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _SPINLOCK_H_ #define _SPINLOCK_H_ #include <stdio.h> #include <drivers/u_mode.h> #ifdef CONFIG_PTHREAD_SPINLOCK_SUPPORT #include <pthread.h> typedef struct spinlock { unsigned int flag; pthread_spinlock_t ps; } spinlock_t; #define __SPIN_LOC...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/spinlock.h
C
apache-2.0
3,041
/** * Copyright (C) 2015-2021 Alibaba Group Holding Limited */ #ifndef _U_DEVICE_INFO_H_ #define _U_DEVICE_INFO_H_ #include "aos/list.h" #include <drivers/u_io.h> struct u_bus_info; struct u_device_info; struct u_driver_info; typedef unsigned int u_dev_t; typedef struct u_bus_info { bus_type_e type; /*TODO: c...
YifuLiu/AliOS-Things
components/drivers/core/base/include/drivers/u_device_info.h
C
apache-2.0
2,812