mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-08 14:43:04 +08:00
Merge pull request #4812 from rtthread-bot/rtt_bot
[update] RT-Thread Robot automatic submission
This commit is contained in:
283 files changed
+41431
-3167
No files matched your search
@@ -19,7 +19,7 @@ CONFIG_RT_USING_OVERFLOW_CHECK=y
|
||||
CONFIG_RT_USING_HOOK=y
|
||||
CONFIG_RT_USING_IDLE_HOOK=y
|
||||
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
|
||||
CONFIG_IDLE_THREAD_STACK_SIZE=256
|
||||
CONFIG_IDLE_THREAD_STACK_SIZE=512
|
||||
# CONFIG_RT_USING_TIMER_SOFT is not set
|
||||
CONFIG_RT_DEBUG=y
|
||||
CONFIG_RT_DEBUG_COLOR=y
|
||||
@@ -114,26 +114,26 @@ CONFIG_RT_PIPE_BUFSZ=512
|
||||
CONFIG_RT_USING_SERIAL=y
|
||||
# CONFIG_RT_SERIAL_USING_DMA is not set
|
||||
CONFIG_RT_SERIAL_RB_BUFSZ=64
|
||||
CONFIG_RT_USING_CAN=y
|
||||
# CONFIG_RT_USING_CAN is not set
|
||||
# CONFIG_RT_CAN_USING_HDR is not set
|
||||
CONFIG_RT_USING_HWTIMER=y
|
||||
# CONFIG_RT_USING_HWTIMER is not set
|
||||
# CONFIG_RT_USING_CPUTIME is not set
|
||||
CONFIG_RT_USING_I2C=y
|
||||
# CONFIG_RT_USING_I2C is not set
|
||||
# CONFIG_RT_I2C_DEBUG is not set
|
||||
CONFIG_RT_USING_I2C_BITOPS=y
|
||||
# CONFIG_RT_USING_I2C_BITOPS is not set
|
||||
# CONFIG_RT_I2C_BITOPS_DEBUG is not set
|
||||
CONFIG_RT_USING_PIN=y
|
||||
CONFIG_RT_USING_ADC=y
|
||||
# CONFIG_RT_USING_ADC is not set
|
||||
# CONFIG_RT_USING_DAC is not set
|
||||
CONFIG_RT_USING_PWM=y
|
||||
# CONFIG_RT_USING_PWM is not set
|
||||
# CONFIG_RT_USING_MTD_NOR is not set
|
||||
# CONFIG_RT_USING_MTD_NAND is not set
|
||||
CONFIG_RT_USING_PM=y
|
||||
CONFIG_RT_USING_RTC=y
|
||||
# CONFIG_RT_USING_PM is not set
|
||||
# CONFIG_RT_USING_RTC is not set
|
||||
# CONFIG_RT_USING_ALARM is not set
|
||||
# CONFIG_RT_USING_SOFT_RTC is not set
|
||||
# CONFIG_RT_USING_SDIO is not set
|
||||
CONFIG_RT_USING_SPI=y
|
||||
# CONFIG_RT_USING_SPI is not set
|
||||
# CONFIG_RT_USING_QSPI is not set
|
||||
# CONFIG_RT_USING_SPI_MSD is not set
|
||||
# CONFIG_RT_USING_SFUD is not set
|
||||
@@ -159,7 +159,8 @@ CONFIG_RT_USING_SPI=y
|
||||
#
|
||||
# CONFIG_RT_USING_LIBC is not set
|
||||
# CONFIG_RT_USING_PTHREADS is not set
|
||||
# CONFIG_RT_LIBC_USING_TIME is not set
|
||||
CONFIG_RT_LIBC_USING_TIME=y
|
||||
CONFIG_RT_LIBC_FIXED_TIMEZONE=8
|
||||
|
||||
#
|
||||
# Network
|
||||
@@ -468,6 +469,8 @@ CONFIG_BSP_USING_GPIO=y
|
||||
# CONFIG_BSP_USING_UART1 is not set
|
||||
CONFIG_BSP_USING_UART2=y
|
||||
# CONFIG_BSP_USING_UART3 is not set
|
||||
# CONFIG_BSP_USING_USART0 is not set
|
||||
# CONFIG_BSP_USING_USART1 is not set
|
||||
|
||||
#
|
||||
# SPI Drivers
|
||||
@@ -484,23 +487,26 @@ CONFIG_BSP_USING_UART2=y
|
||||
#
|
||||
# CAN Drivers
|
||||
#
|
||||
# CONFIG_BSP_USING_CAN is not set
|
||||
# CONFIG_BSP_USING_CAN0 is not set
|
||||
|
||||
#
|
||||
# PWM Drivers
|
||||
#
|
||||
# CONFIG_BSP_USING_PWM0 is not set
|
||||
# CONFIG_BSP_USING_PWM1 is not set
|
||||
# CONFIG_BSP_USING_PWM2 is not set
|
||||
# CONFIG_BSP_USING_PWM3 is not set
|
||||
# CONFIG_BSP_USING_AD16C4T0_PWM is not set
|
||||
# CONFIG_BSP_USING_GP16C4T0_PWM is not set
|
||||
# CONFIG_BSP_USING_GP16C2T0_PWM is not set
|
||||
# CONFIG_BSP_USING_GP16C2T1_PWM is not set
|
||||
|
||||
#
|
||||
# HWtimer Drivers
|
||||
#
|
||||
# CONFIG_BSP_USING_HWTIMER0 is not set
|
||||
# CONFIG_BSP_USING_HWTIMER1 is not set
|
||||
# CONFIG_BSP_USING_HWTIMER2 is not set
|
||||
# CONFIG_BSP_USING_HWTIMER3 is not set
|
||||
# CONFIG_BSP_USING_AD16C4T0_HWTIMER is not set
|
||||
# CONFIG_BSP_USING_GP16C4T0_HWTIMER is not set
|
||||
# CONFIG_BSP_USING_GP16C2T0_HWTIMER is not set
|
||||
# CONFIG_BSP_USING_GP16C2T1_HWTIMER is not set
|
||||
# CONFIG_BSP_USING_BS16T0_HWTIMER is not set
|
||||
# CONFIG_BSP_USING_BS16T2_HWTIMER is not set
|
||||
# CONFIG_BSP_USING_BS16T3_HWTIMER is not set
|
||||
|
||||
#
|
||||
# RTC Drivers
|
||||
@@ -515,7 +521,7 @@ CONFIG_BSP_USING_UART2=y
|
||||
#
|
||||
# ADC Drivers
|
||||
#
|
||||
# CONFIG_BSP_USING_ADC is not set
|
||||
# CONFIG_BSP_USING_ADC0 is not set
|
||||
|
||||
#
|
||||
# Onboard Peripheral Drivers
|
||||
@@ -532,6 +538,7 @@ CONFIG_BSP_USING_UART2=y
|
||||
# CONFIG_BSP_USING_EXAMPLE_ADC_VOL is not set
|
||||
# CONFIG_BSP_USING_EXAMPLE_HWTIMER is not set
|
||||
# CONFIG_BSP_USING_EXAMPLE_I2C is not set
|
||||
# CONFIG_BSP_USING_EXAMPLE_I2C_E2PROM is not set
|
||||
# CONFIG_BSP_USING_EXAMPLE_LED_BLINK is not set
|
||||
# CONFIG_BSP_USING_EXAMPLE_PIN_BEEP is not set
|
||||
# CONFIG_BSP_USING_EXAMPLE_PWM_LED is not set
|
||||
|
||||
@@ -0,0 +1,160 @@
|
||||
menu "UART Drivers"
|
||||
|
||||
config BSP_USING_UART0
|
||||
bool "Register UART0"
|
||||
select RT_USING_SERIAL
|
||||
default n
|
||||
|
||||
config BSP_USING_UART1
|
||||
bool "Register UART1"
|
||||
select RT_USING_SERIAL
|
||||
default n
|
||||
|
||||
config BSP_USING_UART2
|
||||
bool "Register UART2"
|
||||
select RT_USING_SERIAL
|
||||
default y
|
||||
|
||||
config BSP_USING_UART3
|
||||
bool "Register UART3"
|
||||
select RT_USING_SERIAL
|
||||
default n
|
||||
|
||||
config BSP_USING_USART0
|
||||
bool "Register USART0"
|
||||
select RT_USING_SERIAL
|
||||
default n
|
||||
|
||||
config BSP_USING_USART1
|
||||
bool "Register USART1"
|
||||
select RT_USING_SERIAL
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "SPI Drivers"
|
||||
|
||||
config BSP_USING_SPI0
|
||||
bool "Register SPI0"
|
||||
select RT_USING_SPI
|
||||
select RT_USING_PIN
|
||||
default n
|
||||
|
||||
config BSP_USING_SPI1
|
||||
bool "Register SPI1"
|
||||
select RT_USING_SPI
|
||||
select RT_USING_PIN
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "I2C Drivers"
|
||||
config BSP_USING_I2C0
|
||||
bool "Register I2C0"
|
||||
select RT_USING_I2C
|
||||
default n
|
||||
|
||||
config BSP_USING_I2C1
|
||||
bool "Register I2C1"
|
||||
select RT_USING_I2C
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "CAN Drivers"
|
||||
config BSP_USING_CAN0
|
||||
bool "Register CAN0"
|
||||
select RT_USING_CAN
|
||||
select RT_CAN_USING_HDR
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "PWM Drivers"
|
||||
config BSP_USING_AD16C4T0_PWM
|
||||
bool "Register pwm0"
|
||||
select RT_USING_PWM
|
||||
default n
|
||||
|
||||
config BSP_USING_GP16C4T0_PWM
|
||||
bool "Register pwm1"
|
||||
select RT_USING_PWM
|
||||
default n
|
||||
|
||||
config BSP_USING_GP16C2T0_PWM
|
||||
bool "Register pwm2"
|
||||
select RT_USING_PWM
|
||||
default n
|
||||
|
||||
config BSP_USING_GP16C2T1_PWM
|
||||
bool "Register pwm3"
|
||||
select RT_USING_PWM
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "HWtimer Drivers"
|
||||
config BSP_USING_AD16C4T0_HWTIMER
|
||||
bool "Register timer0"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
depends on !BSP_USING_AD16C4T0_PWM
|
||||
|
||||
config BSP_USING_GP16C4T0_HWTIMER
|
||||
bool "Register timer1"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
depends on !BSP_USING_GP16C4T0_PWM
|
||||
|
||||
config BSP_USING_GP16C2T0_HWTIMER
|
||||
bool "Register timer2"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
depends on !BSP_USING_GP16C2T0_PWM
|
||||
|
||||
config BSP_USING_GP16C2T1_HWTIMER
|
||||
bool "Register timer3"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
depends on !BSP_USING_GP16C2T1_PWM
|
||||
|
||||
config BSP_USING_BS16T0_HWTIMER
|
||||
bool "Register timer4"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
|
||||
config BSP_USING_BS16T1_HWTIMER
|
||||
bool "Register timer5"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
depends on !BSP_USING_UART2
|
||||
|
||||
config BSP_USING_BS16T2_HWTIMER
|
||||
bool "Register timer6"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
depends on !BSP_USING_UART3
|
||||
|
||||
config BSP_USING_BS16T3_HWTIMER
|
||||
bool "Register timer7"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "RTC Drivers"
|
||||
config BSP_USING_RTC
|
||||
bool "Register RTC"
|
||||
select RT_USING_RTC
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "PM Drivers"
|
||||
config BSP_USING_PM
|
||||
bool "Using PM"
|
||||
select RT_USING_PM
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "ADC Drivers"
|
||||
config BSP_USING_ADC0
|
||||
bool "Using ADC"
|
||||
select RT_USING_ADC
|
||||
select BSP_USING_ADC
|
||||
default n
|
||||
endmenu
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-04-20 liuhy the first version
|
||||
*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_ADC_H__
|
||||
#define __ES_CONF_INFO_ADC_H__
|
||||
|
||||
#include "es_conf_info_map.h"
|
||||
|
||||
#include <ald_adc.h>
|
||||
|
||||
|
||||
#define ES_C_ADC_CLK_DIV_1 ADC_CKDIV_1
|
||||
#define ES_C_ADC_CLK_DIV_2 ADC_CKDIV_2
|
||||
#define ES_C_ADC_CLK_DIV_4 ADC_CKDIV_4
|
||||
#define ES_C_ADC_CLK_DIV_8 ADC_CKDIV_8
|
||||
#define ES_C_ADC_CLK_DIV_16 ADC_CKDIV_16
|
||||
#define ES_C_ADC_CLK_DIV_32 ADC_CKDIV_32
|
||||
#define ES_C_ADC_CLK_DIV_64 ADC_CKDIV_64
|
||||
#define ES_C_ADC_CLK_DIV_128 ADC_CKDIV_128
|
||||
|
||||
#define ES_C_ADC_ALIGN_RIGHT ADC_DATAALIGN_RIGHT
|
||||
#define ES_C_ADC_ALIGN_LEFT ADC_DATAALIGN_LEFT
|
||||
|
||||
#define ES_C_ADC_CONV_BIT_6 ADC_CONV_BIT_6
|
||||
#define ES_C_ADC_CONV_BIT_8 ADC_CONV_BIT_8
|
||||
#define ES_C_ADC_CONV_BIT_10 ADC_CONV_BIT_10
|
||||
#define ES_C_ADC_CONV_BIT_12 ADC_CONV_BIT_12
|
||||
|
||||
#define ES_C_ADC_SAMPLE_TIME_1 ADC_SAMPLETIME_1
|
||||
#define ES_C_ADC_SAMPLE_TIME_2 ADC_SAMPLETIME_2
|
||||
#define ES_C_ADC_SAMPLE_TIME_4 ADC_SAMPLETIME_4
|
||||
#define ES_C_ADC_SAMPLE_TIME_15 ADC_SAMPLETIME_15
|
||||
|
||||
/* ADC 配置 */
|
||||
|
||||
/* codes_main */
|
||||
|
||||
|
||||
#define ES_ADC0_ALIGN ES_C_ADC_ALIGN_RIGHT
|
||||
#define ES_ADC1_ALIGN ES_C_ADC_ALIGN_RIGHT
|
||||
#define ES_ADC1_DATA_BIT ES_C_ADC_CONV_BIT_12
|
||||
#define ES_ADC0_DATA_BIT ES_C_ADC_CONV_BIT_12
|
||||
|
||||
#ifndef ES_DEVICE_NAME_ADC0
|
||||
#define ES_DEVICE_NAME_ADC0 "adc0"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_ADC1
|
||||
#define ES_DEVICE_NAME_ADC1 "adc1"
|
||||
#endif
|
||||
|
||||
#ifndef ES_ADC0_CLK_DIV
|
||||
#define ES_ADC0_CLK_DIV ES_C_ADC_CLK_DIV_128
|
||||
#endif
|
||||
#ifndef ES_ADC0_ALIGN
|
||||
#define ES_ADC0_ALIGN ES_C_ADC_ALIGN_RIGHT
|
||||
#endif
|
||||
#ifndef ES_ADC0_DATA_BIT
|
||||
#define ES_ADC0_DATA_BIT ES_C_ADC_CONV_BIT_12
|
||||
#endif
|
||||
#ifndef ES_ADC0_NCH_SAMPLETIME
|
||||
#define ES_ADC0_NCH_SAMPLETIME ES_C_ADC_SAMPLE_TIME_4
|
||||
#endif
|
||||
|
||||
#ifndef ES_ADC1_CLK_DIV
|
||||
#define ES_ADC1_CLK_DIV ES_C_ADC_CLK_DIV_128
|
||||
#endif
|
||||
#ifndef ES_ADC1_ALIGN
|
||||
#define ES_ADC1_ALIGN ES_C_ADC_ALIGN_RIGHT
|
||||
#endif
|
||||
#ifndef ES_ADC1_DATA_BIT
|
||||
#define ES_ADC1_DATA_BIT ES_C_ADC_CONV_BIT_12
|
||||
#endif
|
||||
#ifndef ES_ADC1_NCH_SAMPLETIME
|
||||
#define ES_ADC1_NCH_SAMPLETIME ES_C_ADC_SAMPLE_TIME_4
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-04-20 liuhy the first version
|
||||
*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_CAN_H__
|
||||
#define __ES_CONF_INFO_CAN_H__
|
||||
|
||||
#include "es_conf_info_map.h"
|
||||
#include <ald_can.h>
|
||||
#include <ald_gpio.h>
|
||||
|
||||
|
||||
/*默认的CAN硬件过滤器的编号 0 */
|
||||
#define ES_C_CAN_DEFAULT_FILTER_NUMBER 0
|
||||
|
||||
/*硬件过滤器,过滤帧类型*/
|
||||
#define ES_C_CAN_FILTER_FRAME_TYPE 0
|
||||
|
||||
|
||||
#define ES_C_CAN_SJW_NUM_1 CAN_SJW_1
|
||||
#define ES_C_CAN_SJW_NUM_2 CAN_SJW_2
|
||||
#define ES_C_CAN_SJW_NUM_3 CAN_SJW_3
|
||||
#define ES_C_CAN_SJW_NUM_4 CAN_SJW_4
|
||||
|
||||
|
||||
|
||||
/* CAN 配置 */
|
||||
|
||||
/* codes_main */
|
||||
|
||||
|
||||
|
||||
#ifndef ES_DEVICE_NAME_CAN0
|
||||
#define ES_DEVICE_NAME_CAN0 "can0"
|
||||
#endif
|
||||
|
||||
#ifndef ES_CAN0_AUTO_BAN_RE_T
|
||||
#define ES_CAN0_AUTO_BAN_RE_T ES_C_ENABLE
|
||||
#endif
|
||||
#ifndef ES_CAN0_SPEED
|
||||
#define ES_CAN0_SPEED 1000000
|
||||
#endif
|
||||
#ifndef ES_CAN0_SJW
|
||||
#define ES_CAN0_SJW ES_C_CAN_SJW_NUM_4
|
||||
#endif
|
||||
|
||||
#define ES_CAN0_CONFIG \
|
||||
{ \
|
||||
ES_CAN0_SPEED, \
|
||||
RT_CANMSG_BOX_SZ, \
|
||||
RT_CANSND_BOX_NUM, \
|
||||
RT_CAN_MODE_NORMAL, \
|
||||
};
|
||||
#endif
|
||||
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-04-20 liuhy the first version
|
||||
*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_CMU_H__
|
||||
#define __ES_CONF_INFO_CMU_H__
|
||||
|
||||
|
||||
#include <ald_cmu.h>
|
||||
|
||||
|
||||
/* 时钟树 配置 */
|
||||
|
||||
#define ES_C_MUL_9 CMU_PLL1_OUTPUT_36M
|
||||
#define ES_C_MUL_12 CMU_PLL1_OUTPUT_48M
|
||||
|
||||
#define ES_C_DIV_1 CMU_DIV_1
|
||||
#define ES_C_DIV_2 CMU_DIV_2
|
||||
#define ES_C_DIV_4 CMU_DIV_4
|
||||
#define ES_C_DIV_8 CMU_DIV_8
|
||||
#define ES_C_DIV_16 CMU_DIV_16
|
||||
#define ES_C_DIV_32 CMU_DIV_32
|
||||
#define ES_C_DIV_64 CMU_DIV_64
|
||||
#define ES_C_DIV_128 CMU_DIV_128
|
||||
#define ES_C_DIV_256 CMU_DIV_256
|
||||
#define ES_C_DIV_512 CMU_DIV_512
|
||||
#define ES_C_DIV_1024 CMU_DIV_1024
|
||||
#define ES_C_DIV_2048 CMU_DIV_2048
|
||||
#define ES_C_DIV_4096 CMU_DIV_4096
|
||||
|
||||
#define ES_C_HOSC_DIV_1 CMU_PLL1_INPUT_HOSC
|
||||
#define ES_C_HOSC_DIV_2 CMU_PLL1_INPUT_HOSC_2
|
||||
#define ES_C_HOSC_DIV_3 CMU_PLL1_INPUT_HOSC_3
|
||||
#define ES_C_HOSC_DIV_4 CMU_PLL1_INPUT_HOSC_4
|
||||
#define ES_C_HOSC_DIV_5 CMU_PLL1_INPUT_HOSC_5
|
||||
#define ES_C_HOSC_DIV_6 CMU_PLL1_INPUT_HOSC_6
|
||||
#define ES_C_HRC_DIV_6 CMU_PLL1_INPUT_HRC_6
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define ES_PLL1_REFER_CLK ES_C_HOSC_DIV_3
|
||||
#define ES_PLL1_OUT_CLK ES_C_MUL_12
|
||||
#define ES_CMU_PLL1_EN ES_C_ENABLE
|
||||
#define ES_CMU_PLL1_SAFE_EN ES_C_DISABLE
|
||||
#define ES_CMU_LOSC_EN ES_C_ENABLE
|
||||
#define ES_CMU_LRC_EN ES_C_ENABLE
|
||||
#define ES_CMU_HOSC_EN ES_C_ENABLE
|
||||
#define ES_CMU_HRC_EN ES_C_ENABLE
|
||||
#define ES_CMU_SYS_DIV ES_C_DIV_1
|
||||
#define ES_CMU_HCLK_1_DIV ES_C_DIV_1
|
||||
#define ES_CMU_PCLK_1_DIV ES_C_DIV_1
|
||||
#define ES_CMU_PCLK_2_DIV ES_C_DIV_1
|
||||
#define ES_SYS_CLK_SOURSE CMU_CLOCK_PLL1
|
||||
#define ES_PLL_CLK 48000000
|
||||
#define ES_SYS_SOURCE_CLK 48000000
|
||||
#define ES_SYS_CLK 48000000
|
||||
#define ES_PCLK1_CLK 48000000
|
||||
#define ES_PCLK2_CLK 48000000
|
||||
#define ES_HCLK1_CLK 48000000
|
||||
#define ES_CMU_EXTERN_CLK_LOSC 32768
|
||||
#define ES_CMU_EXTERN_CLK_HOSC 12000000
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-04-20 liuhy the first version
|
||||
*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_HWTIMER_H__
|
||||
#define __ES_CONF_INFO_HWTIMER_H__
|
||||
|
||||
#include <ald_cmu.h>
|
||||
#include <ald_timer.h>
|
||||
|
||||
#define ES_C_HWTIMER_MODE_UP HWTIMER_CNTMODE_UP
|
||||
#define ES_C_HWTIMER_MODE_DOWN HWTIMER_CNTMODE_DW
|
||||
|
||||
/* HWTIMER 配置 */
|
||||
|
||||
/* codes_main */
|
||||
|
||||
|
||||
|
||||
#ifndef ES_AD16C4T0_HWTIMER_MODE
|
||||
#define ES_AD16C4T0_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
|
||||
#endif
|
||||
|
||||
#ifndef ES_GP16C4T0_HWTIMER_MODE
|
||||
#define ES_GP16C4T0_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
|
||||
#endif
|
||||
#ifndef ES_GP16C2T0_HWTIMER_MODE
|
||||
#define ES_GP16C2T0_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
|
||||
#endif
|
||||
#ifndef ES_GP1624T1_HWTIMER_MODE
|
||||
#define ES_GP16C2T1_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
|
||||
#endif
|
||||
#ifndef ES_BS16T0_HWTIMER_MODE
|
||||
#define ES_BS16T0_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
|
||||
#endif
|
||||
#ifndef ES_BS16T1_HWTIMER_MODE
|
||||
#define ES_BS16T1_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
|
||||
#endif
|
||||
#ifndef ES_BS16T2_HWTIMER_MODE
|
||||
#define ES_BS16T2_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
|
||||
#endif
|
||||
#ifndef ES_BS16T3_HWTIMER_MODE
|
||||
#define ES_BS16T3_HWTIMER_MODE ES_C_HWTIMER_MODE_UP
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#define ES_AD16C4T0_HWTIMER_PRES 1
|
||||
#define ES_GP16C4T0_HWTIMER_PRES 1
|
||||
#define ES_GP16C2T0_HWTIMER_PRES 1
|
||||
#define ES_GP16C2T1_HWTIMER_PRES 1
|
||||
#define ES_BS16T0_HWTIMER_PRES 1
|
||||
#define ES_BS16T1_HWTIMER_PRES 1
|
||||
#define ES_BS16T2_HWTIMER_PRES 1
|
||||
#define ES_BS16T3_HWTIMER_PRES 1
|
||||
|
||||
#ifndef ES_DEVICE_NAME_AD16C4T0_HWTIMER
|
||||
#define ES_DEVICE_NAME_AD16C4T0_HWTIMER "timer0"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_GP16C4T0_HWTIMER
|
||||
#define ES_DEVICE_NAME_GP16C4T0_HWTIMER "timer1"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_GP16C2T0_HWTIMER
|
||||
#define ES_DEVICE_NAME_GP16C2T0_HWTIMER "timer2"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_GP16C2T1_HWTIMER
|
||||
#define ES_DEVICE_NAME_GP16C2T1_HWTIMER "timer3"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_BS16T0_HWTIMER
|
||||
#define ES_DEVICE_NAME_BS16T0_HWTIMER "timer4"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_BS16T1_HWTIMER
|
||||
#define ES_DEVICE_NAME_BS16T1_HWTIMER "timer5"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_BS16T2_HWTIMER
|
||||
#define ES_DEVICE_NAME_BS16T2_HWTIMER "timer6"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_BS16T3_HWTIMER
|
||||
#define ES_DEVICE_NAME_BS16T3_HWTIMER "timer7"
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-04-20 liuhy the first version
|
||||
*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_I2C_H__
|
||||
#define __ES_CONF_INFO_I2C_H__
|
||||
|
||||
#include "es_conf_info_map.h"
|
||||
#include <ald_i2c.h>
|
||||
#include <ald_gpio.h>
|
||||
#include <rtdbg.h>
|
||||
|
||||
#define ES_C_I2C_STRETCH I2C_NOSTRETCH_DISABLE
|
||||
#define ES_C_I2C_NO_STRETCH I2C_NOSTRETCH_ENABLE
|
||||
|
||||
#define ES_C_I2C_GENERALCALL I2C_GENERALCALL_ENABLE
|
||||
#define ES_C_I2C_NO_GENERALCALL I2C_GENERALCALL_DISABLE
|
||||
|
||||
|
||||
#define ES_C_I2C_ADDR_7_MODE I2C_ADDR_7BIT
|
||||
#define ES_C_I2C_ADDR_10_MODE I2C_ADDR_10BIT
|
||||
|
||||
|
||||
/* I2C 配置 */
|
||||
|
||||
|
||||
|
||||
/* codes_main */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef ES_DEVICE_NAME_I2C0
|
||||
#define ES_DEVICE_NAME_I2C0 "i2c0"
|
||||
#endif
|
||||
|
||||
#ifndef ES_DEVICE_NAME_I2C1
|
||||
#define ES_DEVICE_NAME_I2C1 "i2c1"
|
||||
#endif
|
||||
|
||||
#ifndef ES_I2C0_CLK_SPEED
|
||||
#define ES_I2C0_CLK_SPEED 100000
|
||||
#endif
|
||||
#ifndef ES_I2C0_OWN_ADDR1
|
||||
#define ES_I2C0_OWN_ADDR1 0x20
|
||||
#endif
|
||||
#ifndef ES_I2C0_GENERAL_CALL
|
||||
#define ES_I2C0_GENERAL_CALL ES_C_I2C_NO_GENERALCALL
|
||||
#endif
|
||||
#ifndef ES_I2C0_STRETCH
|
||||
#define ES_I2C0_STRETCH ES_C_I2C_STRETCH
|
||||
#endif
|
||||
#ifndef ES_I2C0_ADDR_MODE
|
||||
#define ES_I2C0_ADDR_MODE ES_C_I2C_ADDR_7_MODE
|
||||
#endif
|
||||
|
||||
#ifndef ES_I2C1_CLK_SPEED
|
||||
#define ES_I2C1_CLK_SPEED 100000
|
||||
#endif
|
||||
#ifndef ES_I2C1_OWN_ADDR1
|
||||
#define ES_I2C1_OWN_ADDR1 0x20
|
||||
#endif
|
||||
#ifndef ES_I2C1_GENERAL_CALL
|
||||
#define ES_I2C1_GENERAL_CALL ES_C_I2C_NO_GENERALCALL
|
||||
#endif
|
||||
#ifndef ES_I2C1_STRETCH
|
||||
#define ES_I2C1_STRETCH ES_C_I2C_STRETCH
|
||||
#endif
|
||||
#ifndef ES_I2C1_ADDR_MODE
|
||||
#define ES_I2C1_ADDR_MODE ES_C_I2C_ADDR_7_MODE
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_PM_H__
|
||||
#define __ES_CONF_INFO_PM_H__
|
||||
|
||||
#include <ald_cmu.h>
|
||||
#include <ald_pmu.h>
|
||||
|
||||
#define ES_PMU_SAVE_LOAD_UART
|
||||
|
||||
/* PM 配置 */
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-04-20 liuhy the first version
|
||||
*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_PWM_H__
|
||||
#define __ES_CONF_INFO_PWM_H__
|
||||
|
||||
#include "es_conf_info_map.h"
|
||||
#include <ald_cmu.h>
|
||||
#include <ald_timer.h>
|
||||
#include <ald_gpio.h>
|
||||
|
||||
|
||||
#define ES_C_PWM_OC_POL_HIGH TIMER_OC_POLARITY_HIGH
|
||||
#define ES_C_PWM_OC_POL_LOW TIMER_OC_POLARITY_LOW
|
||||
|
||||
#define ES_C_PWM_OC_MODE_PWM1 TIMER_OC_MODE_PWM1
|
||||
#define ES_C_PWM_OC_MODE_PWM2 TIMER_OC_MODE_PWM2
|
||||
|
||||
|
||||
|
||||
/* PWM 配置 */
|
||||
|
||||
|
||||
/* codes_main */
|
||||
|
||||
|
||||
|
||||
#define ES_PWM_OC_POLARITY ES_C_PWM_OC_POL_HIGH
|
||||
#define ES_PWM_OC_MODE ES_C_PWM_OC_MODE_PWM1
|
||||
|
||||
#ifndef ES_PWM_OC_POLARITY
|
||||
#define ES_PWM_OC_POLARITY ES_C_PWM_OC_POL_HIGH
|
||||
#endif
|
||||
#ifndef ES_PWM_OC_MODE
|
||||
#define ES_PWM_OC_MODE ES_C_PWM_OC_MODE_PWM2
|
||||
#endif
|
||||
|
||||
#ifndef ES_DEVICE_NAME_AD16C4T0_PWM
|
||||
#define ES_DEVICE_NAME_AD16C4T0_PWM "pwm0"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_GP16C4T0_PWM
|
||||
#define ES_DEVICE_NAME_GP16C4T0_PWM "pwm1"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_GP16C2T0_PWM
|
||||
#define ES_DEVICE_NAME_GP16C2T0_PWM "pwm2"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_GP16C2T1_PWM
|
||||
#define ES_DEVICE_NAME_GP16C2T1_PWM "pwm3"
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_RTC_H__
|
||||
#define __ES_CONF_INFO_RTC_H__
|
||||
|
||||
#include <ald_cmu.h>
|
||||
#include <ald_rtc.h>
|
||||
|
||||
/* RTC 配置 */
|
||||
|
||||
#define ES_C_RTC_SOURCE_LRC RTC_SOURCE_LRC
|
||||
#define ES_C_RTC_SOURCE_LOSC RTC_SOURCE_LOSC
|
||||
|
||||
#define ES_RTC_CLK_SOURCE ES_C_RTC_SOURCE_LOSC
|
||||
|
||||
|
||||
|
||||
|
||||
/* codes_main */
|
||||
|
||||
|
||||
#ifndef ES_DEVICE_NAME_RTC
|
||||
#define ES_DEVICE_NAME_RTC "rtc"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-04-20 liuhy the first version
|
||||
*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_SELECT_H__
|
||||
#define __ES_CONF_INFO_SELECT_H__
|
||||
|
||||
|
||||
#define ES_C_ENABLE 1
|
||||
#define ES_C_DISABLE 0
|
||||
|
||||
|
||||
/* codes_main */
|
||||
//#define ES_USE_ASSERT ES_C_ENABLE
|
||||
|
||||
#ifndef ES_USE_ASSERT
|
||||
#define ES_USE_ASSERT ES_C_DISABLE
|
||||
#endif
|
||||
|
||||
|
||||
#if ES_USE_ASSERT
|
||||
#define USE_ASSERT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-04-20 liuhy the first version
|
||||
*
|
||||
* Copyright (C) 2021 Shanghai Eastsoft Microelectronics Co., Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __ES_CONF_INFO_SPI_H__
|
||||
#define __ES_CONF_INFO_SPI_H__
|
||||
|
||||
#include "es_conf_info_map.h"
|
||||
#include <ald_spi.h>
|
||||
#include <ald_gpio.h>
|
||||
#include <ald_cmu.h>
|
||||
|
||||
/* SPI 配置 */
|
||||
|
||||
#define SPI_BUS_CONFIG(_CONF_,_I_) do{_CONF_.mode = 0U; \
|
||||
_CONF_.mode |= ( ES_SPI##_I_##_MASTER_SLAVE | \
|
||||
ES_SPI##_I_##_WIRE_3_4 | \
|
||||
ES_SPI##_I_##_CPHA_1_2 | \
|
||||
ES_SPI##_I_##_CPOL_H_L | \
|
||||
ES_SPI##_I_##_CS | \
|
||||
ES_SPI##_I_##_M_L_SB ); \
|
||||
_CONF_.data_width = ES_SPI##_I_##_DATA_W; \
|
||||
_CONF_.max_hz = ES_SPI##_I_##_MAX_HZ; \
|
||||
}while(0)
|
||||
|
||||
|
||||
// spi_config.mode &= ~RT_SPI_SLAVE; /* 主机模式 */
|
||||
// spi_config.mode &= ~RT_SPI_3WIRE; /* 4线,双向传输 */
|
||||
// spi_config.mode |= RT_SPI_CPHA; /* 第二边沿采样 */
|
||||
// spi_config.mode |= RT_SPI_CPOL; /* 空闲高电平 */
|
||||
// spi_config.mode |= RT_SPI_NO_CS; /* 禁用软件从机选择管理 */
|
||||
// spi_config.mode |= RT_SPI_MSB; /* 高位在前 */
|
||||
// spi_config.data_width = 8; /* 数据长度:8 */
|
||||
// spi_config.max_hz = 2000000; /* 最快时钟频率 */
|
||||
|
||||
#define ES_C_SPI_CLK_POL_HIGH RT_SPI_CPOL
|
||||
#define ES_C_SPI_CLK_POL_LOW !RT_SPI_CPOL
|
||||
|
||||
#define ES_C_SPI_CLK_PHA_FIRST !RT_SPI_CPHA
|
||||
#define ES_C_SPI_CLK_PHA_SECOND RT_SPI_CPHA
|
||||
|
||||
#define ES_C_SPI_MSB RT_SPI_MSB
|
||||
#define ES_C_SPI_LSB RT_SPI_LSB
|
||||
|
||||
#define ES_C_SPI_CS_LOW_LEVEL 0
|
||||
#define ES_C_SPI_CS_HIGH_LEVEL 1
|
||||
|
||||
/* codes_main */
|
||||
|
||||
|
||||
#ifndef ES_DEVICE_NAME_SPI0_BUS
|
||||
#define ES_DEVICE_NAME_SPI0_BUS "spi0"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_SPI0_DEV0
|
||||
#define ES_DEVICE_NAME_SPI0_DEV0 "spi00"
|
||||
#endif
|
||||
|
||||
#ifndef ES_DEVICE_NAME_SPI1_BUS
|
||||
#define ES_DEVICE_NAME_SPI1_BUS "spi1"
|
||||
#endif
|
||||
#ifndef ES_DEVICE_NAME_SPI1_DEV0
|
||||
#define ES_DEVICE_NAME_SPI1_DEV0 "spi10"
|
||||
#endif
|
||||
|
||||
|
||||
#define ES_SPI_CS_LEVEL ES_C_SPI_CS_LOW_LEVEL
|
||||
|
||||
#ifndef ES_SPI0_CPHA_1_2
|
||||
#define ES_SPI0_CPHA_1_2 ES_C_SPI_CLK_PHA_SECOND
|
||||
#endif
|
||||
#ifndef ES_SPI0_CPOL_H_L
|
||||
#define ES_SPI0_CPOL_H_L ES_C_SPI_CLK_POL_HIGH
|
||||
#endif
|
||||
#ifndef ES_SPI0_M_L_SB
|
||||
#define ES_SPI0_M_L_SB RT_SPI_MSB
|
||||
#endif
|
||||
#ifndef ES_SPI0_MAX_HZ
|
||||
#define ES_SPI0_MAX_HZ 2000000
|
||||
#endif
|
||||
#ifndef ES_SPI0_NSS_PIN
|
||||
#define ES_SPI0_NSS_PIN 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
#ifndef ES_SPI1_CPHA_1_2
|
||||
#define ES_SPI1_CPHA_1_2 ES_C_SPI_CLK_PHA_SECOND
|
||||
#endif
|
||||
#ifndef ES_SPI1_CPOL_H_L
|
||||
#define ES_SPI1_CPOL_H_L ES_C_SPI_CLK_POL_HIGH
|
||||
#endif
|
||||
#ifndef ES_SPI1_M_L_SB
|
||||
#define ES_SPI1_M_L_SB RT_SPI_MSB
|
||||
#endif
|
||||
#ifndef ES_SPI1_MAX_HZ
|
||||
#define ES_SPI1_MAX_HZ 2000000
|
||||
#endif
|
||||
#ifndef ES_SPI1_NSS_PIN
|
||||
#define ES_SPI1_NSS_PIN 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#define ES_SPI0_MASTER_SLAVE !RT_SPI_SLAVE
|
||||
#define ES_SPI0_WIRE_3_4 !RT_SPI_3WIRE
|
||||
#define ES_SPI0_CS RT_SPI_NO_CS
|
||||
#define ES_SPI0_DATA_W 8
|
||||
|
||||
#define ES_SPI1_MASTER_SLAVE !RT_SPI_SLAVE
|
||||
#define ES_SPI1_WIRE_3_4 !RT_SPI_3WIRE
|
||||
#define ES_SPI1_CS RT_SPI_NO_CS
|
||||
#define ES_SPI1_DATA_W 8
|
||||
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -6,129 +6,7 @@ menu "Hardware Drivers Config"
|
||||
select RT_USING_PIN
|
||||
default y
|
||||
|
||||
menu "UART Drivers"
|
||||
config BSP_USING_UART0
|
||||
bool "Enable UART0 PB10/PB11(T/R)"
|
||||
select RT_USING_SERIAL
|
||||
default n
|
||||
|
||||
config BSP_USING_UART1
|
||||
bool "Enable UART1 PC10/PC11(T/R)"
|
||||
select RT_USING_SERIAL
|
||||
default n
|
||||
|
||||
config BSP_USING_UART2
|
||||
bool "Enable UART2 PC12/PD02(T/R)"
|
||||
select RT_USING_SERIAL
|
||||
default y
|
||||
depends on !BSP_USING_HWTIMER1
|
||||
|
||||
config BSP_USING_UART3
|
||||
bool "Enable UART3 PC04/PC05(T/R)"
|
||||
select RT_USING_SERIAL
|
||||
default n
|
||||
depends on !BSP_USING_HWTIMER2
|
||||
endmenu
|
||||
|
||||
menu "SPI Drivers"
|
||||
config BSP_USING_SPI0
|
||||
bool "Enable SPI0 BUS PB03/PB04/PB05(CLK/MISO/MOSI)"
|
||||
select RT_USING_SPI
|
||||
select RT_USING_PIN
|
||||
default n
|
||||
|
||||
config BSP_USING_SPI1
|
||||
bool "Enable SPI1 BUS PB13/PB14/PB15(CLK/MISO/MOSI)"
|
||||
select RT_USING_SPI
|
||||
select RT_USING_PIN
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "I2C Drivers"
|
||||
config BSP_USING_I2C0
|
||||
bool "Enable I2C0 BUS PB08/PB09(SCL/SDA)"
|
||||
select RT_USING_I2C
|
||||
default n
|
||||
|
||||
config BSP_USING_I2C1
|
||||
bool "Enable I2C1 BUS PB10/PB11(SCL/SDA)"
|
||||
select RT_USING_I2C
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "CAN Drivers"
|
||||
config BSP_USING_CAN
|
||||
bool "Enable CAN BUS PA11/PA12(RX/TX)"
|
||||
select RT_USING_CAN
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "PWM Drivers"
|
||||
config BSP_USING_PWM0
|
||||
bool "Using PWM0 PA08/PA09/PA10/PA11"
|
||||
select RT_USING_PWM
|
||||
default n
|
||||
|
||||
config BSP_USING_PWM1
|
||||
bool "Using PWM1 PB06/PB07/PB08/PB09"
|
||||
select RT_USING_PWM
|
||||
default n
|
||||
|
||||
config BSP_USING_PWM2
|
||||
bool "Using PWM2 PA00/PA01"
|
||||
select RT_USING_PWM
|
||||
default n
|
||||
|
||||
config BSP_USING_PWM3
|
||||
bool "Using PWM3 PC06/PC07"
|
||||
select RT_USING_PWM
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "HWtimer Drivers"
|
||||
config BSP_USING_HWTIMER0
|
||||
bool "Using timer0"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
|
||||
config BSP_USING_HWTIMER1
|
||||
bool "Using timer1"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
depends on !BSP_USING_UART2
|
||||
|
||||
config BSP_USING_HWTIMER2
|
||||
bool "Using timer2"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
depends on !BSP_USING_UART3
|
||||
|
||||
config BSP_USING_HWTIMER3
|
||||
bool "Using timer3"
|
||||
select RT_USING_HWTIMER
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "RTC Drivers"
|
||||
config BSP_USING_RTC
|
||||
bool "Using RTC"
|
||||
select RT_USING_RTC
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "PM Drivers"
|
||||
config BSP_USING_PM
|
||||
bool "Using PM"
|
||||
select RT_USING_PM
|
||||
default n
|
||||
endmenu
|
||||
|
||||
menu "ADC Drivers"
|
||||
config BSP_USING_ADC
|
||||
bool "Using ADC"
|
||||
select RT_USING_ADC
|
||||
default n
|
||||
endmenu
|
||||
source "drivers/ES/Kconfig"
|
||||
|
||||
endmenu
|
||||
|
||||
@@ -137,11 +15,21 @@ menu "Hardware Drivers Config"
|
||||
config BSP_USING_SPI_FLASH
|
||||
bool "Enable SPI FLASH (W25Q64 spi0)"
|
||||
select BSP_USING_SPI
|
||||
select BSP_USING_SPI0
|
||||
select RT_USING_SFUD
|
||||
select RT_SFUD_USING_SFDP
|
||||
default n
|
||||
|
||||
if BSP_USING_SPI_FLASH
|
||||
|
||||
config ES_DEVICE_NAME_SPI_DEV
|
||||
string "The name of spi device (registered)"
|
||||
default "spi00"
|
||||
|
||||
config ES_DEVICE_NAME_SPI_FALSH_DEV
|
||||
string "The name of spi flash device"
|
||||
default "W25Q64"
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Offboard Peripheral Drivers"
|
||||
@@ -163,13 +51,17 @@ menu "Hardware Drivers Config"
|
||||
bool "BSP_USING_EXAMPLE_I2C"
|
||||
default n
|
||||
|
||||
config BSP_USING_EXAMPLE_I2C_E2PROM
|
||||
bool "BSP_USING_EXAMPLE_I2C_E2PROM"
|
||||
default n
|
||||
|
||||
config BSP_USING_EXAMPLE_LED_BLINK
|
||||
bool "BSP_USING_EXAMPLE_LED_BLINK"
|
||||
default y
|
||||
default n
|
||||
|
||||
config BSP_USING_EXAMPLE_PIN_BEEP
|
||||
bool "BSP_USING_EXAMPLE_PIN_BEEP"
|
||||
default y
|
||||
default n
|
||||
|
||||
config BSP_USING_EXAMPLE_PWM_LED
|
||||
bool "BSP_USING_EXAMPLE_PWM_LED"
|
||||
@@ -185,7 +77,7 @@ menu "Hardware Drivers Config"
|
||||
|
||||
config BSP_USING_EXAMPLE_UART
|
||||
bool "BSP_USING_EXAMPLE_UART"
|
||||
default y
|
||||
default n
|
||||
|
||||
config BSP_USING_EXAMPLE_CAN
|
||||
bool "BSP_USING_EXAMPLE_CAN"
|
||||
|
||||
@@ -14,7 +14,10 @@ if GetDepend('RT_USING_PIN'):
|
||||
src += ['drv_gpio.c']
|
||||
|
||||
# add serial driver code
|
||||
if GetDepend('BSP_USING_UART0') or GetDepend('BSP_USING_UART1') or GetDepend('BSP_USING_UART2') or GetDepend('BSP_USING_UART3'):
|
||||
if GetDepend('BSP_USING_UART0') or GetDepend('BSP_USING_UART1') or GetDepend('BSP_USING_UART2') or GetDepend('BSP_USING_UART3') or \
|
||||
GetDepend('BSP_USING_UART4') or GetDepend('BSP_USING_UART5') or \
|
||||
GetDepend('BSP_USING_USART0') or GetDepend('BSP_USING_USART1') or GetDepend('BSP_USING_USART2') or GetDepend('BSP_USING_USART3') or \
|
||||
GetDepend('BSP_USING_USART4') or GetDepend('BSP_USING_USART5'):
|
||||
src += ['drv_uart.c']
|
||||
|
||||
# add spi driver code
|
||||
@@ -26,40 +29,50 @@ if GetDepend('BSP_USING_I2C0') or GetDepend('BSP_USING_I2C1'):
|
||||
src += ['drv_i2c.c']
|
||||
|
||||
# add can driver code
|
||||
if GetDepend('BSP_USING_CAN'):
|
||||
if GetDepend('BSP_USING_CAN') or GetDepend('BSP_USING_CAN0') or GetDepend('RT_USING_CAN'):
|
||||
src += ['drv_can.c']
|
||||
|
||||
# add spi flash driver code
|
||||
if GetDepend('BSP_USING_SPI_FLASH'):
|
||||
src += ['drv_spiflash.c']
|
||||
|
||||
# add pwm driver code
|
||||
if GetDepend('BSP_USING_PWM0') or GetDepend('BSP_USING_PWM1') or GetDepend('BSP_USING_PWM2') or GetDepend('BSP_USING_PWM3'):
|
||||
src += ['drv_pwm.c']
|
||||
|
||||
# add hwtimer driver code
|
||||
if GetDepend('BSP_USING_HWTIMER0') or GetDepend('BSP_USING_HWTIMER1') or GetDepend('BSP_USING_HWTIMER2') or GetDepend('BSP_USING_HWTIMER3'):
|
||||
src += ['drv_hwtimer.c']
|
||||
# add adc driver code
|
||||
if GetDepend(['BSP_USING_ADC0']) or GetDepend('BSP_USING_ADC'):
|
||||
src += ['drv_adc.c']
|
||||
|
||||
# add rtc driver code
|
||||
if GetDepend(['BSP_USING_RTC']):
|
||||
src += ['drv_rtc.c']
|
||||
|
||||
# add spi flash driver code
|
||||
if GetDepend('BSP_USING_SPI_FLASH'):
|
||||
src += ['drv_spiflash.c']
|
||||
|
||||
# add hwtimer driver code
|
||||
if GetDepend('BSP_USING_AD16C4T0_HWTIMER') or GetDepend('BSP_USING_AD16C4T1_HWTIMER') or \
|
||||
GetDepend('BSP_USING_GP32C4T0_HWTIMER') or GetDepend('BSP_USING_GP32C4T1_HWTIMER') or \
|
||||
GetDepend('BSP_USING_GP16C4T0_HWTIMER') or GetDepend('BSP_USING_GP16C4T1_HWTIMER') or \
|
||||
GetDepend('BSP_USING_GP16C2T0_HWTIMER') or GetDepend('BSP_USING_GP16C2T1_HWTIMER') or \
|
||||
GetDepend('BSP_USING_GP16C4T0_HWTIMER') or GetDepend('BSP_USING_GP16C4T1_HWTIMER') or \
|
||||
GetDepend('BSP_USING_BS16T0_HWTIMER') or GetDepend('BSP_USING_BS16T1_HWTIMERIMER') or \
|
||||
GetDepend('BSP_USING_BS16T2_HWTIMER') or GetDepend('BSP_USING_BS16T3_HWTIMER'):
|
||||
src += ['drv_hwtimer.c']
|
||||
|
||||
# add pwm driver code
|
||||
if GetDepend('BSP_USING_AD16C4T0_PWM') or GetDepend('BSP_USING_AD16C4T1_PWM') or \
|
||||
GetDepend('BSP_USING_GP16C4T0_PWM') or GetDepend('BSP_USING_GP16C4T1_PWM') or \
|
||||
GetDepend('BSP_USING_GP16C2T0__PWM') or GetDepend('BSP_USING_GP16C2T1_PWM') or \
|
||||
GetDepend('BSP_USING_GP32C4T0_PWM') or GetDepend('BSP_USING_GP32C4T1_PWM') or \
|
||||
GetDepend('BSP_USING_GP16C4T0_PWM') or GetDepend('BSP_USING_GP16C4T1_PWM'):
|
||||
src += ['drv_pwm.c']
|
||||
|
||||
# add pm driver code
|
||||
if GetDepend(['BSP_USING_PM']):
|
||||
src += ['drv_pm.c']
|
||||
|
||||
# add adc driver code
|
||||
if GetDepend(['BSP_USING_ADC']):
|
||||
src += ['drv_adc.c']
|
||||
|
||||
CPPPATH = [cwd]
|
||||
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
|
||||
objs = objs + group
|
||||
|
||||
src = []
|
||||
cwd = GetCurrentDir()
|
||||
include_path = [cwd]
|
||||
include_path = [cwd + '/ES']
|
||||
|
||||
if GetDepend('BSP_USING_EXAMPLE_ADC_VOL'):
|
||||
src += ['bsp_driver_example/adc_vol_sample.c']
|
||||
@@ -70,6 +83,9 @@ if GetDepend('BSP_USING_EXAMPLE_HWTIMER'):
|
||||
if GetDepend('BSP_USING_EXAMPLE_I2C'):
|
||||
src += ['bsp_driver_example/i2c_sample.c']
|
||||
|
||||
if GetDepend('BSP_USING_EXAMPLE_I2C_E2PROM'):
|
||||
src += ['bsp_driver_example/i2c_e2_sample.c']
|
||||
|
||||
if GetDepend('BSP_USING_EXAMPLE_LED_BLINK'):
|
||||
src += ['bsp_driver_example/led_blink_sample.c']
|
||||
|
||||
|
||||
@@ -1,12 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-01-23 wangyq the first version
|
||||
* 2019-11-01 wangyq update libraries
|
||||
* 2019-11-01 wangyq update libraries
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
@@ -14,7 +27,6 @@
|
||||
#include "board.h"
|
||||
#include "drv_uart.h"
|
||||
#include "drv_gpio.h"
|
||||
#include <ald_cmu.h>
|
||||
#include <ald_gpio.h>
|
||||
|
||||
/**
|
||||
@@ -43,11 +55,65 @@ void NVIC_Configuration(void)
|
||||
*******************************************************************************/
|
||||
void SystemClock_Config(void)
|
||||
{
|
||||
/* hosc 12MHz, from hosc/3 pll to 48MHz */
|
||||
ald_cmu_pll1_config(CMU_PLL1_INPUT_HOSC_3, CMU_PLL1_OUTPUT_48M);
|
||||
SYSCFG_UNLOCK();
|
||||
#if ES_CMU_LRC_EN
|
||||
SET_BIT(CMU->CLKENR, CMU_CLKENR_LRCEN_MSK);
|
||||
#else
|
||||
CLEAR_BIT(CMU->CLKENR, CMU_CLKENR_LRCEN_MSK);
|
||||
#endif /*ES_CMU_LRC_EN*/
|
||||
|
||||
#if ES_CMU_LOSC_EN
|
||||
SET_BIT(CMU->CLKENR, CMU_CLKENR_LOSCEN_MSK);
|
||||
#else
|
||||
CLEAR_BIT(CMU->CLKENR, CMU_CLKENR_LOSCEN_MSK);
|
||||
#endif /*ES_CMU_LOSC_EN*/
|
||||
|
||||
#if ES_CMU_HRC_EN
|
||||
SET_BIT(CMU->CLKENR, CMU_CLKENR_HRCEN_MSK);
|
||||
#else
|
||||
CLEAR_BIT(CMU->CLKENR, CMU_CLKENR_HRCEN_MSK);
|
||||
#endif /*ES_CMU_HRC_EN*/
|
||||
|
||||
#if ES_CMU_HOSC_EN
|
||||
SET_BIT(CMU->CLKENR, CMU_CLKENR_HOSCEN_MSK);
|
||||
#else
|
||||
CLEAR_BIT(CMU->CLKENR, CMU_CLKENR_HOSCEN_MSK);
|
||||
#endif /*ES_CMU_HOSC_EN*/
|
||||
|
||||
/* MCLK 48MHz*/
|
||||
ald_cmu_clock_config(CMU_CLOCK_PLL1, 48000000);
|
||||
SYSCFG_LOCK();
|
||||
|
||||
#if ES_CMU_PLL1_EN
|
||||
/*PLL的源必须是4M*/
|
||||
ald_cmu_pll1_config(ES_PLL1_REFER_CLK, ES_PLL1_OUT_CLK);
|
||||
|
||||
#if ES_CMU_PLL1_SAFE_EN
|
||||
ald_cmu_pll_safe_config(ENABLE);
|
||||
#else
|
||||
ald_cmu_pll_safe_config(DISABLE);
|
||||
#endif
|
||||
|
||||
#else
|
||||
CLEAR_BIT(CMU->CLKENR, CMU_CLKENR_PLL1EN_MSK);
|
||||
#endif /*ES_CMU_PLL1_EN*/
|
||||
|
||||
ald_cmu_clock_config(ES_SYS_CLK_SOURSE, ES_SYS_CLK);
|
||||
|
||||
ald_cmu_div_config(CMU_SYS,ES_CMU_SYS_DIV);
|
||||
ald_cmu_div_config(CMU_HCLK_1,ES_CMU_HCLK_1_DIV);
|
||||
ald_cmu_div_config(CMU_PCLK_1,ES_CMU_PCLK_1_DIV);
|
||||
ald_cmu_div_config(CMU_PCLK_2,ES_CMU_PCLK_2_DIV);
|
||||
|
||||
ald_cmu_perh_clock_config(CMU_PERH_ALL, ENABLE);
|
||||
|
||||
/*低功耗时钟使能*/
|
||||
#ifdef RT_USING_PM
|
||||
SYSCFG_UNLOCK();
|
||||
SET_BIT(CMU->LPENR, CMU_LPENR_LRCEN_MSK);
|
||||
SET_BIT(CMU->LPENR, CMU_LPENR_LOSCEN_MSK);
|
||||
SET_BIT(CMU->LPENR, CMU_LPENR_HRCEN_MSK);
|
||||
SET_BIT(CMU->LPENR, CMU_LPENR_HOSCEN_MSK);
|
||||
SYSCFG_LOCK();
|
||||
#endif
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -71,13 +137,22 @@ void SysTick_Handler(void)
|
||||
{
|
||||
/* enter interrupt */
|
||||
rt_interrupt_enter();
|
||||
|
||||
ald_inc_tick();
|
||||
rt_tick_increase();
|
||||
|
||||
/* leave interrupt */
|
||||
rt_interrupt_leave();
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the cmu interrupt service.
|
||||
*
|
||||
*/
|
||||
void CMU_Handler(void)
|
||||
{
|
||||
ald_cmu_irq_handler();
|
||||
}
|
||||
|
||||
/*@}*/
|
||||
/**
|
||||
* This function will initial ES32F0 board.
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-01-23 wangyq the first version
|
||||
* 2019-01-23 wangyq the first version
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
@@ -13,6 +26,7 @@
|
||||
#define __BOARD_H__
|
||||
|
||||
#include <es32f065x.h>
|
||||
#include "es_conf_info_cmu.h"
|
||||
|
||||
#define ES32F0_SRAM_SIZE 0x8000
|
||||
#define ES32F0_SRAM_END (0x20000000 + ES32F0_SRAM_SIZE)
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
|
||||
#ifdef RT_USING_ADC
|
||||
|
||||
#define ADC_DEV_NAME "adc0" /* ADC 设备名称 */
|
||||
#define ADC_DEV_CHANNEL 5 /* PA1 ADC 通道 */
|
||||
#define REFER_VOLTAGE 330 /* 参考电压 3.3V,数据精度乘以100保留2位小数*/
|
||||
@@ -55,3 +58,5 @@ static int adc_vol_sample(int argc, char *argv[])
|
||||
}
|
||||
/* 导出到 msh 命令列表中 */
|
||||
MSH_CMD_EXPORT(adc_vol_sample, adc voltage convert sample);
|
||||
|
||||
#endif
|
||||
@@ -18,7 +18,9 @@
|
||||
#include <rtthread.h>
|
||||
#include "rtdevice.h"
|
||||
|
||||
#define CAN_DEV_NAME "can" /* CAN 设备名称 */
|
||||
#ifdef RT_USING_CAN
|
||||
|
||||
#define CAN_DEV_NAME "can0" /* CAN 设备名称 */
|
||||
|
||||
static struct rt_semaphore rx_sem; /* 用于接收消息的信号量 */
|
||||
static rt_device_t can_dev; /* CAN 设备句柄 */
|
||||
@@ -142,3 +144,5 @@ int can_sample(int argc, char *argv[])
|
||||
}
|
||||
/* 导出到 msh 命令列表中 */
|
||||
MSH_CMD_EXPORT(can_sample, can device sample);
|
||||
|
||||
#endif
|
||||
@@ -17,7 +17,9 @@
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#define HWTIMER_DEV_NAME "timer0" /* 定时器名称 */
|
||||
#ifdef RT_USING_HWTIMER
|
||||
|
||||
#define HWTIMER_DEV_NAME "timer1" /* 定时器名称 */
|
||||
|
||||
/* 定时器超时回调函数 */
|
||||
static rt_err_t timeout_cb(rt_device_t dev, rt_size_t size)
|
||||
@@ -83,3 +85,5 @@ static int hwtimer_sample(int argc, char *argv[])
|
||||
}
|
||||
/* 导出到 msh 命令列表中 */
|
||||
MSH_CMD_EXPORT(hwtimer_sample, hwtimer sample);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2020-12-15 liuhy first implementation.
|
||||
*/
|
||||
/*
|
||||
* 程序清单:这是一个 I2C 设备使用例程
|
||||
* 例程导出了 i2c_e2_sample 命令到控制终端
|
||||
* 命令调用格式:i2c_e2_sample
|
||||
* 命令解释:使用默认的I2C总线设备i2c0
|
||||
* 程序功能:通过 I2C 设备写读e2prom,ST24C04WP。
|
||||
*/
|
||||
|
||||
/*ST24C04WP 有2个Block :Block0 的从机地址为:0x50,Block1 的从机地址为:0x51
|
||||
一个Block有 256字节,一页16字节,写只可在一页内(超过一页的范围后,会回到页的开始),读无页限制*/
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#ifdef RT_USING_I2C
|
||||
|
||||
#define I2C_BUS_NAME "i2c0" /*I2C总线设备名称 */
|
||||
#define SLAVE_ADDR 0x50 /*从机地址*/
|
||||
#define MEM_ADDR 0x00 /*从机的起始储存地址,范围:0x00到0xEF(例程写读范围:2页)*/
|
||||
#define ADDR_LEN 1 /*定义从机储存地址的长度,默认8位,1字节*/
|
||||
#define STR_LEN 16 /*接收发送的页数据长度 ,最大16*/
|
||||
|
||||
static rt_uint8_t mem_addr,rx_buffer[33] = { 0U }; /*读两页,需要32字节,字符串结束'\0'*/
|
||||
/*第一个字节' '用来放 E2PROM 的内存地址,最后一个字节'\0'作为子串的结束,不存入e2prom*/
|
||||
static rt_uint8_t tx_buffer1[STR_LEN + ADDR_LEN + 1] = " e2prom example !\0";
|
||||
static rt_uint8_t tx_buffer2[STR_LEN + ADDR_LEN + 1] = " ABCDEFGH12345678\0";
|
||||
|
||||
static void i2c_e2_sample(int argc, char *argv[])
|
||||
{
|
||||
struct rt_i2c_bus_device *i2c_bus = RT_NULL; /* I2C总线设备句柄 */
|
||||
struct rt_i2c_msg i2c_msg[2]; /* I2C消息 */
|
||||
rt_size_t s_stat;
|
||||
|
||||
i2c_bus = (struct rt_i2c_bus_device *)rt_device_find(I2C_BUS_NAME); /* 通过名字获取I2C总线设备的句柄 */
|
||||
|
||||
if( i2c_bus == RT_NULL)
|
||||
{
|
||||
rt_kprintf("can't find i2c device :%s !\n",I2C_BUS_NAME);
|
||||
return;
|
||||
}
|
||||
|
||||
/*写T24C04WP
|
||||
如果 (MEM_ADDR & 0x0F) + STR_LEN <= 16, 写的范围为:(MEM_ADDR , MEM_ADDR + STR_LEN )
|
||||
(0x10 + MEM_ADDR , 0x10 + MEM_ADDR + STR_LEN )
|
||||
如果 (MEM_ADDR & 0x0F) + STR_LEN > 16, 超出范围的部分会在页内循环写。*/
|
||||
tx_buffer1[0] = MEM_ADDR;
|
||||
|
||||
/*初始化消息*/
|
||||
i2c_msg[0].addr = SLAVE_ADDR; /* 从机地址 */
|
||||
i2c_msg[0].len = ADDR_LEN + STR_LEN ; /* 写入的长度,地址+数据 */
|
||||
i2c_msg[0].buf = tx_buffer1; /* 待写入第一段数据 */
|
||||
i2c_msg[0].flags = RT_I2C_WR; /* I2C写 */
|
||||
s_stat = rt_i2c_transfer(i2c_bus,i2c_msg,1); /* 写入第一段数据 */
|
||||
|
||||
if( s_stat == 1 )rt_kprintf("write successful. \nmessage: %s\n",&tx_buffer1[1]);
|
||||
else rt_kprintf("device %s write fail \n",I2C_BUS_NAME);
|
||||
|
||||
tx_buffer2[0] = MEM_ADDR + 0x10; /*加一页*/
|
||||
i2c_msg[0].buf = tx_buffer2; /* 待写入第二段数据 */
|
||||
s_stat = rt_i2c_transfer(i2c_bus,i2c_msg,1); /* 写入第二段数据 */
|
||||
|
||||
if( s_stat == 1 )rt_kprintf("write successful. \nmessage: %s\n",&tx_buffer2[1]);
|
||||
else rt_kprintf("device %s write fail \n",I2C_BUS_NAME);
|
||||
|
||||
/*读T24C04WP 读2页的数据。读数据需要2条消息:第一条消息:发送读取的地址。
|
||||
第二条消息:读取具体的数据。*/
|
||||
|
||||
mem_addr = MEM_ADDR & 0xF0; /*从页的开始读*/
|
||||
|
||||
i2c_msg[0].len = ADDR_LEN;
|
||||
i2c_msg[0].buf = &mem_addr;
|
||||
|
||||
i2c_msg[1].addr = SLAVE_ADDR; /* 从机地址 */
|
||||
i2c_msg[1].len = 32; /* 读取的数据长度:2*16 */
|
||||
i2c_msg[1].buf = rx_buffer; /* 数据存放地址 */
|
||||
i2c_msg[1].flags = RT_I2C_RD; /* I2C读 */
|
||||
s_stat = rt_i2c_transfer(i2c_bus,i2c_msg,2); /* 读已写的2页 */
|
||||
|
||||
if( s_stat == 2 )rt_kprintf(" read successful \n messege : %s \n",rx_buffer);
|
||||
else
|
||||
rt_kprintf("read fail \n");
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
/* 导出到 msh 命令列表中 */
|
||||
MSH_CMD_EXPORT(i2c_e2_sample, i2c e2prom sample);
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
@@ -11,14 +23,16 @@
|
||||
* 程序清单:这是一个 I2C 设备使用例程
|
||||
* 例程导出了 i2c_io_sample 命令到控制终端
|
||||
* 命令调用格式:i2c_io_sample
|
||||
* 命令解释:使用默认的I2C总线设备
|
||||
* 命令解释:使用默认的I2C总线设备i2c0
|
||||
* 程序功能:通过 I2C 设备接收数据并打印,然后将接收的字符加1输出。
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#define I2C_BUS_NAME "i2c1" /* I2C总线设备名称 */
|
||||
#ifdef RT_USING_I2C
|
||||
|
||||
#define I2C_BUS_NAME "i2c0" /* I2C总线设备名称 */
|
||||
#define SLAVE_ADDR 0x2D /* 从机地址 */
|
||||
#define STR_LEN 16 /* 接收发送的数据长度 */
|
||||
|
||||
@@ -95,3 +109,5 @@ static void i2c_io_sample(int argc, char *argv[])
|
||||
}
|
||||
/* 导出到 msh 命令列表中 */
|
||||
MSH_CMD_EXPORT(i2c_io_sample, i2c io sample);
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
@@ -11,15 +23,18 @@
|
||||
* 程序清单:这是一个 pm睡眠唤醒的使用例程
|
||||
* 例程导出了 pm_sample 命令到控制终端
|
||||
* 命令调用格式:pm_sample
|
||||
* 命令解释:进入不同的睡眠模式,然后用按键唤醒
|
||||
* 命令解释:进入不同的睡眠模式,然后用按键唤醒。
|
||||
* 程序功能:通过串口输出字符串,告知进入睡眠和唤醒睡眠的情况。
|
||||
* 注意:进入睡眠前,如果有中断挂起(SYSTICK、UART、EXTI等),睡眠将被瞬间唤醒。
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
|
||||
#ifdef RT_USING_PM
|
||||
#define PM_NAME "pm" /* 设备名称 */
|
||||
#define WAKE_UP_PIN 18 /* 唤醒源 */
|
||||
#define WAKE_UP_PIN 19 /* 唤醒源 */
|
||||
#define SLEEP_TIMES 12 /* 进入睡眠次数,轮流进入不同的睡眠模式,包括无睡眠模式 */
|
||||
|
||||
|
||||
@@ -65,8 +80,9 @@ void sleep_in_out_callback(rt_uint8_t event, rt_uint8_t mode, void *data)
|
||||
break;
|
||||
/*睡眠唤醒后*/
|
||||
case RT_PM_EXIT_SLEEP: g_pm_data.flag = 0; /*睡眠唤醒后*/
|
||||
/*从深睡眠唤醒后,等待UART时钟未恢复稳定,输出可能丢失*/
|
||||
rt_kprintf("\n\rEXIT\n\r");
|
||||
rt_pm_release(mode); /*释放休眠模式*/
|
||||
rt_pm_request(PM_SLEEP_MODE_NONE); /*进无休眠模式*/
|
||||
return;
|
||||
|
||||
default: break;
|
||||
@@ -125,6 +141,9 @@ static void pm_test(void *parameter)
|
||||
g_pm_data.flag = 2;
|
||||
|
||||
}
|
||||
|
||||
/*彻底释放无休眠模式*/
|
||||
rt_pm_release_all(PM_SLEEP_MODE_NONE);
|
||||
|
||||
/*请求选择的休眠模式*/
|
||||
rt_pm_request(in_mode[i%6]);
|
||||
@@ -137,15 +156,21 @@ static void pm_test(void *parameter)
|
||||
rt_thread_mdelay(500);
|
||||
}
|
||||
|
||||
/*释放选择的休眠模式*/
|
||||
rt_pm_release(in_mode[i%6]);
|
||||
/*释放选择的休眠模式 ,彻底释放*/
|
||||
rt_pm_release_all(in_mode[i%6]);
|
||||
|
||||
i++;
|
||||
|
||||
}
|
||||
/*清除回调函数和私有数据*/
|
||||
|
||||
/*切换为无睡眠模式*/
|
||||
rt_pm_request(PM_SLEEP_MODE_NONE);
|
||||
|
||||
/*清除回调函数和私有数据*/
|
||||
rt_pm_notify_set(RT_NULL,RT_NULL);
|
||||
rt_kprintf("thread pm_test close\n\r");
|
||||
|
||||
rt_kprintf("thread pm_test close\n\r");
|
||||
|
||||
}
|
||||
|
||||
/*按键唤醒的回调函数*/
|
||||
@@ -181,3 +206,5 @@ static int pm_sample(int argc, char *argv[])
|
||||
}
|
||||
/* 导出到 msh 命令列表中 */
|
||||
MSH_CMD_EXPORT(pm_sample, pm sample);
|
||||
|
||||
#endif
|
||||
@@ -17,9 +17,12 @@
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
|
||||
#ifdef RT_USING_PWM
|
||||
|
||||
#define LED_PIN_NUM 16 /* LED PIN脚编号,查看驱动文件drv_gpio.c确定 */
|
||||
#define PWM_DEV_NAME "pwm1" /* PWM设备名称 */
|
||||
#define PWM_DEV_CHANNEL 4 /* PB9 PWM通道 */
|
||||
#define PWM_DEV_CHANNEL 1 /* PA8 PWM通道 */
|
||||
|
||||
struct rt_device_pwm *pwm_dev; /* PWM设备句柄 */
|
||||
|
||||
@@ -70,3 +73,6 @@ static int pwm_led_sample(int argc, char *argv[])
|
||||
}
|
||||
/* 导出到 msh 命令列表中 */
|
||||
MSH_CMD_EXPORT(pwm_led_sample, pwm sample);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#ifdef RT_USING_RTC
|
||||
|
||||
static int rtc_sample(int argc, char *argv[])
|
||||
{
|
||||
rt_err_t ret = RT_EOK;
|
||||
@@ -49,3 +51,5 @@ static int rtc_sample(int argc, char *argv[])
|
||||
}
|
||||
/* 导出到 msh 命令列表中 */
|
||||
MSH_CMD_EXPORT(rtc_sample, rtc sample);
|
||||
|
||||
#endif
|
||||
@@ -1,7 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
@@ -17,13 +29,14 @@
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#ifdef RT_USING_SPI
|
||||
|
||||
#define SPI_DEVICE_NAME "spi00"
|
||||
#define BUF_LEN 16
|
||||
|
||||
static void spi_io_sample(int argc, char *argv[])
|
||||
{
|
||||
struct rt_spi_device * spi_dev; /* spi设备的句柄 */
|
||||
struct rt_spi_configuration spi_config;
|
||||
rt_uint8_t i,buffer[BUF_LEN] = { 0U };
|
||||
rt_err_t s_stat;
|
||||
rt_err_t result;
|
||||
@@ -37,23 +50,8 @@ static void spi_io_sample(int argc, char *argv[])
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* 清空配置结构体 */
|
||||
rt_memset(&spi_config,0,sizeof(struct rt_spi_configuration));
|
||||
|
||||
spi_config.mode &= ~RT_SPI_SLAVE; /* 主机模式 */
|
||||
spi_config.mode &= ~RT_SPI_3WIRE; /* 4线,双向传输 */
|
||||
spi_config.mode |= RT_SPI_CPHA; /* 第二边沿采样 */
|
||||
spi_config.mode |= RT_SPI_CPOL; /* 空闲高电平 */
|
||||
spi_config.mode |= RT_SPI_NO_CS; /* 禁用软件从机选择管理 */
|
||||
spi_config.mode |= RT_SPI_MSB; /* 高位在前 */
|
||||
|
||||
spi_config.data_width = 8; /* 数据长度:8 */
|
||||
|
||||
spi_config.max_hz = 2000000; /* 最快时钟频率 */
|
||||
|
||||
/* 配置SPI设备 */
|
||||
s_stat = rt_spi_configure(spi_dev,&spi_config);
|
||||
s_stat = rt_spi_configure(spi_dev,&(spi_dev->config));
|
||||
|
||||
if(s_stat != RT_EOK)
|
||||
{
|
||||
@@ -150,3 +148,5 @@ static void spi_io_sample(int argc, char *argv[])
|
||||
}
|
||||
/* 导出到 msh 命令列表中 */
|
||||
MSH_CMD_EXPORT(spi_io_sample, spi sample);
|
||||
|
||||
#endif
|
||||
@@ -1,12 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-04-03 wangyq the first version
|
||||
* 2019-11-01 wangyq update libraries
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
@@ -59,77 +72,69 @@ static adc_channel_t es32f0_adc_get_channel(rt_uint32_t channel)
|
||||
{
|
||||
case 0:
|
||||
es32f0_channel = ADC_CHANNEL_0;
|
||||
ald_gpio_init(GPIOC, GPIO_PIN_0, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH0_GPIO, ES_GPIO_ADC_CH0_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 1:
|
||||
es32f0_channel = ADC_CHANNEL_1;
|
||||
ald_gpio_init(GPIOC, GPIO_PIN_1, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH1_GPIO, ES_GPIO_ADC_CH1_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 2:
|
||||
es32f0_channel = ADC_CHANNEL_2;
|
||||
ald_gpio_init(GPIOC, GPIO_PIN_2, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH2_GPIO, ES_GPIO_ADC_CH2_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 3:
|
||||
es32f0_channel = ADC_CHANNEL_3;
|
||||
ald_gpio_init(GPIOC, GPIO_PIN_3, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH3_GPIO, ES_GPIO_ADC_CH3_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 4:
|
||||
es32f0_channel = ADC_CHANNEL_4;
|
||||
ald_gpio_init(GPIOA, GPIO_PIN_0, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH4_GPIO, ES_GPIO_ADC_CH4_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 5:
|
||||
es32f0_channel = ADC_CHANNEL_5;
|
||||
ald_gpio_init(GPIOA, GPIO_PIN_1, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH5_GPIO, ES_GPIO_ADC_CH5_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 6:
|
||||
es32f0_channel = ADC_CHANNEL_6;
|
||||
ald_gpio_init(GPIOA, GPIO_PIN_2, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH6_GPIO, ES_GPIO_ADC_CH6_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 7:
|
||||
es32f0_channel = ADC_CHANNEL_7;
|
||||
ald_gpio_init(GPIOA, GPIO_PIN_3, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH7_GPIO, ES_GPIO_ADC_CH7_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 8:
|
||||
es32f0_channel = ADC_CHANNEL_8;
|
||||
ald_gpio_init(GPIOA, GPIO_PIN_4, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH8_GPIO, ES_GPIO_ADC_CH8_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 9:
|
||||
es32f0_channel = ADC_CHANNEL_9;
|
||||
ald_gpio_init(GPIOA, GPIO_PIN_5, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH9_GPIO, ES_GPIO_ADC_CH9_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 10:
|
||||
es32f0_channel = ADC_CHANNEL_10;
|
||||
ald_gpio_init(GPIOA, GPIO_PIN_6, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH10_GPIO, ES_GPIO_ADC_CH10_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 11:
|
||||
es32f0_channel = ADC_CHANNEL_11;
|
||||
ald_gpio_init(GPIOA, GPIO_PIN_7, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH11_GPIO, ES_GPIO_ADC_CH11_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 12:
|
||||
es32f0_channel = ADC_CHANNEL_12;
|
||||
ald_gpio_init(GPIOC, GPIO_PIN_4, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH12_GPIO, ES_GPIO_ADC_CH12_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 13:
|
||||
es32f0_channel = ADC_CHANNEL_13;
|
||||
ald_gpio_init(GPIOC, GPIO_PIN_5, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH13_GPIO, ES_GPIO_ADC_CH13_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 14:
|
||||
es32f0_channel = ADC_CHANNEL_14;
|
||||
ald_gpio_init(GPIOB, GPIO_PIN_0, &gpio_initstruct);
|
||||
ald_gpio_init(ES_GPIO_ADC_CH14_GPIO, ES_GPIO_ADC_CH14_PIN, &gpio_initstruct);
|
||||
break;
|
||||
case 15:
|
||||
es32f0_channel = ADC_CHANNEL_15;
|
||||
ald_gpio_init(GPIOB, GPIO_PIN_1, &gpio_initstruct);
|
||||
break;
|
||||
case 16:
|
||||
es32f0_channel = ADC_CHANNEL_16;
|
||||
break;
|
||||
case 17:
|
||||
es32f0_channel = ADC_CHANNEL_17;
|
||||
break;
|
||||
case 18:
|
||||
es32f0_channel = ADC_CHANNEL_18;
|
||||
ald_gpio_init(ES_GPIO_ADC_CH15_GPIO, ES_GPIO_ADC_CH15_PIN, &gpio_initstruct);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -148,6 +153,9 @@ static rt_err_t es32f0_get_adc_value(struct rt_adc_device *device, rt_uint32_t c
|
||||
/* config adc channel */
|
||||
nm_config.ch = es32f0_adc_get_channel(channel);
|
||||
nm_config.idx = ADC_NCH_IDX_1;
|
||||
|
||||
/*aaabbbccc*/
|
||||
nm_config.samp = ES_ADC0_NCH_SAMPLETIME;
|
||||
nm_config.samp = ADC_SAMPLETIME_4;
|
||||
ald_adc_normal_channel_config(_hadc, &nm_config);
|
||||
|
||||
@@ -168,24 +176,34 @@ static const struct rt_adc_ops es32f0_adc_ops =
|
||||
int rt_hw_adc_init(void)
|
||||
{
|
||||
int result = RT_EOK;
|
||||
|
||||
adc_handle_t _h_adc;
|
||||
|
||||
_h_adc.init.scan = DISABLE;
|
||||
_h_adc.init.cont = DISABLE;
|
||||
_h_adc.init.disc = ADC_ALL_DISABLE;
|
||||
_h_adc.init.disc_nr = ADC_DISC_NR_1;
|
||||
_h_adc.init.nche_sel = ADC_NCHESEL_MODE_ALL;
|
||||
_h_adc.init.n_ref = ADC_NEG_REF_VSS;
|
||||
_h_adc.init.p_ref = ADC_POS_REF_VDD;
|
||||
_h_adc.init.nch_nr = ADC_NCH_NR_16;
|
||||
|
||||
#ifdef BSP_USING_ADC0
|
||||
|
||||
static adc_handle_t _h_adc0;
|
||||
|
||||
/* adc function initialization */
|
||||
|
||||
_h_adc0.init = _h_adc.init;
|
||||
|
||||
_h_adc0.perh = ADC0;
|
||||
_h_adc0.init.align = ADC_DATAALIGN_RIGHT;
|
||||
_h_adc0.init.scan = DISABLE;
|
||||
_h_adc0.init.cont = DISABLE;
|
||||
_h_adc0.init.disc = ADC_ALL_DISABLE;
|
||||
_h_adc0.init.disc_nr = ADC_DISC_NR_1;
|
||||
_h_adc0.init.data_bit = ADC_CONV_BIT_12;
|
||||
_h_adc0.init.div = ADC_CKDIV_128;
|
||||
_h_adc0.init.nche_sel = ADC_NCHESEL_MODE_ALL;
|
||||
_h_adc0.init.n_ref = ADC_NEG_REF_VSS;
|
||||
_h_adc0.init.p_ref = ADC_POS_REF_VDD;
|
||||
_h_adc0.init.align = ES_ADC0_ALIGN;
|
||||
_h_adc0.init.data_bit = ES_ADC0_DATA_BIT;
|
||||
_h_adc0.init.div = ES_ADC0_CLK_DIV;
|
||||
ald_adc_init(&_h_adc0);
|
||||
|
||||
rt_hw_adc_register(&_device_adc0, "adc0", &es32f0_adc_ops, &_h_adc0);
|
||||
|
||||
|
||||
result = rt_hw_adc_register(&_device_adc0, ES_DEVICE_NAME_ADC0, &es32f0_adc_ops, &_h_adc0);
|
||||
|
||||
#endif /*BSP_USING_ADC0*/
|
||||
|
||||
return result;
|
||||
}
|
||||
INIT_BOARD_EXPORT(rt_hw_adc_init);
|
||||
|
||||
@@ -3,14 +3,29 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-04-03 wangyq the first version
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#ifndef DRV_ADC_H__
|
||||
#define DRV_ADC_H__
|
||||
|
||||
#include "es_conf_info_adc.h"
|
||||
|
||||
int rt_hw_adc_init(void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,9 +3,22 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-11-09 wangyq the first version
|
||||
* 2019-11-09 wangyq the first version
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#ifndef DRV_CAN_H__
|
||||
@@ -14,16 +27,9 @@
|
||||
#include <board.h>
|
||||
#include <rtdevice.h>
|
||||
#include <rtthread.h>
|
||||
#include "es_conf_info_can.h"
|
||||
|
||||
#include <ald_can.h>
|
||||
#include <ald_gpio.h>
|
||||
|
||||
struct es32f0_baud_rate_tab
|
||||
{
|
||||
rt_uint32_t baud_rate;
|
||||
rt_uint32_t config_data;
|
||||
};
|
||||
|
||||
#ifdef RT_USING_CAN
|
||||
/* es32f0 can device */
|
||||
struct es32f0_can
|
||||
{
|
||||
@@ -34,4 +40,5 @@ struct es32f0_can
|
||||
|
||||
int rt_hw_can_init(void);
|
||||
|
||||
#endif
|
||||
#endif /*DRV_CAN_H__ */
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,14 +3,29 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-01-23 wangyq the first version
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#ifndef DRV_GPIO_H__
|
||||
#define DRV_GPIO_H__
|
||||
|
||||
#include "es_conf_info_gpio.h"
|
||||
|
||||
int rt_hw_pin_init(void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,14 +3,28 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-3-19 wangyq the first version
|
||||
* 2019-3-19 wangyq the first version
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#ifndef DRV_HWTIMER_H__
|
||||
#define DRV_HWTIMER_H__
|
||||
|
||||
#include "es_conf_info_hwtimer.h"
|
||||
int rt_hw_hwtimer_init(void);
|
||||
|
||||
#endif
|
||||
@@ -1,8 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-01-24 wangyq the first version
|
||||
@@ -10,19 +21,24 @@
|
||||
* 2020-12-15 liuhy update libraries
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
#include <rtdbg.h>
|
||||
#include "board.h"
|
||||
#include "drv_i2c.h"
|
||||
#include <ald_i2c.h>
|
||||
#include <ald_gpio.h>
|
||||
|
||||
|
||||
#ifdef RT_USING_I2C
|
||||
|
||||
#define TIMEOUT 0x0FFF
|
||||
/* I2C struct definition */
|
||||
static i2c_handle_t _h_i2c0, _h_i2c1;
|
||||
#ifdef BSP_USING_I2C0
|
||||
static i2c_handle_t _h_i2c0;
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_I2C1
|
||||
static i2c_handle_t _h_i2c1;
|
||||
#endif
|
||||
|
||||
static void _i2c_init(void)
|
||||
{
|
||||
@@ -38,35 +54,55 @@ static void _i2c_init(void)
|
||||
gpio_instruct.func = GPIO_FUNC_5;
|
||||
|
||||
#ifdef BSP_USING_I2C0
|
||||
|
||||
#if defined(ES_I2C0_SCL_GPIO_FUNC)&&defined(ES_I2C0_SCL_GPIO_PORT)&&defined(ES_I2C0_SCL_GPIO_PIN)
|
||||
gpio_instruct.func = ES_I2C0_SCL_GPIO_FUNC;
|
||||
ald_gpio_init(ES_I2C0_SCL_GPIO_PORT, ES_I2C0_SCL_GPIO_PIN, &gpio_instruct);
|
||||
#endif
|
||||
|
||||
#if defined(ES_I2C0_SDA_GPIO_FUNC)&&defined(ES_I2C0_SDA_GPIO_PORT)&&defined(ES_I2C0_SDA_GPIO_PIN)
|
||||
gpio_instruct.func = ES_I2C0_SDA_GPIO_FUNC;
|
||||
ald_gpio_init(ES_I2C0_SDA_GPIO_PORT, ES_I2C0_SDA_GPIO_PIN, &gpio_instruct);
|
||||
#endif
|
||||
|
||||
/* Initialize I2C Function */
|
||||
_h_i2c0.perh = I2C0;
|
||||
_h_i2c0.init.clk_speed = 100000;
|
||||
_h_i2c0.init.duty = I2C_DUTYCYCLE_2;
|
||||
_h_i2c0.init.own_addr1 = 0x0A;
|
||||
_h_i2c0.init.addr_mode = I2C_ADDR_7BIT;
|
||||
_h_i2c0.init.general_call = I2C_GENERALCALL_DISABLE;
|
||||
_h_i2c0.init.no_stretch = I2C_NOSTRETCH_ENABLE;
|
||||
_h_i2c0.init.clk_speed = ES_I2C0_CLK_SPEED;
|
||||
_h_i2c0.init.own_addr1 = ES_I2C0_OWN_ADDR1;
|
||||
_h_i2c0.init.addr_mode = ES_I2C0_ADDR_MODE;
|
||||
_h_i2c0.init.general_call = ES_I2C0_GENERAL_CALL;
|
||||
_h_i2c0.init.no_stretch = ES_I2C0_STRETCH;
|
||||
|
||||
ald_i2c_reset(&_h_i2c0);
|
||||
ald_i2c_init(&_h_i2c0);
|
||||
/* I2C0_SCL->PB8, I2C0_SDA->PB9 */
|
||||
ald_gpio_init(GPIOB, GPIO_PIN_8 | GPIO_PIN_9, &gpio_instruct);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_I2C1
|
||||
|
||||
#if defined(ES_I2C1_SDA_GPIO_FUNC)&&defined(ES_I2C1_SDA_GPIO_PORT)&&defined(ES_I2C1_SDA_GPIO_PIN)
|
||||
gpio_instruct.func = ES_I2C1_SDA_GPIO_FUNC;
|
||||
ald_gpio_init(ES_I2C1_SDA_GPIO_PORT, ES_I2C1_SDA_GPIO_PIN, &gpio_instruct);
|
||||
#endif
|
||||
|
||||
#if defined(ES_I2C1_SDA_GPIO_FUNC)&&defined(ES_I2C1_SDA_GPIO_PORT)&&defined(ES_I2C1_SDA_GPIO_PIN)
|
||||
gpio_instruct.func = ES_I2C1_SDA_GPIO_FUNC;
|
||||
ald_gpio_init(ES_I2C1_SDA_GPIO_PORT, ES_I2C1_SDA_GPIO_PIN, &gpio_instruct);
|
||||
#endif
|
||||
|
||||
/* Initialize i2c function */
|
||||
_h_i2c1.perh = I2C1;
|
||||
_h_i2c1.init.clk_speed = 100000;
|
||||
_h_i2c1.init.duty = I2C_DUTYCYCLE_2;
|
||||
_h_i2c1.init.own_addr1 = 0xA0;
|
||||
_h_i2c1.init.addr_mode = I2C_ADDR_7BIT;
|
||||
_h_i2c1.init.general_call = I2C_GENERALCALL_DISABLE;
|
||||
_h_i2c1.init.no_stretch = I2C_NOSTRETCH_ENABLE;
|
||||
|
||||
_h_i2c1.init.duty = I2C_DUTYCYCLE_2;
|
||||
_h_i2c1.init.clk_speed = ES_I2C1_CLK_SPEED;
|
||||
_h_i2c1.init.own_addr1 = ES_I2C1_OWN_ADDR1;
|
||||
_h_i2c1.init.addr_mode = ES_I2C1_ADDR_MODE;
|
||||
_h_i2c1.init.general_call = ES_I2C1_GENERAL_CALL;
|
||||
_h_i2c1.init.no_stretch = ES_I2C1_STRETCH;
|
||||
|
||||
ald_i2c_reset(&_h_i2c1);
|
||||
ald_i2c_init(&_h_i2c1);
|
||||
/* I2C1_SCL->PB10, I2C1_SDA->PB11 */
|
||||
ald_gpio_init(GPIOB, GPIO_PIN_10 | GPIO_PIN_11, &gpio_instruct);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -116,6 +152,8 @@ const struct rt_i2c_bus_device_ops es32f0_i2c_ops =
|
||||
|
||||
int rt_hw_i2c_init(void)
|
||||
{
|
||||
int result = RT_EOK;
|
||||
|
||||
_i2c_init();
|
||||
|
||||
#ifdef BSP_USING_I2C0
|
||||
@@ -124,16 +162,25 @@ int rt_hw_i2c_init(void)
|
||||
rt_memset((void *)&_i2c_device0, 0, sizeof(struct rt_i2c_bus_device));
|
||||
_i2c_device0.ops = &es32f0_i2c_ops;
|
||||
_i2c_device0.priv = &_h_i2c0;
|
||||
rt_i2c_bus_device_register(&_i2c_device0, "i2c0");
|
||||
result = rt_i2c_bus_device_register(&_i2c_device0, ES_DEVICE_NAME_I2C0);
|
||||
if (result != RT_EOK)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BSP_USING_I2C1
|
||||
/* define i2c Instance */
|
||||
static struct rt_i2c_bus_device _i2c_device1;
|
||||
rt_memset((void *)&_i2c_device1, 0, sizeof(struct rt_i2c_bus_device));
|
||||
|
||||
_i2c_device1.ops = &es32f0_i2c_ops;
|
||||
_i2c_device1.priv = &_h_i2c1;
|
||||
rt_i2c_bus_device_register(&_i2c_device1, "i2c1");
|
||||
rt_i2c_bus_device_register(&_i2c_device1, ES_DEVICE_NAME_I2C1);
|
||||
if (result != RT_EOK)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
return RT_EOK;
|
||||
|
||||
@@ -1,16 +1,31 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-01-24 wangyq the first version
|
||||
* 2019-01-24 wangyq the first version
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#ifndef DRV_I2C_H__
|
||||
#define DRV_I2C_H__
|
||||
|
||||
#include "es_conf_info_i2c.h"
|
||||
|
||||
int rt_hw_i2c_init(void);
|
||||
|
||||
#endif
|
||||
@@ -3,20 +3,30 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-04-08 wangyq the first version
|
||||
* 2019-11-01 wangyq adapt to the new power management interface
|
||||
* 2020-12-15 liuhy the first version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <board.h>
|
||||
#include <rtdevice.h>
|
||||
#include <ald_cmu.h>
|
||||
#include <ald_pmu.h>
|
||||
#include "drv_pm.h"
|
||||
|
||||
#ifdef RT_USING_PM
|
||||
|
||||
|
||||
static void uart_console_reconfig(void)
|
||||
{
|
||||
struct serial_configure config = RT_SERIAL_CONFIG_DEFAULT;
|
||||
@@ -24,26 +34,14 @@ static void uart_console_reconfig(void)
|
||||
rt_device_control(rt_console_get_device(), RT_DEVICE_CTRL_CONFIG, &config);
|
||||
}
|
||||
|
||||
static void delay(void)
|
||||
{
|
||||
long i;
|
||||
rt_base_t level;
|
||||
|
||||
level = rt_hw_interrupt_disable();
|
||||
i = 0;
|
||||
do{
|
||||
i++;
|
||||
}
|
||||
while (i < 10000);
|
||||
|
||||
rt_hw_interrupt_enable(level);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will put ES32F033x into sleep mode.
|
||||
* This function will put ES32F065x into sleep mode.
|
||||
*
|
||||
* @param pm pointer to power manage structure
|
||||
*/
|
||||
|
||||
|
||||
/* 注意:进入睡眠前,如果有中断挂起(SYSTICK、PENDSV、UART、EXTI等),睡眠将被瞬间唤醒。*/
|
||||
static void sleep(struct rt_pm *pm, uint8_t mode)
|
||||
{
|
||||
switch (mode)
|
||||
@@ -52,31 +50,26 @@ static void sleep(struct rt_pm *pm, uint8_t mode)
|
||||
break;
|
||||
|
||||
case PM_SLEEP_MODE_IDLE:
|
||||
//__WFI();
|
||||
break;
|
||||
|
||||
case PM_SLEEP_MODE_LIGHT:
|
||||
/* Enter SLEEP Mode, Main regulator is ON */
|
||||
ald_pmu_stop1_enter();
|
||||
delay();
|
||||
break;
|
||||
|
||||
case PM_SLEEP_MODE_DEEP:
|
||||
/* Enter STOP 2 mode */
|
||||
case PM_SLEEP_MODE_DEEP:
|
||||
/* Enter STOP 2 mode */
|
||||
ald_pmu_stop2_enter();
|
||||
delay();
|
||||
break;
|
||||
|
||||
case PM_SLEEP_MODE_STANDBY:
|
||||
/* Enter STANDBY mode */
|
||||
/* Enter STANDBY mode */
|
||||
ald_pmu_stop2_enter();
|
||||
delay();
|
||||
break;
|
||||
|
||||
case PM_SLEEP_MODE_SHUTDOWN:
|
||||
/* Enter SHUTDOWNN mode */
|
||||
/* Enter SHUTDOWNN mode */
|
||||
ald_pmu_stop2_enter();
|
||||
delay();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -3,7 +3,20 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
|
||||
* Date Author Notes
|
||||
* 2019-04-01 wangyq the first version
|
||||
*/
|
||||
@@ -11,6 +24,12 @@
|
||||
#ifndef DRV_PM_H__
|
||||
#define DRV_PM_H__
|
||||
|
||||
#include <rthw.h>
|
||||
#include <board.h>
|
||||
#include <rtdevice.h>
|
||||
#include "es_conf_info_pm.h"
|
||||
#include <string.h>
|
||||
|
||||
int rt_hw_pm_init(void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,6 +3,18 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-03-11 wangyq the first version
|
||||
|
||||
@@ -3,26 +3,38 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-03-22 wangyq the first version
|
||||
* 2019-11-01 wangyq update libraries
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
#include <rtdevice.h>
|
||||
#include <sys/time.h>
|
||||
#include <string.h>
|
||||
#include "board.h"
|
||||
#include "drv_rtc.h"
|
||||
#include <ald_cmu.h>
|
||||
#include <ald_rtc.h>
|
||||
#include "drv_rtc.h"
|
||||
|
||||
#ifdef RT_USING_RTC
|
||||
|
||||
static void __rtc_init(rtc_init_t *init)
|
||||
{
|
||||
|
||||
assert_param(IS_RTC_HOUR_FORMAT(init->hour_format));
|
||||
assert_param(IS_RTC_OUTPUT_SEL(init->output));
|
||||
assert_param(IS_RTC_OUTPUT_POLARITY(init->output_polarity));
|
||||
@@ -117,10 +129,16 @@ int rt_hw_rtc_init(void)
|
||||
rt_err_t ret = RT_EOK;
|
||||
static struct rt_device rtc_dev;
|
||||
rtc_init_t rtc_initstruct;
|
||||
|
||||
/* enable clk */
|
||||
ald_rtc_source_select(ES_RTC_CLK_SOURCE);
|
||||
|
||||
/* enable external 32.768kHz */
|
||||
CMU_LOSC_ENABLE();
|
||||
ald_cmu_losc_safe_config(ENABLE);
|
||||
if(ES_RTC_CLK_SOURCE == ES_C_RTC_SOURCE_LOSC)
|
||||
{
|
||||
CMU_LOSC_ENABLE();
|
||||
ald_cmu_losc_safe_config(ENABLE);
|
||||
}
|
||||
|
||||
/* set default time */
|
||||
RTC_UNLOCK();
|
||||
WRITE_REG(RTC->TIME, 0x134251);
|
||||
@@ -131,6 +149,8 @@ int rt_hw_rtc_init(void)
|
||||
rtc_initstruct.asynch_pre_div = 0;
|
||||
rtc_initstruct.synch_pre_div = 32767;
|
||||
rtc_initstruct.output = RTC_OUTPUT_DISABLE;
|
||||
rtc_initstruct.output_polarity = RTC_OUTPUT_POLARITY_HIGH;
|
||||
|
||||
__rtc_init(&rtc_initstruct);
|
||||
|
||||
rtc_dev.type = RT_Device_Class_RTC;
|
||||
@@ -150,7 +170,7 @@ int rt_hw_rtc_init(void)
|
||||
|
||||
rtc_dev.user_data = RTC;
|
||||
|
||||
ret = rt_device_register(&rtc_dev, "rtc", RT_DEVICE_FLAG_RDWR);
|
||||
ret = rt_device_register(&rtc_dev, ES_DEVICE_NAME_RTC, RT_DEVICE_FLAG_RDWR);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3,14 +3,28 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-03-22 wangyq the first version
|
||||
* 2019-03-22 wangyq the first version
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#ifndef DRV_RTC_H__
|
||||
#define DRV_RTC_H__
|
||||
|
||||
#include "es_conf_info_rtc.h"
|
||||
int rt_hw_rtc_init(void);
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,9 +3,22 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-01-24 wangyq the first version
|
||||
* 2019-01-24 wangyq the first version
|
||||
* 2021-04-20 liuhy the second version
|
||||
*/
|
||||
|
||||
#ifndef DRV_SPI_H__
|
||||
@@ -14,6 +27,8 @@
|
||||
#include <rtthread.h>
|
||||
#include <rthw.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#include "es_conf_info_spi.h"
|
||||
|
||||
struct es32f0_hw_spi_cs
|
||||
{
|
||||
|
||||
@@ -9,18 +9,20 @@
|
||||
* 2019-11-01 wangyq update libraries
|
||||
*/
|
||||
|
||||
#include "board.h"
|
||||
#include <rtthread.h>
|
||||
|
||||
#if defined(BSP_USING_SPI_FLASH)
|
||||
|
||||
#include "spi_flash.h"
|
||||
#include "drv_spiflash.h"
|
||||
#include "spi_flash_sfud.h"
|
||||
#include "drv_spi.h"
|
||||
|
||||
#if defined(BSP_USING_SPI_FLASH)
|
||||
int rt_hw_spi_flash_init(void)
|
||||
{
|
||||
es32f0_spi_device_attach(50, "spi0", "spi00");
|
||||
|
||||
if (RT_NULL == rt_sfud_flash_probe("W25Q64", "spi00"))
|
||||
|
||||
if (RT_NULL == rt_sfud_flash_probe(ES_DEVICE_NAME_SPI_FALSH_DEV, ES_DEVICE_NAME_SPI_DEV))
|
||||
{
|
||||
return -RT_ERROR;
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -3,6 +3,18 @@
|
||||
*
|
||||
* 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2019-01-23 wangyq the first version
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -9,6 +9,20 @@
|
||||
* @note
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,6 +10,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,6 +10,20 @@
|
||||
* @note
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,6 +10,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,6 +12,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,6 +10,20 @@
|
||||
* @note
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
@@ -22,6 +36,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include "es_conf_info_select.h"
|
||||
|
||||
|
||||
#if defined (__CC_ARM)
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -24,6 +24,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -14,6 +14,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
* @verbatim
|
||||
==============================================================================
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
* @verbatim
|
||||
==============================================================================
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -12,6 +12,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
* @verbatim
|
||||
==============================================================================
|
||||
|
||||
@@ -10,6 +10,20 @@
|
||||
* @note
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "ald_flash.h"
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*
|
||||
*********************************************************************************
|
||||
|
||||
@@ -16,6 +16,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
* @verbatim
|
||||
==============================================================================
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
@verbatim
|
||||
==============================================================================
|
||||
##### How to use this driver #####
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -11,6 +11,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,6 +18,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
********************************************************************************
|
||||
* @verbatim
|
||||
==============================================================================
|
||||
|
||||
@@ -16,6 +16,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
* @verbatim
|
||||
==============================================================================
|
||||
|
||||
@@ -17,6 +17,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
@verbatim
|
||||
==============================================================================
|
||||
|
||||
@@ -12,6 +12,20 @@
|
||||
*
|
||||
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. 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 License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
Loaded 100 of 283 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user