mb85rc64硬件I2C改写完成

This commit is contained in:
DESKTOP-2E6P1Q6\Administrator 2025-09-29 17:41:58 +08:00
parent fb8fdcc834
commit cc7696c5ac
151 changed files with 1101767 additions and 423 deletions

View File

@ -30,6 +30,13 @@
"gd32f4xx_enet.h": "c",
"beep.h": "c",
"gd32f4xx_exmc.h": "c",
"gd32f4xx_ipa.h": "c"
"gd32f4xx_ipa.h": "c",
"gd32f4xx_spi.h": "c",
"tmr3109.h": "c",
"core_cmfunc.h": "c",
"gd32f4xx_it.h": "c",
"usbd_transc.h": "c",
"drv_usbd_int.h": "c",
"system_gd32f4xx.h": "c"
}
}

View File

@ -357,10 +357,10 @@
<state>$PROJ_DIR$\..\rtthread</state>
<state>$PROJ_DIR$\..\rtthread\include\libc</state>
<state>$PROJ_DIR$\..\rtthread\include</state>
<state>C:\Users\Administrator\Documents\newPtz\drivers\mb85rc64</state>
<state>C:\Users\Administrator\Documents\newPtz\drivers\tmp75</state>
<state>C:\Users\Administrator\Documents\newPtz\drivers</state>
<state>C:\Users\Administrator\Documents\newPtz\drivers\beep</state>
<state>$PROJ_DIR$\..\drivers\mb85rc64</state>
<state>$PROJ_DIR$\..\drivers\tmp75</state>
<state>$PROJ_DIR$\..\drivers</state>
<state>$PROJ_DIR$\..\drivers\beep</state>
</option>
<option>
<name>CCStdIncCheck</name>

View File

@ -2,11 +2,11 @@
\file gd32f4xx.h
\brief general definitions for GD32F4xx
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/* Copyright (c) 2012 ARM LIMITED
Copyright (c) 2024, GigaDevice Semiconductor Inc.
Copyright (c) 2025, GigaDevice Semiconductor Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@ -58,8 +58,8 @@
/* define value of high speed crystal oscillator (HXTAL) in Hz */
#if !defined (HXTAL_VALUE)
// #define HXTAL_VALUE ((uint32_t)25000000)
#define HXTAL_VALUE ((uint32_t)8000000)
// #define HXTAL_VALUE ((uint32_t)25000000)
#endif /* high speed crystal oscillator value */
/* define startup timeout value of high speed crystal oscillator (HXTAL) */

View File

