[bsp][essemi] fix bugs. (#5585)

* [bsp][essemi] update es32f36xx libraries.
* [bsp][essemi] add led_pin control.
This commit is contained in:
liuhy-2020
2022-02-08 09:13:05 +08:00
committed by GitHub
parent 4192f0d651
commit a23aadd631
81 changed files with 950 additions and 616 deletions

View File

@@ -12,7 +12,11 @@
#include <rtdevice.h>
#include "drv_gpio.h"
#ifdef ES_RTT_APP_LED_PIN
#define LED_PIN ES_RTT_APP_LED_PIN
#else
#define LED_PIN GET_PIN( C , 8 )
#endif
int main(void)
{

View File

@@ -2687,5 +2687,6 @@ static const struct pin_index pins[] =
#define ES_RTT_APP_LED_PIN ES_PIN_GPIO_C_8
#endif

View File

@@ -12,7 +12,11 @@
#include <rtdevice.h>
#include "drv_gpio.h"
#ifdef ES_RTT_APP_LED_PIN
#define LED_PIN ES_RTT_APP_LED_PIN
#else
#define LED_PIN GET_PIN( F , 0 )
#endif
int main(void)
{

View File

@@ -2999,5 +2999,6 @@ static const struct pin_index pins[] =
#define ES_RTT_APP_LED_PIN ES_PIN_GPIO_F_0
#endif

View File

@@ -12,7 +12,11 @@
#include <rtdevice.h>
#include "drv_gpio.h"
#ifdef ES_RTT_APP_LED_PIN
#define LED_PIN ES_RTT_APP_LED_PIN
#else
#define LED_PIN GET_PIN( F , 0 )
#endif
int main(void)
{

View File

@@ -2904,5 +2904,6 @@ static const struct pin_index pins[] =
/* GP16C2T_CH2N */
#define ES_RTT_APP_LED_PIN ES_PIN_GPIO_F_0
#endif

View File

@@ -8,6 +8,9 @@
* @date 18 Dec 2018
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 18 Dec 2018 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ES32F36XX_H__

View File

@@ -1,12 +1,14 @@
/**
******************************************************************************
* @file startup_es32f36xx.s
* @author AE Team
* @brief ES32F36xx devices vector table for GCC toolchain.
* This module performs:
* - Set the initial SP
* - Set the initial PC == Reset_Handler,
* - Set the vector table entries with the exceptions ISR address
* - Set the vector table entries with the exceptions ISR addres
s
* - Branches to main in the C library (which eventually
* calls main()).
* After Reset the Cortex-M3 processor is in Thread mode,
@@ -16,7 +18,8 @@
* Date Author Notes
* 23 Jan 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserve
d.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -31,7 +34,8 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**********************************************************************************
******************************************************************************
****
*/
.syntax unified
@@ -138,9 +142,10 @@ LoopFillZerobss:
bl sys_config
bl adc_config
bl __libc_init_array
/*bl __libc_init_array
bl main
bl main */
bl entry
LoopForever:
b LoopForever

View File

@@ -8,10 +8,26 @@
* @date 24 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 24 Dec 2019 AE Team The first version
*
* 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 "utils.h"

View File

@@ -8,6 +8,9 @@
* @date 26 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 26 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_ACMP_H__

View File

@@ -6,9 +6,12 @@
* @version V1.0
* @date 28 Jun 2019
* @author AE Team
* @note
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* @note
* Change Logs:
* Date Author Notes
* 28 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -23,8 +26,7 @@
* 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 __ALD_ADC_H__
@@ -320,7 +322,7 @@ typedef struct {
type_func_t scan; /**< Choose scan mode enable or not */
type_func_t cont; /**< Choose continuous mode enable or not */
adc_nch_nr_t nch_nr; /**< Length of normal ranks will be converted */
adc_ich_nr_t ich_nr; /**< Length of insert ranks will be converted */
adc_ich_nr_t ich_nr; /**< Length of insert ranks will be converted */
adc_disc_mode_t disc; /**< Discontinuous mode enable or not */
adc_disc_nr_t disc_nr; /**< Number of discontinuous conversions channel */
adc_conv_bit_t data_bit; /**< The precision of conversion */
@@ -368,10 +370,10 @@ typedef struct {
typedef struct adc_handle_s {
ADC_TypeDef *perh; /**< Register base address */
adc_init_t init; /**< ADC required parameters */
#ifdef ALD_DMA
dma_handle_t hdma; /**< Pointer DMA Handler */
pis_handle_t hpis; /**< Pointer PIS Handler for connect adc and dma */
#endif
lock_state_t lock; /**< ADC locking object */
adc_state_t state; /**< ADC communication state */
adc_error_t error_code; /**< ADC Error code */
@@ -405,7 +407,7 @@ typedef struct {
timer_handle_t h_timer; /**< Handle of TIMER module */
adc_handle_t h_adc; /**< Handle of ADC module */
adc_nch_conf_t config; /**< Struct for chanel configure */
adc_ich_conf_t i_config; /**< Struct for insert channel configure */
adc_ich_conf_t i_config;/**< Struct for insert channel configuration */
} adc_timer_config_t;
/**
* @}

View File

@@ -8,6 +8,9 @@
* @date 15 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 15 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_BKPC_H__

View File

@@ -8,6 +8,9 @@
* @date 26 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 26 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_CALC_H__

View File

@@ -7,6 +7,9 @@
* @date 16 Apr 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 16 Apr 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -23,8 +26,7 @@
* 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 __ALD_CAN_H

View File

@@ -8,6 +8,9 @@
* @date 22 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 22 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_CMU_H__

View File

@@ -1,78 +1,231 @@
/**
*********************************************************************************
*
* @file ald_conf.h
* @brief Enable/Disable the peripheral module.
*
* @version V1.0
* @date 01 Jul 2019
* @author AE Team
* @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.
*
*********************************************************************************
*/
/**********************************************************************************
*
* @file ald_conf.h
* @brief Enable/Disable the peripheral module.
*
* @date 30 Apri 2021
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 30 Apri 2021 yanght the first version
*
* 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.
*
**********************************************************************************
*/
#ifndef __ALD_CONF_H__
#define __ALD_CONF_H__
#define ALD_DMA
#define ALD_GPIO
#define ALD_UART
#define ALD_LPUART
#define ALD_I2C
#define ALD_CMU
#define ALD_RMU
#define ALD_PMU
#define ALD_WDT
#define ALD_LCD
#define ALD_RTC
#define ALD_CAN
#define ALD_FLASH
/* Exported Macros ----------------------------------------------------------- */
#define ALD_ACMP
#define ALD_ADC
#define ALD_BKPC
#define ALD_CALC
#define ALD_CAN
#define ALD_CMU
#define ALD_CRC
#define ALD_CRYPT
#define ALD_TIMER
#define ALD_LPTIM
#define ALD_DAC
#define ALD_DBGC
#define ALD_DMA
#define ALD_EBI
#define ALD_FLASH
#define ALD_GPIO
#define ALD_I2C
#define ALD_I2S
#define ALD_IAP
#define ALD_NAND
#define ALD_NOR
#define ALD_PIS
#define ALD_PMU
#define ALD_QSPI
#define ALD_RMU
#define ALD_RTC
#define ALD_SPI
#define ALD_CALC
#define ALD_ACMP
#define ALD_OPAMP
#define ALD_SRAM
#define ALD_SYSCFG
#define ALD_TIMER
#define ALD_TRNG
#define ALD_TSENSE
#define ALD_BKPC
#define ALD_DAC
#define ALD_IAP
#define ALD_I2S
#define ALD_ECC
#define ALD_NAND
#define ALD_QSPI
#define ALD_NOR
#define ALD_SRAM
#define ALD_UART
#define ALD_USB
#define ALD_WDT
#define TYPE_H
#define UTILS
/* Includes ------------------------------------------------------------------ */
#ifdef ALD_ACMP
#include "ald_acmp.h"
#endif /* ALD_ACMP */
#ifdef ALD_ADC
#include "ald_adc.h"
#endif /* ALD_ADC */
#ifdef ALD_BKPC
#include "ald_bkpc.h"
#endif /* ALD_BKPC */
#ifdef ALD_CALC
#include "ald_calc.h"
#endif /* ALD_CALC */
#ifdef ALD_CAN
#include "ald_can.h"
#endif /* ALD_CAN */
#ifdef ALD_CMU
#include "ald_cmu.h"
#endif /* ALD_CMU */
#ifdef ALD_CRC
#include "ald_crc.h"
#endif /* ALD_CRC */
#ifdef ALD_CRYPT
#include "ald_crypt.h"
#endif /* ALD_CRYPT */
#ifdef ALD_DAC
#include "ald_dac.h"
#endif /* ALD_DAC */
#ifdef ALD_DBGC
#include "ald_dbgc.h"
#endif /* ALD_DBGC */
#ifdef ALD_DMA
#include "ald_dma.h"
#endif /* ALD_DMA */
#ifdef ALD_EBI
#include "ald_ebi.h"
#endif /* ALD_EBI */
#ifdef ALD_FLASH
#include "ald_flash.h"
#endif /* ALD_FLASH */
#ifdef ALD_GPIO
#include "ald_gpio.h"
#endif /* ALD_GPIO */
#ifdef ALD_I2C
#include "ald_i2c.h"
#endif /* ALD_I2C */
#ifdef ALD_I2S
#include "ald_i2s.h"
#endif /* ALD_I2S */
#ifdef ALD_IAP
#include "ald_iap.h"
#endif /* ALD_IAP */
#ifdef ALD_NAND
#include "ald_nand.h"
#endif /* ALD_NAND */
#ifdef ALD_NOR
#include "ald_nor_lcd.h"
#endif /* ALD_NOR */
#ifdef ALD_PIS
#include "ald_pis.h"
#endif /* ALD_PIS */
#ifdef ALD_PMU
#include "ald_pmu.h"
#endif /* ALD_PMU */
#ifdef ALD_QSPI
#include "ald_qspi.h"
#endif /* ALD_QSPI */
#ifdef ALD_RMU
#include "ald_rmu.h"
#endif /* ALD_RMU */
#ifdef ALD_RTC
#include "ald_rtc.h"
#endif /* ALD_RTC */
#ifdef ALD_RTC
#include "ald_rtchw.h"
#endif /* ALD_RTC */
#ifdef ALD_SPI
#include "ald_spi.h"
#endif /* ALD_SPI */
#ifdef ALD_SRAM
#include "ald_sram.h"
#endif /* ALD_SRAM */
#ifdef ALD_SYSCFG
#include "ald_syscfg.h"
#endif /* ALD_SYSCFG */
#ifdef ALD_TIMER
#include "ald_timer.h"
#endif /* ALD_TIMER */
#ifdef ALD_TRNG
#include "ald_trng.h"
#endif /* ALD_TRNG */
#ifdef ALD_TSENSE
#include "ald_tsense.h"
#endif /* ALD_TSENSE */
#ifdef ALD_UART
#include "ald_uart.h"
#endif /* ALD_UART */
#ifdef ALD_USB
#include "ald_usb.h"
#endif /* ALD_USB */
#ifdef ALD_WDT
#include "ald_wdt.h"
#endif /* ALD_WDT */
#ifdef TYPE_H
#include "type.h"
#endif /* TYPE_H */
#ifdef UTILS
#include "utils.h"
#endif /* UTILS */
#if defined(ALD_NAND) || defined(ALD_NOR) || defined(ALD_SRAM)
#define ALD_EBI
#endif
#define ALD_EBI
#endif /*ALD_EBI*/
#define TICK_INT_PRIORITY 3
#define TICK_INT_PRIORITY 3
#endif
/* Exported Types ------------------------------------------------------------ */
/* Exported Variables -------------------------------------------------------- */
/* Exported Constants -------------------------------------------------------- */
/* Exported Functions -------------------------------------------------------- */
#endif /*__ALD_CONF_H__*/
/************* (C) COPYRIGHT Eastsoft Microelectronics *****END OF FILE****/

View File

@@ -8,6 +8,9 @@
* @date 18 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 18 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_CRC_H__
@@ -108,9 +110,9 @@ typedef struct crc_handle_s {
crc_init_t init; /**< CRC required parameters */
uint8_t *cal_buf; /**< The pointer of preparing buffer */
uint32_t *cal_res; /**< The pointer of result */
#ifdef ALD_DMA
dma_handle_t hdma; /**< CRC DMA handle parameters */
#endif
lock_state_t lock; /**< Locking object */
crc_state_t state; /**< CRC operation state */
@@ -169,7 +171,7 @@ uint32_t ald_crc_calculate_word(crc_handle_t *hperh, uint32_t *buf, uint32_t siz
* @}
*/
#ifdef ALD_DMA
/** @addtogroup CRC_Public_Functions_Group3
* @{
*/
@@ -182,7 +184,7 @@ ald_status_t ald_crc_dma_stop(crc_handle_t *hperh);
/**
* @}
*/
#endif
/** @addtogroup CRC_Public_Functions_Group4
* @{
*/

View File

@@ -8,8 +8,11 @@
* @date 19 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 19 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -24,8 +27,7 @@
* 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 __ALD_CRYPT_H__
@@ -36,7 +38,6 @@
#endif
#include "utils.h"
#include "ald_dma.h"
/** @addtogroup ES32FXXX_ALD
* @{
@@ -184,10 +185,10 @@ typedef struct {
typedef struct crypt_handle_s {
CRYPT_TypeDef *perh; /**< Register base address */
crypt_init_t init; /**< CRYPT required parameters */
#ifdef ALD_DMA
dma_handle_t hdma_m2p; /**< CRYPT DMA handle parameters memory to crypt module */
dma_handle_t hdma_p2m; /**< CRYPT DMA handle parameters crypt module to memory */
#endif
uint8_t *plain_text; /**< Pointer to plain text */
uint8_t *cipher_text; /**< Pointer to cipher text */
uint32_t size; /**< The size of crypt data buf */
@@ -279,12 +280,12 @@ extern ald_status_t ald_crypt_decrypt(crypt_handle_t *hperh, uint8_t * cipher_te
extern ald_status_t ald_crypt_gcm_verify(crypt_handle_t *hperh, uint8_t *cipher_text, uint32_t size, uint8_t *aadata, uint32_t alen, uint8_t *tag);
extern ald_status_t ald_crypt_encrypt_by_it(crypt_handle_t *hperh, uint8_t *plain_text, uint8_t *cipher_text, uint32_t size);
extern ald_status_t ald_crypt_decrypt_by_it(crypt_handle_t *hperh, uint8_t *cipher_text, uint8_t *plain_text, uint32_t size);
#ifdef ALD_DMA
extern ald_status_t ald_crypt_encrypt_by_dma(crypt_handle_t *hperh, uint8_t * plain_text,
uint8_t *cipher_text, uint32_t size, uint8_t channel_m2p, uint8_t channel_p2m);
extern ald_status_t ald_crypt_decrypt_by_dma(crypt_handle_t *hperh, uint8_t * cipher_text,
uint8_t *plain_text, uint32_t size, uint8_t channel_m2p, uint8_t channel_p2m);
#endif
/**
* @}
*/
@@ -292,11 +293,11 @@ extern ald_status_t ald_crypt_decrypt_by_dma(crypt_handle_t *hperh, uint8_t * ci
/** @addtogroup CRYPT_Public_Functions_Group3
* @{
*/
#ifdef ALD_DMA
extern ald_status_t ald_crypt_dma_pause(crypt_handle_t *hperh);
extern ald_status_t ald_crypt_dma_resume(crypt_handle_t *hperh);
extern ald_status_t ald_crypt_dma_stop(crypt_handle_t *hperh);
#endif
extern void ald_crypt_irq_handler(crypt_handle_t *hperh);
/**
* @}

View File

@@ -6,9 +6,12 @@
* @version V1.0
* @date 28 Jun 2019
* @author AE Team
* @note
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* @note
* Change Logs:
* Date Author Notes
* 28 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -23,8 +26,7 @@
* 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 __ALD_DAC_H__
@@ -35,8 +37,6 @@
#endif
#include "utils.h"
#include "ald_dma.h"
#include "ald_pis.h"
/** @addtogroup ES32FXXX_ALD
* @{

View File

@@ -8,6 +8,9 @@
* @date 04 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 04 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,9 +27,7 @@
* 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 __ALD_DBGC_H__

View File

@@ -8,6 +8,9 @@
* @date 09 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 09 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_DMA_H__

View File

@@ -8,6 +8,9 @@
* @date 20 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 20 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*********************************************************************************
**********************************************************************************
*/

View File

@@ -8,6 +8,9 @@
* @date 17 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 17 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_FLASH_H__

View File

@@ -8,8 +8,11 @@
* @date 07 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 07 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -24,8 +27,7 @@
* 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 __ALD_GPIO_H__

View File

@@ -7,9 +7,12 @@
* @version V1.0
* @date 15 Nov 2019
* @author AE Team
* @note
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* @note
* Change Logs:
* Date Author Notes
* 30 Jun 2020 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -24,8 +27,7 @@
* 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 __ALD_I2C_H__
@@ -286,10 +288,10 @@ typedef struct i2c_handle_s {
uint8_t *p_buff; /**< Pointer to I2C transfer buffer */
uint16_t xfer_size; /**< I2C transfer size */
__IO uint16_t xfer_count; /**< I2C transfer counter */
#ifdef ALD_DMA
dma_handle_t hdmatx; /**< I2C Tx DMA handle parameters */
dma_handle_t hdmarx; /**< I2C Rx DMA handle parameters */
#endif
lock_state_t lock; /**< I2C locking object */
__IO i2c_state_t state; /**< I2C communication state */
__IO i2c_mode_t mode; /**< I2C communication mode */
@@ -410,7 +412,7 @@ ald_status_t ald_i2c_mem_write_by_it(i2c_handle_t *hperh, uint16_t dev_addr, uin
ald_status_t ald_i2c_mem_read_by_it(i2c_handle_t *hperh, uint16_t dev_addr, uint16_t mem_addr,
i2c_addr_size_t add_size, uint8_t *buf, uint32_t size);
#ifdef ALD_DMA
/** Non-Blocking mode: DMA */
ald_status_t ald_i2c_master_send_by_dma(i2c_handle_t *hperh, uint16_t dev_addr,
uint8_t *buf, uint8_t size, uint8_t channel);
@@ -422,7 +424,7 @@ ald_status_t ald_i2c_mem_write_by_dma(i2c_handle_t *hperh, uint16_t dev_addr, ui
uint8_t *buf, uint8_t size, uint8_t channel);
ald_status_t ald_i2c_mem_read_by_dma(i2c_handle_t *hperh, uint16_t dev_addr, uint16_t mem_addr,
i2c_addr_size_t add_size, uint8_t *buf, uint8_t size, uint8_t channel);
#endif
/**
* @}
*/

View File

@@ -8,6 +8,9 @@
* @date 13 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 13 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_I2S_H__
@@ -226,10 +228,10 @@ typedef struct i2s_handle_s {
uint16_t *rx_buf; /**< Pointer to I2S Rx transfer buffer */
uint32_t rx_size; /**< I2S Rx Transfer size */
uint32_t rx_count; /**< I2S Rx Transfer Counter */
#ifdef ALD_DMA
dma_handle_t hdmatx; /**< I2S DMA handle parameters */
dma_handle_t hdmarx; /**< I2S DMA handle parameters */
#endif
lock_state_t lock; /**< Locking object */
i2s_state_t state; /**< I2S communication state */
uint8_t side; /**< I2S channel side */
@@ -337,13 +339,13 @@ ald_status_t ald_i2s_master_send(i2s_handle_t *hperh, uint16_t *buf, uint32_t si
ald_status_t ald_i2s_master_recv(i2s_handle_t *hperh, uint16_t *buf, uint32_t size, uint32_t timeout);
ald_status_t ald_i2s_master_send_by_it(i2s_handle_t *hperh, uint16_t *buf, uint32_t size);
ald_status_t ald_i2s_master_recv_by_it(i2s_handle_t *hperh, uint16_t *buf, uint32_t size);
#ifdef ALD_DMA
ald_status_t ald_i2s_master_send_by_dma(i2s_handle_t *hperh, uint16_t *buf, uint32_t size, uint8_t channel);
ald_status_t ald_i2s_master_recv_by_dma(i2s_handle_t *hperh, uint16_t *buf, uint32_t size, uint8_t dma_ch, uint8_t _dma_ch);
ald_status_t ald_i2s_dma_pause(i2s_handle_t *hperh);
ald_status_t ald_i2s_dma_resume(i2s_handle_t *hperh);
ald_status_t ald_i2s_dma_stop(i2s_handle_t *hperh);
#endif
/**
* @}
*/

View File

@@ -8,6 +8,9 @@
* @date 04 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 04 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_IAP_H__

View File

@@ -8,6 +8,9 @@
* @date 07 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 07 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_NAND_H_

View File

@@ -8,6 +8,9 @@
* @date 07 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 07 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_NOR_LCD_H_

View File

@@ -8,6 +8,9 @@
* @date 27 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 27 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_PIS_H__

View File

@@ -8,6 +8,9 @@
* @date 04 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 04 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_PMU_H__

View File

@@ -4,9 +4,12 @@
* @version V1.0
* @date 09 Nov 2019
* @author AE Team
* @note
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* @note
* Change Logs:
* Date Author Notes
* 09 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -21,8 +24,7 @@
* 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 __ALD_QSPI_H_
@@ -276,9 +278,9 @@ typedef struct {
uint8_t *rx_buf; /**< Pointer to QSPI receive buffer */
uint16_t rx_size; /**< QSPI receive size */
uint16_t rx_cnt; /**< QSPI receive counter */
#ifdef ALD_DMA
dma_handle_t hdma; /**< QSPI Rx/Tx DMA Handle parameters*/
#endif
qspi_state_t state; /**< QSPI communication state */
__IO lock_state_t lock; /**< Locking object*/
} qspi_handle_t;

View File

@@ -8,8 +8,11 @@
* @date 04 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 04 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -24,8 +27,7 @@
* 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 __ALD_RMU_H__

View File

@@ -7,6 +7,9 @@
* @date 16 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 16 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -23,8 +26,7 @@
* 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 __ALD_RTC_H__

View File

@@ -7,6 +7,9 @@
* @date 16 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 16 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -23,8 +26,7 @@
* 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 __ALD_RTCHW_H__
@@ -35,7 +37,6 @@ extern "C" {
#endif
#include "utils.h"
#include "ald_rtc.h"
/** @addtogroup ES32FXXX_ALD

View File

@@ -8,6 +8,9 @@
* @date 13 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 13 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_SPI_H__
@@ -248,10 +250,10 @@ typedef struct spi_handle_s {
uint8_t *rx_buf; /**< Pointer to SPI Rx transfer buffer */
uint16_t rx_size; /**< SPI Rx Transfer size */
uint16_t rx_count; /**< SPI Rx Transfer Counter */
#ifdef ALD_DMA
dma_handle_t hdmatx; /**< SPI Tx DMA handle parameters */
dma_handle_t hdmarx; /**< SPI Rx DMA handle parameters */
#endif
lock_state_t lock; /**< Locking object */
spi_state_t state; /**< SPI communication state */
uint32_t err_code; /**< SPI error code */
@@ -400,14 +402,14 @@ ald_status_t ald_spi_send_recv(spi_handle_t *hperh, uint8_t *tx_buf, uint8_t *rx
ald_status_t ald_spi_send_by_it(spi_handle_t *hperh, uint8_t *buf, uint16_t size);
ald_status_t ald_spi_recv_by_it(spi_handle_t *hperh, uint8_t *buf, uint16_t size);
ald_status_t ald_spi_send_recv_by_it(spi_handle_t *hperh, uint8_t *tx_buf, uint8_t *rx_buf, uint16_t size);
#ifdef ALD_DMA
ald_status_t ald_spi_send_by_dma(spi_handle_t *hperh, uint8_t *buf, uint16_t size, uint8_t channel);
ald_status_t ald_spi_recv_by_dma(spi_handle_t *hperh, uint8_t *buf, uint16_t size, uint8_t channel);
ald_status_t ald_spi_send_recv_by_dma(spi_handle_t *hperh, uint8_t *tx_buf, uint8_t *rx_buf, uint16_t size, uint8_t tx_channel, uint8_t rx_channel);
ald_status_t ald_spi_dma_pause(spi_handle_t *hperh);
ald_status_t ald_spi_dma_resume(spi_handle_t *hperh);
ald_status_t ald_spi_dma_stop(spi_handle_t *hperh);
#endif
/**
* @}
*/

View File

@@ -8,6 +8,9 @@
* @date 07 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 07 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_SRAM_H__
@@ -70,10 +72,10 @@ typedef struct {
ald_ebi_nor_sram_init_t init; /**< SRAM device control configuration parameters */
lock_state_t lock; /**< SRAM locking object */
__IO ald_sram_state_t state; /**< SRAM device access state */
#ifdef ALD_DMA
dma_handle_t hdma; /**< SRAM DMA Handle parameters */
void(*cplt_cbk)(void *arg); /**< DMA transmit completely callback function */
#endif
} sram_handle_t;
/**
* @}

View File

@@ -8,6 +8,9 @@
* @date 04 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 04 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_SYSCFG_H__

View File

@@ -9,6 +9,9 @@
* @date 06 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 06 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -25,8 +28,7 @@
* 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 __ALD_TIMER_H__
@@ -200,10 +202,8 @@ typedef struct timer_handle_s {
lock_state_t lock; /**< Locking object */
timer_state_t state; /**< TIMER operation state */
#ifdef ALD_DMA
dma_handle_t hdma1; /**< Timer DMA handle parameters */
dma_handle_t hdma2;
#endif
void (*period_elapse_cbk)(struct timer_handle_s *arg); /**< Period elapse callback */
void (*delay_elapse_cbk)(struct timer_handle_s *arg); /**< Delay_elapse callback */
@@ -1011,11 +1011,11 @@ void ald_timer_base_start(timer_handle_t *hperh);
void ald_timer_base_stop(timer_handle_t *hperh);
void ald_timer_base_start_by_it(timer_handle_t *hperh);
void ald_timer_base_stop_by_it(timer_handle_t *hperh);
#ifdef ALD_DMA
ald_status_t ald_timer_base_start_by_dma(timer_handle_t *hperh,
uint16_t *buf, uint32_t len, uint8_t dma_ch);
void ald_timer_base_stop_by_dma(timer_handle_t *hperh);
#endif
/**
* @}
*/
@@ -1029,11 +1029,11 @@ void ald_timer_oc_start(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_oc_stop(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_oc_start_by_it(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_oc_stop_by_it(timer_handle_t *hperh, timer_channel_t ch);
#ifdef ALD_DMA
ald_status_t ald_timer_oc_start_by_dma(timer_handle_t *hperh, timer_channel_t ch,
uint16_t *buf, uint32_t len, uint8_t dma_ch);
void ald_timer_oc_stop_by_dma(timer_handle_t *hperh, timer_channel_t ch);
#endif
/**
* @}
*/
@@ -1050,11 +1050,11 @@ void ald_timer_pwm_stop_by_it(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_pwm_set_freq(timer_handle_t *hperh, uint32_t freq);
void ald_timer_pwm_set_duty(timer_handle_t *hperh, timer_channel_t ch, uint16_t duty);
void ald_timer_pwm_set_input(timer_handle_t *hperh, timer_channel_t ch);
#ifdef ALD_DMA
ald_status_t ald_timer_pwm_start_by_dma(timer_handle_t *hperh, timer_channel_t ch,
uint16_t *buf, uint32_t len, uint8_t dma_ch);
void ald_timer_pwm_stop_by_dma(timer_handle_t *hperh, timer_channel_t ch);
#endif
/**
* @}
*/
@@ -1068,11 +1068,11 @@ void ald_timer_ic_start(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_ic_stop(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_ic_start_by_it(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_ic_stop_by_it(timer_handle_t *hperh, timer_channel_t ch);
#ifdef ALD_DMA
ald_status_t ald_timer_ic_start_by_dma(timer_handle_t *hperh, timer_channel_t ch,
uint16_t *buf, uint32_t len, uint8_t dma_ch);
void ald_timer_ic_stop_by_dma(timer_handle_t *hperh, timer_channel_t ch);
#endif
/**
* @}
*/
@@ -1099,12 +1099,12 @@ void ald_timer_encoder_start(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_encoder_stop(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_encoder_start_by_it(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_encoder_stop_by_it(timer_handle_t *hperh, timer_channel_t ch);
#ifdef ALD_DMA
ald_status_t ald_timer_encoder_start_by_dma(timer_handle_t *hperh, timer_channel_t ch,
uint16_t *buf1, uint16_t *buf2, uint32_t len,
uint8_t dma_ch1, uint8_t dma_ch2);
void ald_timer_encoder_stop_by_dma(timer_handle_t *hperh, timer_channel_t ch);
#endif
/**
* @}
*/
@@ -1118,11 +1118,11 @@ void ald_timer_hall_sensor_start(timer_handle_t *hperh);
void ald_timer_hall_sensor_stop(timer_handle_t *hperh);
void ald_timer_hall_sensor_start_by_it(timer_handle_t *hperh);
void ald_timer_hall_sensor_stop_by_it(timer_handle_t *hperh);
#ifdef ALD_DMA
ald_status_t ald_timer_hall_sensor_start_by_dma(timer_handle_t *hperh,
uint16_t *buf, uint32_t len, uint8_t dma_ch);
void ald_timer_hall_sensor_stop_by_dma(timer_handle_t *hperh);
#endif
/**
* @}
*/
@@ -1135,11 +1135,11 @@ void ald_timer_ocn_start(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_ocn_stop(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_ocn_start_by_it(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_ocn_stop_by_it(timer_handle_t *hperh, timer_channel_t ch);
#ifdef ALD_DMA
ald_status_t ald_timer_ocn_start_by_dma(timer_handle_t *hperh,
timer_channel_t ch, uint16_t *buf, uint32_t len, uint8_t dma_ch);
void ald_timer_ocn_stop_by_dma(timer_handle_t *hperh, timer_channel_t ch);
#endif
/**
* @}
*/
@@ -1152,11 +1152,11 @@ void ald_timer_pwmn_start(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_pwmn_stop(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_pwmn_start_by_it(timer_handle_t *hperh, timer_channel_t ch);
void ald_timer_pwmn_stop_by_it(timer_handle_t *hperh, timer_channel_t ch);
#ifdef ALD_DMA
ald_status_t ald_timer_pwmn_start_by_dma(timer_handle_t *hperh,
timer_channel_t ch, uint16_t *buf, uint32_t len, uint8_t dma_ch);
void ald_timer_pwmn_stop_by_dma(timer_handle_t *hperh, timer_channel_t ch);
#endif
/**
* @}
*/

View File

@@ -8,8 +8,11 @@
* @date 26 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 26 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -24,8 +27,7 @@
* 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 __ALD_TRNG_H__

View File

@@ -8,6 +8,9 @@
* @date 26 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 26 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __ALD_TSENSE_H__

View File

@@ -8,8 +8,11 @@
* @date 21 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 21 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -24,8 +27,7 @@
* 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 __ALD_UART_H__
@@ -190,10 +192,10 @@ typedef struct uart_handle_s {
uint8_t *rx_buf; /**< Pointer to UART Rx transfer Buffer */
uint16_t rx_size; /**< UART Rx Transfer size */
uint16_t rx_count; /**< UART Rx Transfer Counter */
#ifdef ALD_DMA
dma_handle_t hdmatx; /**< UART Tx DMA Handle parameters */
dma_handle_t hdmarx; /**< UART Rx DMA Handle parameters */
#endif
lock_state_t lock; /**< Locking object */
uart_state_t state; /**< UART communication state */
uart_error_t err_code; /**< UART Error code */
@@ -485,13 +487,13 @@ ald_status_t ald_uart_recv_n_lock(uart_handle_t *hperh, uint8_t *buf, uint16_t s
ald_status_t ald_uart_send_by_it(uart_handle_t *hperh, uint8_t *buf, uint16_t size);
ald_status_t ald_uart_recv_by_it(uart_handle_t *hperh, uint8_t *buf, uint16_t size);
ald_status_t ald_uart_recv_frame_by_it(uart_handle_t *hperh, uint8_t *buf, uint16_t size, uint32_t t_out);
#ifdef ALD_DMA
ald_status_t ald_uart_send_by_dma(uart_handle_t *hperh, uint8_t *buf, uint16_t size, uint8_t channel);
ald_status_t ald_uart_recv_by_dma(uart_handle_t *hperh, uint8_t *buf, uint16_t size, uint8_t channel);
ald_status_t ald_uart_dma_pause(uart_handle_t *hperh);
ald_status_t ald_uart_dma_resume(uart_handle_t *hperh);
ald_status_t ald_uart_dma_stop(uart_handle_t *hperh);
#endif
void ald_uart_irq_handler(uart_handle_t *hperh);
void ald_uart_irq_handler_fast(uart_handle_t *hperh);
/**

View File

@@ -8,8 +8,11 @@
* @date 25 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 25 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -24,8 +27,7 @@
* 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 __ALD_USB_H__

View File

@@ -7,9 +7,12 @@
* @version V1.0
* @date 18 Dec 2019
* @author AE Team
* @note
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* @note
* Change Logs:
* Date Author Notes
* 18 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -24,8 +27,7 @@
* 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 __ALD_WDT_H__

View File

@@ -8,6 +8,9 @@
* @date 17 Apr 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 17 Apr 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __TYPE_H__
@@ -37,7 +39,6 @@ extern "C" {
#include <stdint.h>
#include "es_conf_info_select.h"
#if defined (__CC_ARM)
#define __INLINE__ __inline
#define __STATIC_INLINE__ static __inline

View File

@@ -8,6 +8,9 @@
* @date 07 Nov 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 07 Nov 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,8 +27,7 @@
* 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 __UTILS_H__
@@ -36,7 +38,6 @@
#endif
#include <stdlib.h>
#include "ald_conf.h"
#include "type.h"
#ifdef ES32F36xx
#include "es32f36xx.h"
@@ -169,9 +170,9 @@ void ald_systick_interval_select(systick_interval_t value);
*/
/* Peripheral Control functions */
void ald_inc_tick(void);
void ald_systick_irq_cbk(void);
void ald_delay_us(__IO uint32_t delay);
void ald_systick_irq_cbk(void);
void ald_delay_ms(__IO uint32_t delay);
void ald_delay_us(__IO uint32_t delay);
uint32_t ald_get_tick(void);
void ald_suspend_tick(void);
void ald_resume_tick(void);

View File

@@ -8,6 +8,9 @@
* @date 26 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 26 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,11 +27,10 @@
* 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_acmp.h"
#include "ald_conf.h"
/** @addtogroup ES32FXXX_ALD
* @{

View File

@@ -21,6 +21,9 @@
* @date 28 Jun 2019
* @author AE Team.
* @note
* Change Logs:
* Date Author Notes
* 28 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -37,14 +40,11 @@
* 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_cmu.h"
#include "ald_adc.h"
#include "ald_conf.h"
/** @addtogroup ES32FXXX_ALD
* @{
@@ -73,7 +73,6 @@ static void adc_dma_error(void *arg);
* @}
*/
/** @defgroup ADC_Public_Functions ADC Public Functions
* @{
*/
@@ -160,8 +159,7 @@ ald_status_t ald_adc_init(adc_handle_t *hperh)
SET_BIT(ADC0->CCR, ADC_CCR_TRMEN_MSK);
SET_BIT(ADC1->CCR, ADC_CCR_TRMEN_MSK);
MODIFY_REG(hperh->perh->CON1, ADC_CON1_NCHESEL_MSK, hperh->init.nche_sel << ADC_CON1_NCHESEL_POS);
MODIFY_REG(hperh->perh->CON1, ADC_CON1_NCHESEL_MSK, hperh->init.nche_sel << ADC_CON1_NCHESEL_POS);
ald_adc_interrupt_config(hperh, ADC_IT_OVR, ENABLE);
ADC_ENABLE(hperh);
@@ -1131,33 +1129,33 @@ uint32_t ald_adc_get_error(adc_handle_t *hperh)
*/
void ald_adc_offset_adjust(uint32_t refmv)
{
uint32_t tmp = 0, os = 0;
if (refmv == 0) return;
*((volatile uint32_t *)(0x40080000)) = 0x55AA6996;
*((volatile uint32_t *)(0x40080100)) = 0x5A962814;
*((volatile uint32_t *)(0x40080100)) = 0xE7CB69A5;
tmp = INFO_ADC0DA;
os = tmp & 0x7F;
os = (uint32_t)((os * 5000) / refmv + 0.5);
tmp = tmp & 0xFF80;
tmp |= os;
tmp |= 0x55AA0000;
CFG_ADC0DA = tmp;
tmp = INFO_ADC1DA;
os = tmp & 0x7F;
os = (uint32_t)((os * 5000) / refmv + 0.5);
tmp = tmp & 0xFF80;
tmp |= os;
tmp |= 0x55AA0000;
CFG_ADC1DA = tmp;
*((volatile uint32_t *)(0x40080100)) = 0x123456;
*((volatile uint32_t *)(0x40080100)) = 0x123456;
*((volatile uint32_t *)(0x40080000)) = 0x123456;
uint32_t tmp = 0, os = 0;
if (refmv == 0) return;
*((volatile uint32_t *)(0x40080000)) = 0x55AA6996;
*((volatile uint32_t *)(0x40080100)) = 0x5A962814;
*((volatile uint32_t *)(0x40080100)) = 0xE7CB69A5;
tmp = INFO_ADC0DA;
os = tmp & 0x7F;
os = (uint32_t)((os * 5000) / refmv + 0.5);
tmp = tmp & 0xFF80;
tmp |= os;
tmp |= 0x55AA0000;
CFG_ADC0DA = tmp;
tmp = INFO_ADC1DA;
os = tmp & 0x7F;
os = (uint32_t)((os * 5000) / refmv + 0.5);
tmp = tmp & 0xFF80;
tmp |= os;
tmp |= 0x55AA0000;
CFG_ADC1DA = tmp;
*((volatile uint32_t *)(0x40080100)) = 0x123456;
*((volatile uint32_t *)(0x40080100)) = 0x123456;
*((volatile uint32_t *)(0x40080000)) = 0x123456;
}
/**

View File

@@ -8,6 +8,9 @@
* @date 15 Dec 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 15 Dec 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
@@ -24,13 +27,10 @@
* 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_bkpc.h"
#include "ald_rtc.h"
#include "ald_conf.h"
/** @addtogroup ES32FXXX_ALD
* @{

View File

@@ -8,8 +8,11 @@
* @date 26 Jun 2019
* @author AE Team
* @note
* Change Logs:
* Date Author Notes
* 26 Jun 2019 AE Team The first version
*
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
* Copyright (C) Shanghai Eastsoft Microelectronics Co. Ltd. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -24,11 +27,10 @@
* 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_calc.h"
#include "ald_conf.h"
/** @addtogroup ES32FXXX_ALD

Some files were not shown because too many files have changed in this diff Show More