hpw422移植新的sdk

This commit is contained in:
xushaoxiang
2026-07-03 18:08:25 +08:00
commit 945a5a5b0b
2583 changed files with 713209 additions and 0 deletions
@@ -0,0 +1,66 @@
/*!
* \file main.h
*
* \brief The head file of main.c
*
* \copyright Revised BSD License, see section \ref LICENSE.
*
* \code
*
* _ __ _ ________ _
* | |/ /(_)___ / ____/ /_ (_)___
* | // / __ \/ / / __ \/ / __ \
* / |/ / / / / /___/ / / / / /_/ /
* /_/|_/_/_/ /_/\____/_/ /_/_/ .___/
* /_/
* (C) 2022-2025 XinChip
*
* \endcode
*
* \author ( XinChip ) Alex-J
*
* \author ( XinChip )
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H__
#define __MAIN_H__
#ifdef __cplusplus
extern "C" {
#endif
/*-----------------------------------------------------------------------------------
INCLUDE HEADE FILES
------------------------------------------------------------------------------------*/
#include <stdio.h>
#include <string.h>
#include "xc6xxx.h"
#include "qdec.h"
/*------------------------------------------------------------------------------------
Macros
-------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------
TypeDef
-------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------
Global Variables
-------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------
Exported Functions
-------------------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H__ */
@@ -0,0 +1,53 @@
/*!
* \file qdec.h
*
* \brief The head file of qdec.c
*
* \copyright Revised BSD License, see section \ref LICENSE.
*
* \code
*
* _ __ _ ________ _
* | |/ /(_)___ / ____/ /_ (_)___
* | // / __ \/ / / __ \/ / __ \
* / |/ / / / / /___/ / / / / /_/ /
* /_/|_/_/_/ /_/\____/_/ /_/_/ .___/
* /_/
* (C) 2022-2025 XinChip
*
* \endcode
*
* \author ( XinChip ) Alex-J
*
* \author ( XinChip )
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __QDEC_H__
#define __QDEC_H__
/*-----------------------------------------------------------------------------------
INCLUDE HEADE FILES
------------------------------------------------------------------------------------*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
/*------------------------------------------------------------------------------------
Macros
-------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------
TypeDef
-------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------
Global Variables
-------------------------------------------------------------------------------------*/
/*------------------------------------------------------------------------------------
Exported Functions
-------------------------------------------------------------------------------------*/
void qdec_demo(void);
#endif /* __QDEC_H__ */
@@ -0,0 +1,152 @@
#ifndef SDK_DRIVER_CONFIG_H
#define SDK_DRIVER_CONFIG_H
// <<< Use Configuration Wizard in Context Menu >>>\n
#ifdef USE_APP_CONFIG
#include "app_config.h"
#endif
// <h> XC_Drivers
// <e> XC_CLOCK_ENABLED
//==========================================================
#ifndef XC_CLOCK_ENABLED
#define XC_CLOCK_ENABLED 1
#endif
// </e>
// <e> XC_PWR_ENABLED
//==========================================================
#ifndef XC_PWR_ENABLED
#define XC_PWR_ENABLED 1
#endif
// </e>
// <e> XC_WDT_ENABLED
//==========================================================
#ifndef XC_WDT_ENABLED
#define XC_WDT_ENABLED 1
#endif
// </e>
// <e> XC_BOR_ENABLED
//==========================================================
#ifndef XC_BOR_ENABLED
#define XC_BOR_ENABLED 1
#endif
// </e>
// <e> XC_SYSTICK_ENABLED
//==========================================================
#ifndef XC_SYSTICK_ENABLED
#define XC_SYSTICK_ENABLED 1
#endif
// </e>
// <e> XC_TIMER_ENABLED
//==========================================================
#ifndef XC_TIMER_ENABLED
#define XC_TIMER_ENABLED 1
#endif
// </e>
// <e> XC_AOTIMER_ENABLED
//==========================================================
#ifndef XC_AOTIMER_ENABLED
#define XC_AOTIMER_ENABLED 1
#endif
// </e>
// <e> XC_GPIO_ENABLED
//==========================================================
#ifndef XC_GPIO_ENABLED
#define XC_GPIO_ENABLED 1
#endif
// </e>
// <e> XC_ADC_ENABLED
//==========================================================
#ifndef XC_ADC_ENABLED
#define XC_ADC_ENABLED 1
#endif
// </e>
// <e> XC_UART_ENABLED
//==========================================================
#ifndef XC_UART_ENABLED
#define XC_UART_ENABLED 1
#endif
// </e>
// <e> XC_PWM_ENABLED
//==========================================================
#ifndef XC_PWM_ENABLED
#define XC_PWM_ENABLED 1
#endif
// </e>
// <e> XC_FMC_SPI_ENABLED
//==========================================================
#ifndef XC_FMC_SPI_ENABLED
#define XC_FMC_SPI_ENABLED 1
#endif
// </e>
// <e> XC_SPI_ENABLED
//==========================================================
#ifndef XC_SPI_ENABLED
#define XC_SPI_ENABLED 1
#endif
// </e>
// <e> XC_IIC_ENABLED
//==========================================================
#ifndef XC_IIC_ENABLED
#define XC_IIC_ENABLED 1
#endif
// </e>
// <e> XC_RTC_ENABLED
//==========================================================
#ifndef XC_RTC_ENABLED
#define XC_RTC_ENABLED 1
#endif
//==========================================================
// <q> XC_RTC_DATE_INT_ENABLED
#ifndef XC_RTC_DATE_INT_ENABLED
#define XC_RTC_DATE_INT_ENABLED 0
#endif
// </e>
// <e> XC_DMA_ENABLED
//==========================================================
#ifndef XC_DMA_ENABLED
#define XC_DMA_ENABLED 1
#endif
// </e>
// <e> XC_PGA_ENABLED
//==========================================================
#ifndef XC_PGA_ENABLED
#define XC_PGA_ENABLED 1
#endif
// </e>
// <e> XC_QDEC_ENABLED
//==========================================================
#ifndef XC_QDEC_ENABLED
#define XC_QDEC_ENABLED 1
#endif
// </e>
// <e> XC_CALIB_ENABLED
//==========================================================
#ifndef XC_CALIB_ENABLED
#define XC_CALIB_ENABLED 1
#endif
// </e>
// <<< end of configuration section >>>
#endif //SDK_DRIVER_CONFIG_H