@ -5,7 +5,7 @@
*/
/* Copyright (c) 2012 ARM LIMITED
Copyright (c) 2024, GigaDevice Semiconductor Inc.
Copyright (c) 2025, GigaDevice Semiconductor Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -2,11 +2,11 @@
; \file startup_gd32f405_425.s
; \brief start up file
;
; \version 2024-12-20, V3.3.1, firmware for GD32F4xx
; \version 2025-07-31, V3.3.2, firmware for GD32F4xx
;*/
;
;/* Copyright (c) 2012 ARM LIMITED
; Copyright (c) 2024, GigaDevice Semiconductor Inc.
; Copyright (c) 2025, GigaDevice Semiconductor Inc.
;
; All rights reserved.
; Redistribution and use in source and binary forms, with or without

View File

@ -2,11 +2,11 @@
; \file startup_gd32f407_427.s
; \brief start up file
;
; \version 2024-12-20, V3.3.1, firmware for GD32F4xx
; \version 2025-07-31, V3.3.2, firmware for GD32F4xx
;*/
;
;/* Copyright (c) 2012 ARM LIMITED
; Copyright (c) 2024, GigaDevice Semiconductor Inc.
; Copyright (c) 2025, GigaDevice Semiconductor Inc.
;
; All rights reserved.
; Redistribution and use in source and binary forms, with or without

View File

@ -2,11 +2,11 @@
; \file startup_gd32f450_470.s
; \brief start up file
;
; \version 2024-12-20, V3.3.1, firmware for GD32F4xx
; \version 2025-07-31, V3.3.2, firmware for GD32F4xx
;*/
;
;/* Copyright (c) 2012 ARM LIMITED
; Copyright (c) 2024, GigaDevice Semiconductor Inc.
; Copyright (c) 2025, GigaDevice Semiconductor Inc.
;
; All rights reserved.
; Redistribution and use in source and binary forms, with or without

View File

@ -2,11 +2,11 @@
; \file startup_gd32f405_425.s
; \brief start up file
;
; \version 2024-12-20, V3.3.1, firmware for GD32F4xx
; \version 2025-07-31, V3.3.2, firmware for GD32F4xx
;*/
;
;/* Copyright (c) 2012 ARM LIMITED
; Copyright (c) 2024, GigaDevice Semiconductor Inc.
; Copyright (c) 2025, GigaDevice Semiconductor Inc.
;
; All rights reserved.
; Redistribution and use in source and binary forms, with or without

View File

@ -2,11 +2,11 @@
; \file startup_gd32f407_427.s
; \brief start up file
;
; \version 2024-12-20, V3.3.1, firmware for GD32F4xx
; \version 2025-07-31, V3.3.2, firmware for GD32F4xx
;*/
;
;/* Copyright (c) 2012 ARM LIMITED
; Copyright (c) 2024, GigaDevice Semiconductor Inc.
; Copyright (c) 2025, GigaDevice Semiconductor Inc.
;
; All rights reserved.
; Redistribution and use in source and binary forms, with or without

View File

@ -2,11 +2,11 @@
; \file startup_gd32f450_470.s
; \brief start up file
;
; \version 2024-12-20, V3.3.1, firmware for GD32F4xx
; \version 2025-07-31, V3.3.2, firmware for GD32F4xx
;*/
;
;/* Copyright (c) 2012 ARM LIMITED
; Copyright (c) 2024, GigaDevice Semiconductor Inc.
; Copyright (c) 2025, GigaDevice Semiconductor Inc.
;
; All rights reserved.
; Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*/
/* Copyright (c) 2012 ARM LIMITED
Copyright (c) 2024, GigaDevice Semiconductor Inc.
Copyright (c) 2025, GigaDevice Semiconductor Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
@ -47,22 +47,27 @@
//#define __SYSTEM_CLOCK_120M_PLL_IRC16M (uint32_t)(120000000)
//#define __SYSTEM_CLOCK_120M_PLL_8M_HXTAL (uint32_t)(120000000)
//#define __SYSTEM_CLOCK_120M_PLL_25M_HXTAL (uint32_t)(120000000)
#if defined (GD32F405) || defined (GD32F407)
//#define __SYSTEM_CLOCK_168M_PLL_IRC16M (uint32_t)(168000000)
//#define __SYSTEM_CLOCK_168M_PLL_8M_HXTAL (uint32_t)(168000000)
//#define __SYSTEM_CLOCK_168M_PLL_25M_HXTAL (uint32_t)(168000000)
// #define __SYSTEM_CLOCK_168M_PLL_8M_HXTAL (uint32_t)(168000000)
// #define __SYSTEM_CLOCK_168M_PLL_25M_HXTAL (uint32_t)(168000000)
#endif
#if defined (GD32F450) || defined (GD32F425) || defined (GD32F427)
//#define __SYSTEM_CLOCK_200M_PLL_IRC16M (uint32_t)(200000000)
//#define __SYSTEM_CLOCK_200M_PLL_8M_HXTAL (uint32_t)(200000000)
#define __SYSTEM_CLOCK_200M_PLL_25M_HXTAL (uint32_t)(200000000)
// #define __SYSTEM_CLOCK_200M_PLL_8M_HXTAL (uint32_t)(200000000)
// #define __SYSTEM_CLOCK_200M_PLL_25M_HXTAL (uint32_t)(200000000)
#endif
#if defined (GD32F470)
//#define __SYSTEM_CLOCK_240M_PLL_25M_HXTAL (uint32_t)(240000000)
//#define __SYSTEM_CLOCK_240M_PLL_IRC16M (uint32_t)(240000000)
#define __SYSTEM_CLOCK_240M_PLL_8M_HXTAL (uint32_t)(240000000)
// #define __SYSTEM_CLOCK_240M_PLL_8M_HXTAL (uint32_t)(240000000)
// #define __SYSTEM_CLOCK_240M_PLL_25M_HXTAL (uint32_t)(240000000)
#endif
#define __SYSTEM_CLOCK_200M_PLL_8M_HXTAL (uint32_t)(200000000)
/* The following is to prevent Vcore fluctuations caused by frequency switching.
It is strongly recommended to include it to avoid issues caused by self-removal. */
#define RCU_MODIFY_4(__delay) do{ \
@ -187,9 +192,9 @@ void SystemInit (void)
if(((RCU_CFG0 & RCU_CFG0_SCSS) == RCU_SCSS_PLLP)){
RCU_MODIFY_4(0x50);
}
_soft_delay_(200);
RCU_CFG0 &= ~RCU_CFG0_SCS;
_soft_delay_(200);
/* Reset HXTALEN, CKMEN and PLLEN bits */
RCU_CTL &= ~(RCU_CTL_PLLEN | RCU_CTL_CKMEN | RCU_CTL_HXTALEN);

