Files
2026-02-03 11:37:13 +08:00

193 lines
5.1 KiB
C

/**
* Copyright (c) 2024 Wei-Lun Hsu. All Rights Reserved.
*/
/** @file hal_conf.h
*
* @author Wei-Lun Hsu
* @version 0.1
* @date 2024/09/10
* @license
* @description
*/
#ifndef __hal_conf_H_wV9UWaWV_lh0O_HTIV_ssSG_umphyc0TVXKd__
#define __hal_conf_H_wV9UWaWV_lh0O_HTIV_ssSG_umphyc0TVXKd__
#ifdef __cplusplus
extern "C" {
#endif
//=============================================================================
// Constant Definition
//=============================================================================
/**
* Uncomment 'USE_FULL_ASSERT' to expanse the "assert_param" macro
* in the HAL drivers code
* ps. User should implement the funciton
* 'void assert_failed(char *func, uint32_t line)' at applicaion layer
*/
// #define USE_FULL_ASSERT 1
/**
* The list of modules to be used in the HAL drivers
*/
#define CONFIG_ENABLE_HAL_SYSCFG
#define CONFIG_ENABLE_HAL_PWR
#define CONFIG_ENABLE_HAL_FLASH
#define CONFIG_ENABLE_HAL_GPIO
#define CONFIG_ENABLE_HAL_UART
#define CONFIG_ENABLE_HAL_I2C
#define CONFIG_ENABLE_HAL_SPI
#define CONFIG_ENABLE_HAL_LPTIM
#define CONFIG_ENABLE_HAL_TIM0
#define CONFIG_ENABLE_HAL_TIM1
#define CONFIG_ENABLE_HAL_TIM2
#define CONFIG_ENABLE_HAL_WDG
#define CONFIG_ENABLE_HAL_ADC
#define CONFIG_ENABLE_HAL_AMISC
#define CONFIG_ENABLE_HAL_COMP
#define CONFIG_ENABLE_HAL_OPAMP
#define CONFIG_ENABLE_HAL_CRC
#define CONFIG_ENABLE_HAL_DSP
#define CONFIG_ENABLE_HAL_EPWM
/**
* System-clock Definition
*/
#if !defined(SYS_HIRC_VALUE)
#define SYS_HIRC_MHZ (60ul)
#define SYS_HIRC_VALUE (SYS_HIRC_MHZ * 1000ul * 1000ul)
#endif
#if !defined(SYS_OSC_VALUE)
#define SYS_OSC_VALUE (8 * 1000ul * 1000ul)
#endif
#if !defined(SYS_LIRC_VALUE)
#define SYS_LIRC_VALUE 32768ul
#endif
#define SYS_TIMER_FREQ SYS_LIRC_VALUE
//=============================================================================
// Macro Definition
//=============================================================================
//=============================================================================
// Structure Definition
//=============================================================================
//=============================================================================
// Global Data Definition
//=============================================================================
//=============================================================================
// Private Function Definition
//=============================================================================
//=============================================================================
// Public Function Definition
//=============================================================================
#ifdef CONFIG_ENABLE_HAL_SYSCFG
/* Reset and Clock Control module */
#include "hal_syscfg.h"
#endif /* CONFIG_ENABLE_HAL_SYSCFG */
#ifdef CONFIG_ENABLE_HAL_PWR
/* Power Management Unit module */
#include "hal_pwr.h"
#endif /* CONFIG_ENABLE_HAL_PWR */
#ifdef CONFIG_ENABLE_HAL_FLASH
/* Embedded Flash module */
#include "hal_flash.h"
#endif /* CONFIG_ENABLE_HAL_FLASH */
#ifdef CONFIG_ENABLE_HAL_GPIO
/* General-purpose I/O module */
#include "hal_gpio.h"
#endif /* CONFIG_ENABLE_HAL_GPIO */
#ifdef CONFIG_ENABLE_HAL_UART
/* Universal Asynchronous Rx/Tx module */
#include "hal_uart.h"
#endif /* CONFIG_ENABLE_HAL_UART */
#ifdef CONFIG_ENABLE_HAL_I2C
/* Inter-Integrated Circuit module */
#include "hal_i2c.h"
#endif /* CONFIG_ENABLE_HAL_I2C */
#ifdef CONFIG_ENABLE_HAL_SPI
/* Serial Peripheral Interface-Bus module */
#include "hal_spi.h"
#endif /* CONFIG_ENABLE_HAL_SPI */
#ifdef CONFIG_ENABLE_HAL_LPTIM
/* Low-Power Timer module */
#include "hal_lptim.h"
#endif /* CONFIG_ENABLE_HAL_LPTIM */
#ifdef CONFIG_ENABLE_HAL_TIM0
/* Tim0 module */
#include "hal_lptim.h"
#endif /* CONFIG_ENABLE_HAL_TIM0 */
#ifdef CONFIG_ENABLE_HAL_TIM1
/* Tim1 module */
#include "hal_lptim.h"
#endif /* CONFIG_ENABLE_HAL_TIM1 */
#ifdef CONFIG_ENABLE_HAL_TIM2
/* Timer module */
#include "hal_tim.h"
#endif /* CONFIG_ENABLE_HAL_TIM2 */
#ifdef CONFIG_ENABLE_HAL_WDG
/* Watch Dog module */
#include "hal_wdg.h"
#endif /* CONFIG_ENABLE_HAL_WDG */
#ifdef CONFIG_ENABLE_HAL_ADC
/* Analog-to-Digital Converter module */
#include "hal_adc.h"
#endif /* CONFIG_ENABLE_HAL_ADC */
#ifdef CONFIG_ENABLE_HAL_AMISC
/* Analog MISC controller module */
#include "hal_amisc.h"
#endif /* CONFIG_ENABLE_HAL_AMISC */
#ifdef CONFIG_ENABLE_HAL_COMP
/* Voltage Compare module */
#include "hal_comp.h"
#endif /* CONFIG_ENABLE_HAL_COMP */
#ifdef CONFIG_ENABLE_HAL_OPAMP
/* OP-Amplifiers with Programmable Gain Amplifier mode */
#include "hal_opamp.h"
#endif /* CONFIG_ENABLE_HAL_OPAMP */
#ifdef CONFIG_ENABLE_HAL_CRC
/* Cyclic Redundancy Check module */
#include "hal_crc.h"
#endif /* CONFIG_ENABLE_HAL_CRC */
#ifdef CONFIG_ENABLE_HAL_DSP
/* Peripheral DSP module */
#include "hal_dsp.h"
#endif /* CONFIG_ENABLE_HAL_DSP */
#ifdef CONFIG_ENABLE_HAL_EPWM
/* Enhance PWM module */
#include "hal_tim.h"
#endif /* CONFIG_ENABLE_HAL_EPWM */
#ifdef __cplusplus
}
#endif
#endif