You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
3.4 KiB

!49 v0.3.0 更新 * Merge branch 'E2000_TEST' into 'new_master' * E2000 v0.3 发布 * Merge branch 'v0_2_0_gitee' into 'new_master' * Merge branch '0_2_0' into 'new_master' * build all, before push to gitee 0.2.0 * Merge branch 'gmac_phy_0526' into 'new_master' * 完善gmac驱动,完善裸机lwip测试,适配freertos的lwip测试 * Merge branch 'new_master' into 'new_master' * iic_timer_tacho * Merge branch 'debug_0609' into 'new_master' * 支持汇编调试打印,修改异常打印,增加例程用于异常调试 * Merge branch 'nand_0512' into 'new_master' * Nand 0512 * 重构SDIO驱动,支持SD 2.0协议和DMA读写 * 重构SDIO驱动,支持SD 2.0协议和DMA读写 * 合入Seamphore驱动,完成GDMA驱动重构 * 合入Seamphore驱动,完成GDMA驱动重构 * Merge branch 'pwm_0525' into 'new_master' * 重构CAN驱动,新增E2000 PWM、ADC驱动 * 合入DDMA驱动,新增DDMA+SPI回环例程,更新PR Check list和编码规范 * 合入DDMA驱动,新增DDMA+SPI回环例程,更新PR Check list和编码规范 * Merge branch 'new_master' into 'new_master' * fi2c_slave * Merge branch 'revert-425e915e' into 'new_master' * Revert "Merge branch 'revert' into 'new_master'" * Merge branch 'revert' into 'new_master' * revert version * Merge branch 'fi2c_0429' into 'new_master' * Fi2c 0429 * Merge branch 'new_master' into 'new_master' * add fi2c_master * Merge branch 'xmac_gmac' into 'new_master' * Gmac and Xmac Restruct * Merge branch 'new_gic' into 'new_master' * New gic * Merge branch 'spi_0413' into 'new_master' * 支持 LittleFS 和 Spiffs,新增 SPI 回环测试 * Merge branch '0_1_17' into 'new_master' * !40 Release v0.1.17 * Merge branch 'new_master' into 'new_master' * add uart file * Merge branch '0_1_17' into 'new_master' * v0.1.17发布前覆盖测试 * 解决Issue:I2C 驱动速度无法调节至3.4M * 解决Issue:I2C 驱动速度无法调节至3.4M * Merge branch 'wdt_restruct' into 'new_master' * watchdog驱动重构与验证 * Merge branch 'qspi' into 'new_master' * 重构QSPI驱动,解耦驱动和FLASH关联,完善功能特性支持和测试例程 * 重构芯片引脚控制和GPIO驱动,新增引脚控制相关例程 * 重构芯片引脚控制和GPIO驱动,新增引脚控制相关例程 * Merge branch 'ctest-pr-0317' into 'new_master' * redefine assert and shell cmd to support ctest * Merge branch 'openamp_update' into 'new_master' * Openamp update * Release v0.1.16, Support USB and SATA * Release v0.1.16, Support USB and SATA * Merge branch 'release_0218' into 'new_master' * Release 0.1.16 进行发布例程功能测试,修改许可证为Phytium Public License 1.0 * 合入FUSB和FXHCI驱动,支持通过FATFS读写U盘 * 合入FUSB和FXHCI驱动,支持通过FATFS读写U盘 * Merge branch 'back' into 'new_master' * 修改多核问题,删除glibc * Merge branch 'sata' into 'new_master' * add pcie & sata driver and example test * Merge branch 'rm_some_right' into 'new_master' * Rm some right
2 years ago
/*
* Copyright : (C) 2022 Phytium Information Technology, Inc.
* All Rights Reserved.
*
* This program is OPEN SOURCE software: you can redistribute it and/or modify it
* under the terms of the Phytium Public License as published by the Phytium Technology Co.,Ltd,
* either version 1.0 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Phytium Public License for more details.
*
*
* FilePath: fgpio_selftest.c
* Date: 2022-06-17 14:32:12
* LastEditTime: 2022-06-17 14:32:12
* Description:  This files is for
*
* Modify History:
* Ver   Who        Date         Changes
* ----- ------     --------    --------------------------------------
*/
/***************************** Include Files *********************************/
#include "ft_debug.h"
#include "ft_assert.h"
#include "fgpio_hw.h"
#include "fgpio.h"
/************************** Constant Definitions *****************************/
/**************************** Type Definitions *******************************/
/***************** Macros (Inline Functions) Definitions *********************/
#define FGPIO_DEBUG_TAG "FGPIO-TEST"
#define FGPIO_ERROR(format, ...) FT_DEBUG_PRINT_E(FGPIO_DEBUG_TAG, format, ##__VA_ARGS__)
#define FGPIO_WARN(format, ...) FT_DEBUG_PRINT_W(FGPIO_DEBUG_TAG, format, ##__VA_ARGS__)
#define FGPIO_INFO(format, ...) FT_DEBUG_PRINT_I(FGPIO_DEBUG_TAG, format, ##__VA_ARGS__)
#define FGPIO_DEBUG(format, ...) FT_DEBUG_PRINT_D(FGPIO_DEBUG_TAG, format, ##__VA_ARGS__)
#define FGPIO_DUMPER(base_addr, reg_off, reg_name) \
FGPIO_DEBUG("\t\t[%s]@0x%x\t=\t0x%x", reg_name, (reg_off), FGpioReadReg32((base_addr), (reg_off)))
/************************** Function Prototypes ******************************/
/************************** Variable Definitions *****************************/
/*****************************************************************************/
/**
* @name: FGpioDumpRegisters
* @msg: GPIO控制寄存器信息
* @return {NONE}
* @param {uintptr} base_addr, GPIO控制器基地址
*/
void FGpioDumpRegisters(uintptr base_addr)
{
FASSERT(0 != base_addr);
FGPIO_DEBUG("Dump register info @0x%x", base_addr);
FGPIO_DUMPER(base_addr, FGPIO_SWPORTA_DR_OFFSET, "dr");
FGPIO_DUMPER(base_addr, FGPIO_SWPORTA_DDR_OFFSET, "ddr");
FGPIO_DUMPER(base_addr, FGPIO_EXT_PORTA_OFFSET, "ext_porta");
#if defined(FGPIO_VERSION_1) /* D2000 FT2000/4 */
FGPIO_DUMPER(base_addr, FGPIO_SWPORTB_DR_OFFSET, "portb_dr");
FGPIO_DUMPER(base_addr, FGPIO_SWPORTB_DDR_OFFSET, "portb_ddr");
FGPIO_DUMPER(base_addr, FGPIO_EXT_PORTB_OFFSET, "ext_portb");
#endif
FGPIO_DUMPER(base_addr, FGPIO_INTEN_OFFSET, "inten");
FGPIO_DUMPER(base_addr, FGPIO_INTMASK_OFFSET, "intmask");
FGPIO_DUMPER(base_addr, FGPIO_INTTYPE_LEVEL_OFFSET, "intr_level");
FGPIO_DUMPER(base_addr, FGPIO_INT_POLARITY_OFFSET, "intr_polarity");
FGPIO_DUMPER(base_addr, FGPIO_INTSTATUS_OFFSET, "intr_status");
FGPIO_DUMPER(base_addr, FGPIO_RAW_INTSTATUS_OFFSET, "raw_int_status");
FGPIO_DUMPER(base_addr, FGPIO_LS_SYNC_OFFSET, "ls_sync");
FGPIO_DUMPER(base_addr, FGPIO_DEBOUNCE_OFFSET, "debounce");
FGPIO_DUMPER(base_addr, FGPIO_PORTA_EOI_OFFSET, "porta_eoi");
return;
}