View File

@ -2,11 +2,11 @@
\file gd32f4xx_adc.h
\brief definitions for the ADC
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_can.h
\brief definitions for the CAN
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_crc.h
\brief definitions for the CRC
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_ctc.h
\brief definitions for the CTC
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_dac.h
\brief definitions for the DAC
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_dbg.h
\brief definitions for the DBG
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_dci.h
\brief definitions for the DCI
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -1,11 +1,11 @@
/*!
\file gd32f4xx_dma.h
\brief definitions for the DMA
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_enet.h
\brief definitions for the ENET
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:
@ -66,6 +66,9 @@ OF SUCH DAMAGE.
#ifndef _PHY_H_
#define DP83848 0
#define LAN8700 1
#define SR8201F 2
#define RTL8201F 2
#define YT8512 3
#define PHY_TYPE DP83848
#define PHY_ADDRESS ((uint16_t)1U) /*!< phy address determined by the hardware */
@ -107,6 +110,14 @@ OF SUCH DAMAGE.
#define PHY_SR 16U /*!< tranceiver status register */
#define PHY_SPEED_STATUS ((uint16_t)0x0002) /*!< configured information of speed: 10Mbit/s */
#define PHY_DUPLEX_STATUS ((uint16_t)0x0004) /*!< configured information of duplex: full-duplex */
#elif(PHY_TYPE == SR8201F)
#define PHY_SR PHY_REG_BCR /*!< tranceiver status register */
#define PHY_SPEED_STATUS ((uint16_t)0x2000) /*!< configured information of speed: 100Mbit/s */
#define PHY_DUPLEX_STATUS ((uint16_t)0x0100) /*!< configured information of duplex: full-duplex */
#elif(PHY_TYPE == YT8512)
#define PHY_SR 17U /*!< tranceiver status register */
#define PHY_SPEED_STATUS ((uint16_t)0x4000) /*!< configured information of speed: 100Mbit/s */
#define PHY_DUPLEX_STATUS ((uint16_t)0x2000) /*!< configured information of duplex: full-duplex */
#endif /* PHY_TYPE */
#endif /* _PHY_H_ */

View File

@ -2,11 +2,11 @@
\file gd32f4xx_exmc.h
\brief definitions for the EXMC
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -1,11 +1,11 @@
/*!
\file gd32f4xx_exti.h
\brief definitions for the EXTI
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_fmc.h
\brief definitions for the FMC
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_fwdgt.h
\brief definitions for the FWDGT
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_gpio.h
\brief definitions for the GPIO
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_i2c.h
\brief definitions for the I2C
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_ipa.h
\brief definitions for the IPA
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_iref.h
\brief definitions for the IREF
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -1,11 +1,11 @@
/*!
\file gd32f4xx_misc.h
\brief definitions for the MISC
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_pmu.h
\brief definitions for the PMU
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_rcu.h
\brief definitions for the RCU
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_rtc.c
\brief definitions for the RTC
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_sdio.h
\brief definitions for the SDIO
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_spi.h
\brief definitions for the SPI
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_syscfg.h
\brief definitions for the SYSCFG
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_timer.h
\brief definitions for the TIMER
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_tli.h
\brief definitions for the TLI
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_trng.h
\brief definitions for the TRNG
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_usart.h
\brief definitions for the USART
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_wwdgt.h
\brief definitions for the WWDGT
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_adc.c
\brief ADC driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_can.c
\brief CAN driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:
@ -452,6 +452,12 @@ uint8_t can_message_transmit(uint32_t can_periph, can_trasnmit_message_struct *t
}
/* set the data length */
CAN_TMP(can_periph, mailbox_number) &= ~CAN_TMP_DLENC;
/* Classic CAN frame data lenth does not exceed 8 */
if (transmit_message->tx_dlen > 8U) {
transmit_message->tx_dlen = 8U;
}
CAN_TMP(can_periph, mailbox_number) |= transmit_message->tx_dlen;
/* set the data */
CAN_TMDATA0(can_periph, mailbox_number) = TMDATA0_DB3(transmit_message->tx_data[3]) | \

