添加GD32H7的CMake工程
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
/*!
|
||||
\file gd32h7xx_it.h
|
||||
\brief the header file of the ISR
|
||||
|
||||
\version 2025-02-19, V2.1.0, demo for GD32H7xx
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (c) 2024, GigaDevice Semiconductor Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef GD32H7XX_IT_H
|
||||
#define GD32H7XX_IT_H
|
||||
|
||||
#include "gd32h7xx.h"
|
||||
|
||||
/* function declarations */
|
||||
/* this function handles NMI exception */
|
||||
void NMI_Handler(void);
|
||||
/* this function handles HardFault exception */
|
||||
void HardFault_Handler(void);
|
||||
/* this function handles MemManage exception */
|
||||
void MemManage_Handler(void);
|
||||
/* this function handles BusFault exception */
|
||||
void BusFault_Handler(void);
|
||||
/* this function handles UsageFault exception */
|
||||
void UsageFault_Handler(void);
|
||||
/* this function handles SVC exception */
|
||||
void SVC_Handler(void);
|
||||
/* this function handles DebugMon exception */
|
||||
void DebugMon_Handler(void);
|
||||
/* this function handles PendSV exception */
|
||||
void PendSV_Handler(void);
|
||||
/* this function handles FPU exception */
|
||||
void FPU_IRQHandler(void);
|
||||
/* this function handles SysTick exception */
|
||||
void SysTick_Handler(void);
|
||||
|
||||
#endif /* GD32H7XX_IT_H */
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/*!
|
||||
\file gd32h7xx_libopt.h
|
||||
\brief library optional for gd32h7xx
|
||||
|
||||
\version 2025-01-24, V1.4.0, firmware for GD32H7xx
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (c) 2025, GigaDevice Semiconductor Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef GD32H7XX_LIBOPT_H
|
||||
#define GD32H7XX_LIBOPT_H
|
||||
|
||||
#include "gd32h7xx_adc.h"
|
||||
#include "gd32h7xx_axiim.h"
|
||||
#include "gd32h7xx_can.h"
|
||||
#include "gd32h7xx_cau.h"
|
||||
#include "gd32h7xx_cmp.h"
|
||||
#include "gd32h7xx_cpdm.h"
|
||||
#include "gd32h7xx_crc.h"
|
||||
#include "gd32h7xx_ctc.h"
|
||||
#include "gd32h7xx_dac.h"
|
||||
#include "gd32h7xx_dbg.h"
|
||||
#include "gd32h7xx_dci.h"
|
||||
#include "gd32h7xx_dma.h"
|
||||
#include "gd32h7xx_edout.h"
|
||||
#include "gd32h7xx_efuse.h"
|
||||
#include "gd32h7xx_enet.h"
|
||||
#include "gd32h7xx_exmc.h"
|
||||
#include "gd32h7xx_exti.h"
|
||||
#include "gd32h7xx_fac.h"
|
||||
#include "gd32h7xx_fmc.h"
|
||||
#include "gd32h7xx_fwdgt.h"
|
||||
#include "gd32h7xx_gpio.h"
|
||||
#include "gd32h7xx_hau.h"
|
||||
#include "gd32h7xx_hpdf.h"
|
||||
#include "gd32h7xx_hwsem.h"
|
||||
#include "gd32h7xx_i2c.h"
|
||||
#include "gd32h7xx_ipa.h"
|
||||
#include "gd32h7xx_lpdts.h"
|
||||
#include "gd32h7xx_mdio.h"
|
||||
#include "gd32h7xx_mdma.h"
|
||||
#include "gd32h7xx_misc.h"
|
||||
#include "gd32h7xx_ospi.h"
|
||||
#include "gd32h7xx_ospim.h"
|
||||
#include "gd32h7xx_pmu.h"
|
||||
#include "gd32h7xx_rameccmu.h"
|
||||
#include "gd32h7xx_rcu.h"
|
||||
#include "gd32h7xx_rspdif.h"
|
||||
#include "gd32h7xx_rtc.h"
|
||||
#include "gd32h7xx_rtdec.h"
|
||||
#include "gd32h7xx_sai.h"
|
||||
#include "gd32h7xx_sdio.h"
|
||||
#include "gd32h7xx_spi.h"
|
||||
#include "gd32h7xx_syscfg.h"
|
||||
#include "gd32h7xx_timer.h"
|
||||
#include "gd32h7xx_tli.h"
|
||||
#include "gd32h7xx_tmu.h"
|
||||
#include "gd32h7xx_trigsel.h"
|
||||
#include "gd32h7xx_trng.h"
|
||||
#include "gd32h7xx_usart.h"
|
||||
#include "gd32h7xx_vref.h"
|
||||
#include "gd32h7xx_wwdgt.h"
|
||||
|
||||
#endif /* GD32H7XX_LIBOPT_H */
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @file main.h
|
||||
* @author
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2025-08-14
|
||||
*
|
||||
* @copyright Copyright (c) 2025
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __MAIN_H__
|
||||
#define __MAIN_H__
|
||||
|
||||
int main();
|
||||
|
||||
#endif /* __MAIN_H__ */
|
||||
@@ -0,0 +1,47 @@
|
||||
/*!
|
||||
\file systick.h
|
||||
\brief the header file of systick
|
||||
|
||||
\version 2025-02-19, V2.1.0, demo for GD32H7xx
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (c) 2024, GigaDevice Semiconductor Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __SYSTICK_H
|
||||
#define __SYSTICK_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* configure systick */
|
||||
void systick_config(void);
|
||||
/* delay a time in milliseconds */
|
||||
void delay_1ms(uint32_t count);
|
||||
/* delay decrement */
|
||||
void delay_decrement(void);
|
||||
|
||||
#endif /* __SYSTICK_H */
|
||||
@@ -0,0 +1,164 @@
|
||||
/*!
|
||||
\file gd32h7xx_it.c
|
||||
\brief interrupt service routines
|
||||
|
||||
\version 2025-02-19, V2.1.0, demo for GD32H7xx
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (c) 2024, GigaDevice Semiconductor Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "gd32h7xx_it.h"
|
||||
#include "systick.h"
|
||||
|
||||
/*!
|
||||
\brief this function handles NMI exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void NMI_Handler(void)
|
||||
{
|
||||
/* if NMI exception occurs, go to infinite loop */
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles HardFault exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void HardFault_Handler(void)
|
||||
{
|
||||
/* if Hard Fault exception occurs, go to infinite loop */
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles MemManage exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void MemManage_Handler(void)
|
||||
{
|
||||
/* if Memory Manage exception occurs, go to infinite loop */
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles BusFault exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void BusFault_Handler(void)
|
||||
{
|
||||
/* if Bus Fault exception occurs, go to infinite loop */
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles UsageFault exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void UsageFault_Handler(void)
|
||||
{
|
||||
/* if Usage Fault exception occurs, go to infinite loop */
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles DebugMon exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void DebugMon_Handler(void)
|
||||
{
|
||||
/* if DebugMon exception occurs, go to infinite loop */
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles SVC exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void SVC_Handler(void)
|
||||
{
|
||||
/* if SVC exception occurs, go to infinite loop */
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles PendSV exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void PendSV_Handler(void)
|
||||
{
|
||||
/* if PendSV exception occurs, go to infinite loop */
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles FPU exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void FPU_IRQHandler(void)
|
||||
{
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief this function handles SysTick exception
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void SysTick_Handler(void)
|
||||
{
|
||||
delay_decrement();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
#include <stdio.h>
|
||||
#include "gd32h7xx.h"
|
||||
#include "systick.h"
|
||||
|
||||
void cache_enable(void);
|
||||
void mpu_config(void);
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
cache_enable();
|
||||
mpu_config();
|
||||
|
||||
systick_config();
|
||||
|
||||
|
||||
while (1)
|
||||
{
|
||||
delay_1ms(100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\brief enable the CPU cache
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void cache_enable(void)
|
||||
{
|
||||
/* enable i-cache */
|
||||
SCB_EnableICache();
|
||||
/* enable d-cache */
|
||||
SCB_EnableDCache();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief configure the MPU attributes
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void mpu_config(void)
|
||||
{
|
||||
mpu_region_init_struct mpu_init_struct;
|
||||
mpu_region_struct_para_init(&mpu_init_struct);
|
||||
|
||||
/* disable the MPU */
|
||||
ARM_MPU_Disable();
|
||||
ARM_MPU_SetRegion(0, 0);
|
||||
|
||||
/* configure the MPU attributes for the entire 4GB area, Reserved, no access */
|
||||
/* This configuration is highly recommended to prevent Speculative Prefetching of external memory,
|
||||
which may cause CPU read locks and even system errors */
|
||||
mpu_init_struct.region_base_address = 0x0;
|
||||
mpu_init_struct.region_size = MPU_REGION_SIZE_4GB;
|
||||
mpu_init_struct.access_permission = MPU_AP_NO_ACCESS;
|
||||
mpu_init_struct.access_bufferable = MPU_ACCESS_NON_BUFFERABLE;
|
||||
mpu_init_struct.access_cacheable = MPU_ACCESS_NON_CACHEABLE;
|
||||
mpu_init_struct.access_shareable = MPU_ACCESS_SHAREABLE;
|
||||
mpu_init_struct.region_number = MPU_REGION_NUMBER0;
|
||||
mpu_init_struct.subregion_disable = 0x87;
|
||||
mpu_init_struct.instruction_exec = MPU_INSTRUCTION_EXEC_NOT_PERMIT;
|
||||
mpu_init_struct.tex_type = MPU_TEX_TYPE0;
|
||||
mpu_region_config(&mpu_init_struct);
|
||||
mpu_region_enable();
|
||||
|
||||
/* enable the MPU */
|
||||
ARM_MPU_Enable(MPU_MODE_PRIV_DEFAULT);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/*!
|
||||
\file systick.c
|
||||
\brief the systick configuration file
|
||||
|
||||
\version 2025-01-24, V1.4.0, firmware for GD32H7xx
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (c) 2025, GigaDevice Semiconductor Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of the copyright holder nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
|
||||
OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "gd32h7xx.h"
|
||||
#include "systick.h"
|
||||
|
||||
volatile static uint32_t delay;
|
||||
|
||||
/*!
|
||||
\brief configure systick
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void systick_config(void)
|
||||
{
|
||||
/* setup systick timer for 1000Hz interrupts */
|
||||
if(SysTick_Config(SystemCoreClock / 1000U)) {
|
||||
/* capture error */
|
||||
while(1) {
|
||||
}
|
||||
}
|
||||
/* configure the systick handler priority */
|
||||
NVIC_SetPriority(SysTick_IRQn, 0x00U);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief delay a time in milliseconds
|
||||
\param[in] count: count in milliseconds
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void delay_1ms(uint32_t count)
|
||||
{
|
||||
delay = count;
|
||||
|
||||
while(0U != delay) {
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief delay decrement
|
||||
\param[in] none
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
void delay_decrement(void)
|
||||
{
|
||||
if(0U != delay) {
|
||||
delay--;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user