hpw422移植新的sdk
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
/*!
|
||||
* \file i2C_master.h
|
||||
*
|
||||
* \brief The head file of i2C_master.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 __I2C_MASTER_TEST_H__
|
||||
#define __I2C_MASTER_TEST_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------------------
|
||||
INCLUDE HEADE FILES
|
||||
------------------------------------------------------------------------------------*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/*------------------------------------------------------------------------------------
|
||||
Macros
|
||||
-------------------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------------------------------
|
||||
TypeDef
|
||||
-------------------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------------------------------
|
||||
Global Variables
|
||||
-------------------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------------------------------
|
||||
Exported Functions
|
||||
-------------------------------------------------------------------------------------*/
|
||||
void i2c_master_demo(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __XC60xx_I2C_MASTER_TEST_H_ */
|
||||
@@ -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 "i2c_master.h"
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------------
|
||||
Macros
|
||||
-------------------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------------------------------
|
||||
TypeDef
|
||||
-------------------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------------------------------
|
||||
Global Variables
|
||||
-------------------------------------------------------------------------------------*/
|
||||
|
||||
/*------------------------------------------------------------------------------------
|
||||
Exported Functions
|
||||
-------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MAIN_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
|
||||
|
||||
Reference in New Issue
Block a user