View File

@ -2,11 +2,11 @@
\file gd32f4xx_crc.c
\brief CRC driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_ctc.c
\brief CTC driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_dac.c
\brief DAC driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_dbg.c
\brief DBG driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_dci.c
\brief DCI driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -1,11 +1,11 @@
/*!
\file gd32f4xx_dma.c
\brief DMA driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:
@ -761,10 +761,10 @@ void dma_flag_clear(uint32_t dma_periph, dma_channel_enum channelx, uint32_t fla
\retval none
*/
void dma_interrupt_enable(uint32_t dma_periph, dma_channel_enum channelx, uint32_t source)
{//DMA_CHXFCTL_FEEIE 7
if(DMA_CHXFCTL_FEEIE != source) {//不是7
{
if(DMA_CHXFCTL_FEEIE != source) {
DMA_CHCTL(dma_periph, channelx) |= source;
} else {//是7
} else {
DMA_CHFCTL(dma_periph, channelx) |= source;
}
}

View File

@ -2,11 +2,11 @@
\file gd32f4xx_enet.c
\brief ENET driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:
@ -389,6 +389,8 @@ ErrStatus enet_init(enet_mediamode_enum mediamode, enet_chksumconf_enum checksum
/* read the result of the auto-negotiation */
enet_phy_write_read(ENET_PHY_READ, PHY_ADDRESS, PHY_SR, &phy_value);
#if(PHY_TYPE == SR8201F || PHY_TYPE == YT8512)
/* configure the duplex mode of MAC following the auto-negotiation result */
if((uint16_t)RESET != (phy_value & PHY_DUPLEX_STATUS)) {
media_temp = ENET_MODE_FULLDUPLEX;
@ -396,11 +398,25 @@ ErrStatus enet_init(enet_mediamode_enum mediamode, enet_chksumconf_enum checksum
media_temp = ENET_MODE_HALFDUPLEX;
}
/* configure the communication speed of MAC following the auto-negotiation result */
if((uint16_t)RESET != (phy_value & PHY_SPEED_STATUS)) {
if((uint16_t)RESET !=(phy_value & PHY_SPEED_STATUS)){
media_temp |= ENET_SPEEDMODE_100M;
}else{
media_temp |= ENET_SPEEDMODE_10M;
}
#elif (PHY_TYPE == DP83848 || PHY_TYPE == LAN8700)
/* configure the duplex mode of MAC following the auto-negotiation result */
if((uint16_t)RESET != (phy_value & PHY_DUPLEX_STATUS)) {
media_temp = ENET_MODE_FULLDUPLEX;
} else {
media_temp = ENET_MODE_HALFDUPLEX;
}
/* configure the communication speed of MAC following the auto-negotiation result */
if((uint16_t)RESET !=(phy_value & PHY_SPEED_STATUS)){
media_temp |= ENET_SPEEDMODE_10M;
}else{
media_temp |= ENET_SPEEDMODE_100M;
}
#endif /* PHY_TYPE == SR8201F || PHY_TYPE == YT8512 */
} else {
phy_value = (uint16_t)((media_temp & ENET_MAC_CFG_DPM) >> 3);
phy_value |= (uint16_t)((media_temp & ENET_MAC_CFG_SPD) >> 1);

View File

@ -2,11 +2,11 @@
\file gd32f4xx_exmc.c
\brief EXMC driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -1,11 +1,11 @@
/*!
\file gd32f4xx_exti.c
\brief EXTI driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_fmc.c
\brief FMC driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_fwdgt.c
\brief FWDGT driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_gpio.c
\brief GPIO driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_i2c.c
\brief I2C driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:
@ -244,9 +244,9 @@ void i2c_master_addressing(uint32_t i2c_periph, uint32_t addr, uint32_t trandire
{
/* master is a transmitter or a receiver */
if(I2C_TRANSMITTER == trandirection) {
addr = addr & I2C_TRANSMITTER;//1110
addr = addr & I2C_TRANSMITTER;
} else {
addr = addr | I2C_RECEIVER;//0001
addr = addr | I2C_RECEIVER;
}
/* send slave address */
I2C_DATA(i2c_periph) = addr;

View File

@ -2,11 +2,11 @@
\file gd32f4xx_ipa.c
\brief IPA driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_iref.c
\brief IREF driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -1,11 +1,11 @@
/*!
\file gd32f4xx_misc.c
\brief MISC driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_pmu.c
\brief PMU driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:
@ -210,6 +210,8 @@ void pmu_to_sleepmode(uint8_t sleepmodecmd)
if(WFI_CMD == sleepmodecmd) {
__WFI();
} else {
__SEV();
__WFE();
__WFE();
}
}

View File

@ -2,11 +2,11 @@
\file gd32f4xx_rcu.c
\brief RCU driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_rtc.c
\brief RTC driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_sdio.c
\brief SDIO driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_spi.c
\brief SPI driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_syscfg.c
\brief SYSCFG driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_timer.c
\brief TIMER driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_tli.c
\brief TLI driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_trng.c
\brief TRNG driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_usart.c
\brief USART driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file gd32f4xx_wwdgt.c
\brief WWDGT driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file audio_core.h
\brief the header file of USB audio device class core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file audio_out_itf.h
\brief audio OUT (playback) interface header file
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file audio_core.c
\brief USB audio device class core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file audio_out_itf.c
\brief audio OUT (playback) interface functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file cdc_acm_core.h
\brief the header file of cdc acm driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file cdc_acm_core.c
\brief CDC ACM driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file dfu_core.h
\brief the header file of USB DFU device class core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file dfu_mem.h
\brief USB DFU device media access layer header file
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file dfu_core.c
\brief USB DFU device class core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file dfu_mem.c
\brief USB DFU device media access layer functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:
@ -146,7 +146,7 @@ uint8_t dfu_mem_write(uint8_t *buf, uint32_t addr, uint32_t len)
return MEM_FAIL;
}
if(OB_RDPT0 == (addr & MAL_MASK_OB)) {
if(((addr & MAL_MASK_OB) == OB_RDPT0) || ((addr & MAL_MASK_OB) == OB_RDPT1)) {
option_byte_write(addr, buf);
NVIC_SystemReset();

View File

@ -2,11 +2,11 @@
\file custom_hid_core.h
\brief definitions for HID core
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file standard_hid_core.h
\brief definitions for HID core
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file custom_hid_core.c
\brief custom HID class driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file standard_hid_core.c
\brief HID class driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usb_iap_core.h
\brief the header file of IAP driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usb_iap_core.c
\brief IAP driver
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_msc_bbb.h
\brief the header file of the usbd_msc_bbb.c file
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_msc_core.h
\brief the header file of USB MSC device class core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_msc_mem.h
\brief header file for storage memory
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_msc_scsi.h
\brief the header file of the usbd_msc_scsi.c file
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -3,11 +3,11 @@
\brief USB BBB(Bulk/Bulk/Bulk) protocol core functions
\note BBB means Bulk-only transport protocol for USB MSC
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_msc_core.c
\brief USB MSC device class core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_msc_scsi.c
\brief USB SCSI layer functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file printer_core.h
\brief the header file of USB printer device class core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file printer_core.c
\brief USB printer device class core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_core.h
\brief USB device mode core functions prototype
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_enum.h
\brief USB enumeration definitions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_transc.h
\brief USB transaction core functions prototype
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

View File

@ -2,11 +2,11 @@
\file usbd_core.c
\brief USB device mode core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:
@ -63,6 +63,9 @@ void usbd_init(usb_core_driver *udev, usb_core_enum core, usb_desc *desc, usb_cl
/* create serial string */
serial_string_get(udev->dev.desc->strings[STR_IDX_SERIAL]);
/* configure power management */
udev->dev.pm.power_mode = (udev->dev.desc->config_desc[7] & BIT(6)) >> 6;
/* configure USB capabilities */
(void)usb_basic_init(&udev->bp, &udev->regs, core);

View File

@ -2,11 +2,11 @@
\file usbd_enum.c
\brief USB enumeration function
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:
@ -359,8 +359,6 @@ static usb_reqsta _usb_std_getstatus(usb_core_driver *udev, usb_req *req)
if(udev->dev.pm.dev_remote_wakeup) {
status[0] |= USB_STATUS_REMOTE_WAKEUP;
} else {
status[0] = 0U;
}
req_status = REQ_SUPP;

View File

@ -2,11 +2,11 @@
\file usbd_transc.c
\brief USB transaction core functions
\version 2024-12-20, V3.3.1, firmware for GD32F4xx
\version 2025-07-31, V3.3.2, firmware for GD32F4xx
*/
/*
Copyright (c) 2024, GigaDevice Semiconductor Inc.
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:

Some files were not shown because too many files have changed in this diff Show More