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
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #ifndef AOS_UNIT_TEST_H #define AOS_UNIT_TEST_H #include <stddef.h> #include <string.h> #ifdef __cplusplus extern "C" { #endif #ifndef AOS_EXPORTX #define AOS_EXPORT(ret, fun, ...) #endif #ifndef AOS_COMPONENT_INIT #define AOS_COMPONENT_INIT(fun, ...)...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/include/yunit.h
C
apache-2.0
6,388
NAME := pwm_test $(NAME)_MBINS_TYPE := app $(NAME)_VERSION := 0.0.1 $(NAME)_SUMMARY := testcase for pwm $(NAME)_SOURCES += pwm_test.c $(NAME)_CFLAGS += -Wall -Werror
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/pwm/aos.mk
Makefile
apache-2.0
176
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdint.h> #include <string.h> #include <stdlib.h> #include "aos/kernel.h" #include "aos/hal/pwm.h" #include "pwm_test.h" #define PWM_TESTCASE_NUM 10 pwm_dev_t pwm_dev; pwm_config_t config; pwm_config_t testsace_config[P...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/pwm/pwm_test.c
C
apache-2.0
2,689
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #define PORT_PWM_TEST 0 void hal_pwm_test(void);
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/pwm/pwm_test.h
C
apache-2.0
115
src = Split(''' pwm_test.c ''') component = aos_component('pwm_test', src) component.add_cflags('-Wall') component.add_cflags('-Werror')
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/pwm/ucube.py
Python
apache-2.0
143
NAME := rng_test $(NAME)_MBINS_TYPE := app $(NAME)_VERSION := 0.0.1 $(NAME)_SUMMARY := testcase for rng $(NAME)_SOURCES += rng_test.c $(NAME)_CFLAGS += -Wall -Werror
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/rng/aos.mk
Makefile
apache-2.0
176
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdint.h> #include <string.h> #include "aos/kernel.h" #include "aos/hal/rng.h" #include "rng_test.h" #define RNG_TEST_TIMES 1000 random_dev_t rng_dev; uint32_t random_buf[RNG_TEST_TIMES]; void hal_rng_test(void) { int...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/rng/rng_test.c
C
apache-2.0
1,784
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #define PORT_RNG_TEST 0 void hal_rng_test(void);
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/rng/rng_test.h
C
apache-2.0
115
src = Split(''' rng_test.c ''') component = aos_component('rng_test', src) component.add_cflags('-Wall') component.add_cflags('-Werror')
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/rng/ucube.py
Python
apache-2.0
143
NAME := rtc_test $(NAME)_MBINS_TYPE := app $(NAME)_VERSION := 0.0.1 $(NAME)_SUMMARY := testcase for rtc $(NAME)_SOURCES += rtc_test.c $(NAME)_CFLAGS += -Wall -Werror
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/rtc/aos.mk
Makefile
apache-2.0
176
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdint.h> #include <string.h> #include "aos/kernel.h" #include "aos/hal/rtc.h" #include "rtc_test.h" #define RTC_DELAY_MS 2000 #define RTC_TOLERANCE_RANGE 0.01f static rtc_time_t rtc_time_r; static rtc_time_t rtc_time = {....
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/rtc/rtc_test.c
C
apache-2.0
2,340
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #define PORT_RTC_TEST 0 void hal_rtc_test(void);
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/rtc/rtc_test.h
C
apache-2.0
115
src = Split(''' rtc_test.c ''') component = aos_component('rtc_test', src) component.add_cflags('-Wall') component.add_cflags('-Werror')
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/rtc/ucube.py
Python
apache-2.0
143
NAME := spi_test $(NAME)_MBINS_TYPE := app $(NAME)_VERSION := 0.0.1 $(NAME)_SUMMARY := testcase for spi $(NAME)_SOURCES += spi_test.c $(NAME)_CFLAGS += -Wall -Werror
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/spi/aos.mk
Makefile
apache-2.0
176
#ifndef __SPI_FLASH_H #define __SPI_FLASH_H #include "stm32f10x.h" #define SPI_FLASH_SPI SPI1 #define SPI_FLASH_SPI_CLK RCC_APB2Periph_SPI1 #define SPI_FLASH_SPI_SCK_PIN GPIO_Pin_5 /* PA.05 */ #define SPI_FLASH_SPI_SCK_GPIO_POR...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/spi/spi_flash.h
C
apache-2.0
2,055
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdint.h> #include <string.h> #include <stdlib.h> #include "aos/kernel.h" #include "aos/hal/spi.h" #include "spi_test.h" #include "board.h" #include "stm32f4xx_hal.h" /* Private define ---------------------------------------...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/spi/spi_test.c
C
apache-2.0
6,821
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #define PORT_SPI_TEST 1 void hal_spi_test(void);
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/spi/spi_test.h
C
apache-2.0
115
src = Split(''' spi_test.c ''') component = aos_component('spi_test', src) component.add_cflags('-Wall') component.add_cflags('-Werror')
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/spi/ucube.py
Python
apache-2.0
143
NAME := timer_test $(NAME)_MBINS_TYPE := app $(NAME)_VERSION := 0.0.1 $(NAME)_SUMMARY := testcase for timer $(NAME)_SOURCES += timer_test.c $(NAME)_CFLAGS += -Wall -Werror
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/timer/aos.mk
Makefile
apache-2.0
182
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdint.h> #include <stdio.h> #include <string.h> #include "aos/kernel.h" #include "aos/hal/timer.h" #include "timer_test.h" #define TIMER_PERIOD_US_TEST1 100000 #define TIMER_PERIOD_US_TEST2 200000 #define TIMER_PERIOD_TOLERANCE_RANGE 0.01f s...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/timer/timer_test.c
C
apache-2.0
3,775
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #define PORT_TIMER_TEST 1 void hal_timer_test(void);
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/timer/timer_test.h
C
apache-2.0
119
src = Split(''' flash_test.c ''') component = aos_component('flash_test', src) component.add_cflags('-Wall') component.add_cflags('-Werror')
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/timer/ucube.py
Python
apache-2.0
147
NAME := uart_test $(NAME)_MBINS_TYPE := app $(NAME)_VERSION := 0.0.1 $(NAME)_SUMMARY := testcase for uart $(NAME)_SOURCES += uart_test.c ymodem.c $(NAME)_CFLAGS += -Wall -Werror
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/uart/aos.mk
Makefile
apache-2.0
188
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdint.h> #include <string.h> #include "aos/kernel.h" #include "aos/hal/uart.h" #include "uart_test.h" #include "ymodem.h" uart_dev_t uart_dev; void hal_uart_test(void) { int32_t ret = -1; printf("*********** uart ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/uart/uart_test.c
C
apache-2.0
637
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #define PORT_UART_TEST 0 void hal_uart_test(void);
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/uart/uart_test.h
C
apache-2.0
117
src = Split(''' uart_test.c ''') component = aos_component('uart_test', src) component.add_cflags('-Wall') component.add_cflags('-Werror')
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/uart/ucube.py
Python
apache-2.0
145
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ /* Includes ------------------------------------------------------------------*/ #include "ymodem.h" void Int2Str(uint8_t *str, int32_t intnum); void Int2Str(uint8_t *str, int32_t intnum); uint8_t FileName[256]; void Int2Str(uint8_t *str, int...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/uart/ymodem.c
C
apache-2.0
19,712
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ /* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __YMODEM_H_ #define __YMODEM_H_ #include <stdio.h> #include <string.h> #include <stdint.h> #include "aos/hal/uart.h" #include "aos/hal/flash.h" /* I...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/uart/ymodem.h
C
apache-2.0
2,665
src = Split(''' hal_test.c ''') component = aos_component('hal_test', src) component.add_cflags('-Wall') component.add_cflags('-Werror')
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/ucube.py
Python
apache-2.0
143
NAME := wdg_test $(NAME)_MBINS_TYPE := app $(NAME)_VERSION := 0.0.1 $(NAME)_SUMMARY := testcase for wdg $(NAME)_SOURCES += wdg_test.c $(NAME)_CFLAGS += -Wall -Werror
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/wdg/aos.mk
Makefile
apache-2.0
176
src = Split(''' flash_test.c ''') component = aos_component('flash_test', src) component.add_cflags('-Wall') component.add_cflags('-Werror')
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/wdg/ucube.py
Python
apache-2.0
147
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdint.h> #include <string.h> #include "aos/kernel.h" #include "aos/hal/wdg.h" #include "aos/hal/flash.h" #include "wdg_test.h" /* if WGD_TIMEOUT_MS is 1000, WGD_TIMEOUT_TOLERANCE_RANGE is 0.3f, wdg test will be OK if th...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/wdg/wdg_test.c
C
apache-2.0
3,985
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #define PORT_WDG_TEST 0 #define PARTITION_WDG_TEST HAL_PARTITION_OTA_TEMP void rtc_test_init(void);
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/wdg/wdg_test.h
C
apache-2.0
166
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdarg.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include "aos/kernel.h" #include "ulog/ulog.h" #include "yunit.h" #define TAG "yunit" typedef struct yunit_test_case_node_s { struct yunit_test_case_node_s *next; c...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_test/yunit.c
C
apache-2.0
9,923
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdbool.h> #include <string.h> #include <k_api.h> #include "aos/hal/timer.h" #include "board.h" #include "timer_api.h" gtimer_t local_timer; int32_t hal_timer_init(timer_dev_t *tim) { int32_t ret = -1; if(tim == NULL) r...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hal_timer.c
C
apache-2.0
1,293
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include <stdio.h> #include <stdbool.h> #include <string.h> #include <k_api.h> #include "ulog/ulog.h" #include "aos/hal/uart.h" #include "aos/hal/timer.h" #include "board.h" #include "diag.h" #include "platform_stdlib.h" #define TAG "hw" #define us2...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/hw.c
C
apache-2.0
1,742
/* * Copyright (C) 2015-2018 Alibaba Group Holding Limited */ #include <stdio.h> #include <k_api.h> #include <stdint.h> #include <stdbool.h> #include "board.h" #include "aos/hal/i2c.h" #include "i2c_api.h" #include "pinmap.h" /*I2C pin location: * I2C0: * - S0: PA_25(SCL)/PA_26(SDA). * - S1: PB_5(SCL)/PB_6(S...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/i2c.c
C
apache-2.0
3,640
#include "ota/ota_service.h" #include <platform/platform_stdlib.h> #include <osdep_service.h> #include <rtl8721d_ota.h> #include <flash_api.h> #include <device_lock.h> #include "aos/hal/flash.h" #include "aos/kernel.h" #include <ameba_soc.h> static u32 alinknewImg2Addr = 0xFFFFFFFF; char *HeadBuffer = NULL; #define...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/ota.c
C
apache-2.0
13,950
#include <stdint.h> #include "pwmout_api.h" #include "aos/hal/pwm.h" static pwmout_t PWM[18]; u32 port2pin[18][2]={ {0, PA_12}, {1, PA_13}, {2, PA_23}, {3, PA_24}, {4, PA_25}, {5, PA_26}, {6, PA_28}, {7, PA_30}, {8, PB_4}, {9, PB_5}, {10, PB_18}, {11, PB_19}, {12, PB_20}, {13, PB_2...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/pwm.c
C
apache-2.0
2,459
/* * Copyright (C) 2018 Alibaba Group Holding Limited */ /* DESCRIPTION This library provides the support for the STM32L496G-DISCOVERY CPU power state control. CPU power management: provides low-level interface for setting CPU C-states. provides low-level interface for setting CPU P-states. */ #include <k_api.h> #...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/pwrmgmt_hal/board_cpu_pwr.c
C
apache-2.0
7,878
/* * Copyright (C) 2018 Alibaba Group Holding Limited */ /* * This file supplied RTC one-shot start/stop services for CPU tickless * module, verifyied on STM32L496-DISCOVERY with C3/C4 mode. * C3: stop mode. * C4: standby mode. */ #include <k_api.h> #if (AOS_COMP_PWRMGMT > 0) #include <stdint.h> #include <stdb...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/pwrmgmt_hal/board_cpu_pwr_rtc.c
C
apache-2.0
1,822
/* * Copyright (C) 2018 Alibaba Group Holding Limited */ /* DESCRIPTION This file provides two fundtions systick_suspend()/systick_resume() which is used by cpu tickless module to suspend/resume system tick interrupt. Differrent board may has different way to suspend/resume system tick interrupt, please reference y...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/pwrmgmt_hal/board_cpu_pwr_systick.c
C
apache-2.0
862
#if (AOS_COMP_PWRMGMT > 0) #include <hal/wifi.h> #include "pwrmgmt_api.h" #include <cpu_pwr.h> #define SET_BIT(off) ((uint32_t)1 << (off)) uint32_t sleep_type = SLEEP_CG; /* 0 is power gate, 1 is clock gate */ static sys_time_t cpu_pwr_active_exit_tick = 0; static uint32_t cpu_suspend_lock = 0; int cpu_pw...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/pwrmgmt_hal/pwrmgmt_api.c
C
apache-2.0
2,117
#if (AOS_COMP_PWRMGMT > 0) #include "pwrmgmt.h" #endif #include "ameba_soc.h" int pwrmgmt_cpu_active_msec_set(uint32_t active_time); uint32_t pwrmgmt_sleep_type_set(uint32_t type); int pwrmgmt_cpu_lowpower_suspend(uint32_t suspend_module); int pwrmgmt_cpu_lowpower_resume(uint32_t resume_module); int ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/pwrmgmt_hal/pwrmgmt_api.h
C
apache-2.0
860
#include "ameba_soc.h" #include "k_api.h" #include "board.h" #include "device.h" #include "aos/hal/rtc.h" #include <time.h> #include "rtc_api.h" static struct tm rtc_timeinfo; static int rtc_en = 0; const static u8 dim[12] = { 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; /** * @brief This func...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/rtc.c
C
apache-2.0
8,392
#include <errno.h> #include <stdint.h> #include <aos/hal/sd.h> int32_t hal_sd_init(sd_dev_t *sd) { return -1; } int32_t hal_sd_blks_read(sd_dev_t *sd, uint8_t *data, uint32_t blk_addr, uint32_t blks, uint32_t timeout) { return -1; } int32_t hal_sd_blks_write(sd_dev_t *sd, uint8_t *d...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/sd.c
C
apache-2.0
739
#include "ameba_soc.h" #include "k_api.h" #include "board.h" #include "device.h" #include "gpio_api.h" #include "aos/hal/uart.h" #include "device.h" #include "serial_api.h" #include "gpio_api.h" #include "diag.h" #define RX_BUFFER_LENGTH 128 typedef struct { u8 id; PinName tx; PinName rx; PinName r...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/uart.c
C
apache-2.0
12,125
/* * Copyright (C) 2015-2017 Alibaba Group Holding Limited */ #include "aos/hal/wdg.h" #include "wdt_api.h" #include "sys_api.h" #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif static bool is_enable_handler = FALSE; void watchdog_irq_handler(uint32_t callback_id) { printf("watchdog_ir...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/wdg.c
C
apache-2.0
1,092
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "aos/hal/wifi.h" #include <platform/platform_stdlib.h> #include <wifi/wifi_conf.h> #include <wifi/wifi_util.h> #include <wifi/wifi_ind.h> #include <lwip_netconf.h> #include <osdep_service.h> #include <uservice/uservice.h> #include <uservice/eventid.h>...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/wifi_port.c
C
apache-2.0
22,280
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #include <drivers/u_ld.h> #include <vfsdev/wifi_dev.h> #include <uservice/uservice.h> #include <uservice/eventid.h> #include <aos/hal/wifi.h> #if LWIP_ETHERNETIF && !LWIP_SUPPORT #include <lwip/def.h> #include <lwip/netdb.h> #endif #include "aos/vfs.h" #i...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hal/wifi_port_ref.c
C
apache-2.0
23,129
#include <errno.h> #include <stddef.h> #include <zephyr.h> #include <misc/util.h> #include <misc/byteorder.h> #include <string.h> #define BT_DBG_ENABLED IS_ENABLED(CONFIG_BT_DEBUG_HCI_DRIVER) #include <bluetooth/bluetooth.h> #include <bluetooth/hci.h> #include <bluetooth/hci_driver.h> #include <common/log.h> #inclu...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/hci_driver/hci_driver.c
C
apache-2.0
7,993
import sys, hashlib, os import struct # changed by yanxiaoyong.yxy # https://blog.csdn.net/qq_43192819/article/details/108981008 # https://blog.csdn.net/whatday/article/details/107769032 def MD5(input): md5 = hashlib.md5() md5.update(input) return bytes.fromhex(md5.hexdigest()) #return md5.hexdigest...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/ota.py
Python
apache-2.0
1,150
# Date : 2019/03/08 # Author : Snow Yang # Mail : yangsw@mxchip.com import os import sys image_file = sys.argv[1] size = os.path.getsize(image_file) pad_size = (((size - 1) >> 12) + 1) << 12 open(image_file, 'ab').write(b'\xFF'*(pad_size - size))
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/pad.py
Python
apache-2.0
256
#!/bin/bash ################ # Library ################ Usage() { echo "Usage: $0 [Image Name]" } ################ # Main ################ if [ "$#" -lt 1 ]; then Usage exit 1 fi # Get Parameters IMAGE_FILENAME=$1 filesize=$(stat -c "%s" $IMAGE_FILENAME) newsize=$((((($filesize - 1) >> 12) + 1) << 12)) ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/pad.sh
Shell
apache-2.0
436
# Date : 2019/03/08 # Author : Snow Yang # Mail : yangsw@mxchip.com import re import os import sys from struct import pack image_file = sys.argv[1] section_start_name = sys.argv[2] symbol_list_file = sys.argv[3] size = os.path.getsize(image_file) addr = int('0x'+re.search(r"\n(\w+) (\w+) "+section_start_name,...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/prepend_header.py
Python
apache-2.0
540
#!/bin/bash ################ # Library ################ Usage() { echo "Usage: $0 [Image Name] [Start Symbol Name] [Symbols List File]" } # Parameter: # value, width, dest function MakeFixedWidthHeaderString() { local __value=$1 local __width=$2 local __dest=$3 local __reorder=$4 local __...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/prepend_header.sh
Shell
apache-2.0
2,395
#!/usr/bin/env python import os, sys, re, time, json from flash_program_ll import burn_bin_files try: import serial from serial.tools import miniterm except: print("\nNot found pyserial, please install it by: \nsudo python%d -m pip install pyserial" % (sys.version_info.major)) sys.exit(-1) #force to y...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/release/aos_burn_tool/flash_program.py
Python
apache-2.0
4,348
#!/usr/bin/env python import os, sys, re, time from ymodem import YModem try: import serial from serial.tools import miniterm except: print("\nNot found pyserial, please install it by: \nsudo python%d -m pip install pyserial" % (sys.version_info.major)) sys.exit(-1) def match_and_send(serialport, patt...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/release/aos_burn_tool/flash_program_ll.py
Python
apache-2.0
6,932
#! /usr/bin/env python # -*- coding: utf-8 -*- """ MIT License Copyright (c) 2018 Alex Woo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ri...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/release/aos_burn_tool/ymodem.py
Python
apache-2.0
19,170
#! /usr/bin/env python import os import platform import argparse import sys import shutil print(sys.argv) parser = argparse.ArgumentParser() parser.add_argument('--target', dest='target', action='store') args = parser.parse_args() mypath = os.path.dirname(sys.argv[0]) os.chdir(mypath) print(os.getcwd()) target = arg...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/release/auto_build_tool/build_bin.py
Python
apache-2.0
2,500
#!/usr/bin/python # -*- coding: utf-8 -*- #本文件用于适配python3.x版本,在3.7.3版本下测试通过。其他版本未测试。 #修改本文件的目的是解决3.x版本下,使用aos make命令编译固件时发生的两个错误 #第一个错误是“missing parentheses in call to 'print'” #第二个错误是“module ‘string’ has no attribute 'find'" #花生,2020年10月6日 import os import sys #import struct import time #import yaml im...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/release/auto_build_tool/genbin.py
Python
apache-2.0
17,060
#! /usr/bin/env python3 import os, sys, re, struct, platform, getopt, subprocess from sys import platform as _platform import array,hashlib,struct def update_crc16(crcin, byte): crc = crcin calculen = byte | 0x100 crc <<= 1 calculen <<= 1 if calculen & 0x100 > 0: crc += 1 if crc & 0x10...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/release/auto_build_tool/ota_gen_md5_bin.py
Python
apache-2.0
3,481
#!/bin/sh export PATH=${PATH}:$5 ota_offset=$1 #dir=/home/cwhaiyi/pcshare/rualxw/AliOS-Things/platform/mcu/rtl8710bn platform_dir=$2/platform/mcu/rtl8710bn if [ ! -d "${platform_dir}/Debug/Exe" ]; then mkdir -p ${platform_dir}/Debug/Exe fi BIN_DIR=${platform_dir}/Debug/Exe app=`echo $3 | tr '/' '.'` outputplatform=$...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/script/manipulate_image.sh
Shell
apache-2.0
3,496
cd /D %2\platform\mcu\rtl8710bn\ ::echo %1 %2 %3 %4 > tmp3.txt set rootdir=%2 set amebazdir=%2\platform\mcu\rtl8710bn set tooldir=%2\platform\mcu\rtl8710bn\tools set libdir=%2\platform\mcu\rtl8710bn\lib set bindir=%2\platform\mcu\rtl8710bn\Debug\Exe set ota_bin_ver=0x%date:~0,4%%date:~5,2%%date:~8,2% set ota_offset=%1 ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/script/postbuild_img2.bat
Batchfile
apache-2.0
4,194
Dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "cmd /c "+WScript.Arguments.Item(1)+"postbuild_img2.bat "+WScript.Arguments.Item(0)+" "+WScript.Arguments.Item(1), 0
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/script/postbuild_img2.vbs
VBScript
apache-2.0
198
#define UTS_VERSION "2017/12/20-10:58:56" #define RTL8195AFW_COMPILE_TIME "2017/12/20-10:58:56" #define RTL8195AFW_COMPILE_DATE "2017/12/20" #define RTL8195AFW_COMPILE_BY "Jeanne" #define RTL8195AFW_COMPILE_HOST "Jeanne-PC" #define RTL8195AFW_COMPILE_DOMAIN #define RTL8195AFW_COMPILER "IAR compiler"
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/build_info.h
C
apache-2.0
308
/* Includes ------------------------------------------------------------------*/ #include "lwip/mem.h" #include "lwip/memp.h" #include "lwip/dhcp.h" #include "lwip/dns.h" #include "lwip/tcpip.h" #include "ethernetif.h" #include "main.h" #include "lwip_netconf.h" #if CONFIG_WLAN #include "wifi_ind.h" #endif #if defined(...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/lwip_netconf.c
C
apache-2.0
11,906
/****************************************************************************** * * This module is a confidential and proprietary property of RealTek and * possession or use of this module requires written permission of RealTek. * * Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved. ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/lwip_netconf.h
C
apache-2.0
2,561
/****************************************************************************** * Copyright (c) 2013-2016 Realtek Semiconductor Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/platform/dlist.h
C
apache-2.0
8,003
/****************************************************************************** * Copyright (c) 2013-2016 Realtek Semiconductor Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/platform/platform_stdlib.h
C
apache-2.0
2,039
#ifndef PLATFORM_STDLIB_8721D_H #define PLATFORM_STDLIB_8721D_H #define CONFIG_PLATFORM_AMEBA_X 1 #if defined (__IARSTDLIB__) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <stdarg.h> /* va_list */ #include "diag.h" #define strsep(str, delim) _strsep(str, delim) ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/platform/platform_stdlib_rtl8721d.h
C
apache-2.0
2,742
/* this is the c lib patch, It can help when the clib provided by IAR does not work well. How to use this: 1.You must include platform_stdlib.h in you source file。 2.There is a macro USE_CLIB_PATCH in platform_stdlib.h should be opened. If there is some problems using this patch, You'd better check if y...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/platform/stdlib_patch.c
C
apache-2.0
16,376
/* * SSL/TLS interface definition * Copyright (c) 2004-2013, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef TLS_H #define TLS_H struct tls_connection; struct tls_random { const u8 *client_random; size_t client_random_...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/crypto/tls.h
C
apache-2.0
20,916
/* * SSL/TLS interface functions for PolarSSL * Copyright (c) 2004-2009, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #include "utils/includes.h" #include "utils/common.h" #include "tls.h" #define DEBUG_LEVEL 0 // For debug:...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/crypto/tls_polarssl.c
C
apache-2.0
31,215
/* * wpa_supplicant/hostapd / common helper functions, etc. * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef COMMON_H #define COMMON_H #include "utils/os.h" #define TO_TEST_WPS 0 #define ETH_ALEN...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/utils/common.h
C
apache-2.0
15,176
#ifndef INCLUDES_H #define INCLUDES_H #define CONFIG_NO_STDOUT_DEBUG #ifndef CONFIG_NO_STDOUT_DEBUG /* Event messages with fixed prefix */ /** Authentication completed successfully and data connection enabled */ #define WPA_EVENT_CONNECTED "CTRL-EVENT-CONNECTED " /** Disconnected, data connection is not available */...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/utils/includes.h
C
apache-2.0
5,336
/* * OS specific functions * Copyright (c) 2005-2009, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef OS_H #define OS_H //#include "basic_types.h" #include <autoconf.h> #include "osdep_service.h" #include "alios/wrapper.h...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/utils/os.h
C
apache-2.0
17,467
/* * OS specific functions * Copyright (c) 2005-2009, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef ROM_WPS_OS_H #define ROM_WPS_OS_H #if defined(CONFIG_PLATFORM_8195A) || defined(CONFIG_PLATFORM_8711B) || defined(CONFI...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/utils/rom/rom_wps_os.h
C
apache-2.0
702
/* * Universally Unique IDentifier (UUID) * Copyright (c) 2008, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef UUID_H #define UUID_H #include <platform/platform_stdlib.h> #define UUID_LEN 16 int uuid_str2bin(const char ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/utils/uuid.h
C
apache-2.0
803
/* * wpa_supplicant/hostapd / Debug prints * Copyright (c) 2002-2007, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef WPA_DEBUG_H #define WPA_DEBUG_H #include "utils/wpabuf.h" /* Debugging function - conditional printf an...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/utils/wpa_debug.h
C
apache-2.0
2,397
/* * Dynamic data buffer * Copyright (c) 2007-2012, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef WPABUF_H #define WPABUF_H /* wpabuf::buf is a pointer to external data */ #define WPABUF_FLAG_EXT_DATA BIT(0) /* * Inte...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/utils/wpabuf.h
C
apache-2.0
4,553
/* * Wi-Fi Protected Setup - message definitions * Copyright (c) 2008, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef WPS_DEFS_H #define WPS_DEFS_H #ifdef CONFIG_WPS2 #define WPS_VERSION 0x20 #else /* CONFIG_WPS2 */ #de...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/src/wps/wps_defs.h
C
apache-2.0
8,546
#if !defined(CONFIG_MBED_ENABLED) #include "main.h" #include <lwip_netconf.h> #include <lwip/netif.h> #endif #include <stdio.h> #include <string.h> #include <stdlib.h> #include <osdep_service.h> #include "utils/os.h" #include "wifi/wifi_conf.h" #include <platform/platform_stdlib.h> #define WLAN0_NAME "wlan0" #ifndef E...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/wpa_supplicant/wifi_eap_config.c
C
apache-2.0
17,248
#include "FreeRTOS.h" #include "task.h" #include "utils/os.h" #include <lwip/netif.h> #include <wifi/wifi_conf.h> #include "wps/wps_defs.h" #if CONFIG_ENABLE_P2P enum p2p_wps_method { WPS_NOT_READY, WPS_PIN_DISPLAY, WPS_PIN_KEYPAD, WPS_PBC }; /*NETMASK*/ #define P2P_NETMASK_ADDR0 255 #define P2P_NETMASK_AD...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/wpa_supplicant/wifi_p2p_config.c
C
apache-2.0
7,146
#include <stdio.h> #include <string.h> #include <stdlib.h> #include "FreeRTOS.h" #include "task.h" #include "main.h" #include "queue.h" #include "utils/os.h" #include <lwip_netconf.h> #include <lwip/netif.h> #include "wifi/wifi_conf.h" #include "wps/wps_defs.h" #include <platform/platform_stdlib.h> #include "wifi_wps_c...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/wpa_supplicant/wifi_wps_config.c
C
apache-2.0
36,636
/** ****************************************************************************** * @file wifi_wps_config.h * @author * @version * @brief This file provides user interfaces for WPS functionality. ****************************************************************************** * @attention * * This...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/rtw_wpa_supplicant/wpa_supplicant/wifi_wps_config.h
C
apache-2.0
3,526
//----------------------------------------------------------------------------// //#include <flash/stm32_flash.h> #if !defined(CONFIG_MBED_ENABLED) && !defined(CONFIG_PLATFOMR_CUSTOMER_RTOS) //#include "main.h" #include <lwip_netconf.h> #include <lwip/sockets.h> #include <dhcp/dhcps.h> #include "lwip/tcpip.h" #endif #i...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_conf.c
C
apache-2.0
102,012
/****************************************************************************** * Copyright (c) 2013-2016 Realtek Semiconductor Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_conf.h
C
apache-2.0
45,818
/****************************************************************************** * * Copyright(c) 2007 - 2021 Realtek Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the License); you may * not use this file except in compliance with the Licen...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_ind.c
C
apache-2.0
8,951
/****************************************************************************** * Copyright (c) 2013-2016 Realtek Semiconductor Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_ind.h
C
apache-2.0
3,829
#if !defined(CONFIG_MBED_ENABLED) && !defined(CONFIG_PLATFOMR_CUSTOMER_RTOS) #include "main.h" #include "lwip/tcpip.h" #endif #include <osdep_service.h> #include "wifi/wifi_conf.h" #include "k_api.h" #ifndef CONFIG_WLAN #define CONFIG_WLAN 1 #endif #if CONFIG_WLAN #include <platform/platform_stdlib.h> extern void _pr...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_promisc.c
C
apache-2.0
12,827
#include <stdio.h> #include <string.h> #include <stdlib.h> #include "FreeRTOS.h" #include "task.h" #include "main.h" #include "udp.h" #include <sockets.h> #include <lwip_netconf.h> #include <osdep_service.h> #include "wifi_simple_config_parser.h" #include "wifi_simple_config.h" #include "wifi_conf.h" #include "wifi_uti...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_simple_config.c
C
apache-2.0
54,925
#ifndef __WIFI_SIMPLE_CONFIG_H #define __WIFI_SIMPLE_CONFIG_H /*****************************wifi_simple_config.h****************************/ enum sc_result { SC_ERROR = -1, /* default error code*/ SC_NO_CONTROLLER_FOUND = 1, /* cannot get sta(controller) in the air which starts a simple config session */ SC_CONTROL...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_simple_config.h
C
apache-2.0
876
#ifndef __SIMPLE_CONFIG_H__ #define __SIMPLE_CONFIG_H__ #ifdef __cplusplus extern "C" { #endif /* This macro means user take simple config * lib to another platform such as linux, and * have no rom crypto libs of simple config, * so we take simple_config_crypto as a sw lib * This macro is used by...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_simple_config_parser.h
C
apache-2.0
3,533
/****************************************************************************** * * Copyright(c) 2007 - 2021 Realtek Corporation. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the License); you may * not use this file except in compliance with the Licen...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_util.c
C
apache-2.0
42,823
/****************************************************************************** * Copyright (c) 2013-2016 Realtek Semiconductor Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * ...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi/wifi_util.h
C
apache-2.0
6,573
#if !defined(CONFIG_PLATFOMR_CUSTOMER_RTOS) #include "FreeRTOS.h" #include "task.h" #include "semphr.h" #include "main.h" #include <lwip_netconf.h> #include "tcpip.h" #include <wlan/wlan_test_inc.h> #include <dhcp/dhcps.h> #endif #include <osdep_service.h> #include <wifi/wifi_conf.h> #include <wifi/wifi_util.h> #inclu...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/api/wifi_interactive_mode.c
C
apache-2.0
35,628
#include <platform_stdlib.h> #include <math.h> #include "rl6548.h" #include "audio_internel.h" #include "osdep_service.h" //#define ENABLE_PA static u8 sp_rx_buf[SP_DMA_PAGE_SIZE * SP_DMA_PAGE_NUM]__attribute__((aligned(32))); static u8 sp_tx_buf[SP_DMA_PAGE_SIZE * SP_DMA_PAGE_NUM]__attribute__((aligned(32))); stati...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/audio/core/audio_internel.c
C
apache-2.0
14,444
#ifndef _AUDIO_RL6548_H #define _AUDIO_RL6548_H #include "ameba_soc.h" #include "rl6548.h" #define SP_DMA_PAGE_SIZE 1600 #define SP_DMA_PAGE_NUM 4 #define SP_FULL_BUF_SIZE 128 #define SP_ZERO_BUF_SIZE 128 #define SET_VOLUME CODEC_SetVolume #define GET_VOLUME CODEC_GetVolume #define VOLUME_MAX (0xAF) #define VOLU...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/audio/core/audio_internel.h
C
apache-2.0
1,718
/** * Copyright (c) 2015, Realsil Semiconductor Corporation. All rights reserved. * */ #ifndef _BOARD_H_ #define _BOARD_H_ #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include "ameba_soc.h" #define platform_debug DBG_8195A #define TRACE_SWITCH_CLOSE //trace_uart //================...
YifuLiu/AliOS-Things
hardware/chip/rtl872xd/sdk/component/common/bluetooth/realtek/sdk/board/amebad/src/bt_board.h
C
apache-2.0
2,513