100+ results for 'stm32 gpio'

Not the results you expected?

stm32f2xx_hal_tim_ex.h (https://github.com/feaser/openblt.git) C Header · 283 lines

1 /**

2 ******************************************************************************

3 * @file stm32f2xx_hal_tim_ex.h

4 * @author MCD Application Team

5 * @brief Header file of TIM HAL Extended module.

78 #define TIM_TIM2_USBHS_SOF (TIM_OR_ITR1_RMP_1 | TIM_OR_ITR1_RMP_0) /*!< TIM2 ITR1 is connected to OTG HS SOF */

79

80 #define TIM_TIM5_GPIO 0x00000000U /*!< TIM5 TI4 is connected to GPIO */

81 #define TIM_TIM5_LSI TIM_OR_TI4_RMP_0 /*!< TIM5 TI4 is connected to LSI */

82 #define TIM_TIM5_LSE TIM_OR_TI4_RMP_1 /*!< TIM5 TI4 is connected to LSE */

83 #define TIM_TIM5_RTC (TIM_OR_TI4_RMP_1 | TIM_OR_TI4_RMP_0) /*!< TIM5 TI4 is connected to the RTC wakeup interrupt */

84

85 #define TIM_TIM11_GPIO 0x00000000U /*!< TIM11 TI1 is connected to GPIO */

86 #define TIM_TIM11_HSE TIM_OR_TI1_RMP_1 /*!< TIM11 TI1 is connected to HSE_RTC clock */

87 /**

hal_gpio_stm32l4.c (https://github.com/alibaba/AliOS-Things.git) C · 557 lines

30 static int32_t gpio_para_transform(gpio_dev_t *gpio, GPIO_InitTypeDef * init_str);

31 static int32_t get_gpio_group(gpio_dev_t *gpio, GPIO_TypeDef **GPIOx);

32 static uint32_t get_gpio_pin(uint8_t pin);

33 int32_t gpio_has_priv(gpio_dev_t *gpio, GPIO_InitTypeDef * init_str);

34

35

223 }

224

225 int32_t hal_gpio_output_toggle(gpio_dev_t *gpio)

226 {

227 uint16_t pin = 0;

253 ret = get_gpio_group(gpio, &GPIOx);

254 if (ret == 0) {

255 *value = HAL_GPIO_ReadPin(GPIOx, get_gpio_pin(gpio->port));

256 };

257

PeripheralPins.c (https://github.com/stm32duino/Arduino_Core_STM32.git) C · 271 lines

54 {PB_4, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},

55 {PB_7, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},

56 {PB_9, I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},

57 {PB_11, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},

58 {PB_14, I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},

104 {PB_14, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N

105 {PB_15, TIM1, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N

106 {NC, NP, 0}

107 };

187 {PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},

188 {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},

189 {PD_1, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},

212 #ifdef HAL_QSPI_MODULE_ENABLED

213 WEAK const PinMap PinMap_QUADSPI_DATA0[] = {

214 {PB_9, QUADSPI, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_QUADSPI)}, // QUADSPI_BK1_IO0

215 {NC, NP, 0}

216 };

stm3210b_eval.h (https://github.com/miaojiazhen/quadcopter-STM32.git) C Header · 346 lines

219 #define SD_SPI_SCK_PIN GPIO_Pin_5 /* PA.05 */

220 #define SD_SPI_SCK_GPIO_PORT GPIOA /* GPIOA */

221 #define SD_SPI_SCK_GPIO_CLK RCC_APB2Periph_GPIOA

222 #define SD_SPI_MISO_PIN GPIO_Pin_6 /* PA.06 */

223 #define SD_SPI_MISO_GPIO_PORT GPIOA /* GPIOA */

224 #define SD_SPI_MISO_GPIO_CLK RCC_APB2Periph_GPIOA

228 #define SD_CS_PIN GPIO_Pin_12 /* PC.12 */

229 #define SD_CS_GPIO_PORT GPIOC /* GPIOC */

230 #define SD_CS_GPIO_CLK RCC_APB2Periph_GPIOC

231 #define SD_DETECT_PIN GPIO_Pin_7 /* PE.07 */

232 #define SD_DETECT_GPIO_PORT GPIOE /* GPIOE */

233 #define SD_DETECT_GPIO_CLK RCC_APB2Periph_GPIOE

247 #define sFLASH_SPI_SCK_PIN GPIO_Pin_5 /* PA.05 */

248 #define sFLASH_SPI_SCK_GPIO_PORT GPIOA /* GPIOA */

249 #define sFLASH_SPI_SCK_GPIO_CLK RCC_APB2Periph_GPIOA

Drive_Exti.c (https://github.com/WittXie/STM32.git) C · 320 lines

40 GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;//����

41 GPIO_Init(GPIOA, &GPIO_InitStructure);//��ʼ��GPIOE0,2

42

43 RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);//ʹÄÜSYSCFGʱÖÓ

124 GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;//����

125 GPIO_Init(GPIOC, &GPIO_InitStructure);//��ʼ��GPIOE0,2

126

127 RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);//ʹÄÜSYSCFGʱÖÓ

166 GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;//����

167 GPIO_Init(GPIOC, &GPIO_InitStructure);//��ʼ��GPIOE0,2

168

169 RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);//ʹÄÜSYSCFGʱÖÓ

291 GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;//����

292 GPIO_Init(GPIOF, &GPIO_InitStructure);//��ʼ��GPIOE0,2

293

294 RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);//ʹÄÜSYSCFGʱÖÓ

stm32l1xx_ip_dbg.c (https://github.com/rurume/stm32-test.git) C · 289 lines

172 /************************************* GPIO ***********************************/

173 GPIOA_DBG = (GPIO_TypeDef *) GPIOA_BASE;

174

175 GPIOB_DBG = (GPIO_TypeDef *) GPIOB_BASE;

177 GPIOC_DBG = (GPIO_TypeDef *) GPIOC_BASE;

178

179 GPIOD_DBG = (GPIO_TypeDef *) GPIOD_BASE;

180

181 GPIOE_DBG = (GPIO_TypeDef *) GPIOE_BASE;

182

183 GPIOF_DBG = (GPIO_TypeDef *) GPIOF_BASE;

184

185 GPIOG_DBG = (GPIO_TypeDef *) GPIOG_BASE;

186

187 GPIOH_DBG = (GPIO_TypeDef *) GPIOH_BASE;

188

189 /************************************* I2C ************************************/

event_groups.d (https://bitbucket.org/Dusty95/imu-ik01a2.git) D · 146 lines

19 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \

20 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \

21 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \

25 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash.h \

26 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ex.h \

27 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_flash_ramfunc.h \

60 C:/Projects/AC6Workspace/Proba/Inc/stm32f4xx_hal_conf.h:

61

62 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:

63

64 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:

86 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:

87

88 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:

89

90 C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:

board.c (https://github.com/ChibiOS/ChibiOS.git) C · 266 lines

93 #if STM32_HAS_GPIOA

94 {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,

95 VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},

97 #if STM32_HAS_GPIOB

98 {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,

99 VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},

101 #if STM32_HAS_GPIOC

102 {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,

103 VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},

105 #if STM32_HAS_GPIOD

106 {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,

107 VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},

141 /*===========================================================================*/

142

143 static void gpio_init(stm32_gpio_t *gpiop, const gpio_setup_t *config) {

144

145 gpiop->OTYPER = config->otyper;

usbh_msc_fatfs.d (https://bitbucket.org/trottagio/stm32f4-discovery-firmware-makefile.git) D · 56 lines

10 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\inc\stm32f4xx_conf.h

11 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_adc.h

12 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\CMSIS\ST\STM32F4xx\Include\stm32f4xx.h

13 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_can.h

14 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_crc.h

23 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_hash.h

24 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_gpio.h

25 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_i2c.h

28 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_rcc.h

29 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_rng.h

30 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_rtc.h

50 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32_USB_OTG_Driver\inc\usb_bsp.h

51 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Utilities\STM32F4-Discovery\stm32f4_discovery.h

52 .\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32_USB_HOST_Library\Core\inc\usbh_ioreq.h

wiced_cooee.d (https://gitlab.com/jakubrak/wiced-sdk-3-0-1) D · 135 lines

73 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_adc.h \

74 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_can.h \

75 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_crc.h \

84 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_hash.h \

85 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_gpio.h \

86 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_i2c.h \

89 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_rcc.h \

90 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_rng.h \

91 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_rtc.h \

100 WICED/platform/MCU/STM32F4xx/peripherals/libraries/STM32_CPAL_Driver/inc/cpal_i2c.h \

101 WICED/platform/MCU/STM32F4xx/peripherals/libraries/STM32_CPAL_Driver/devices/stm32f4xx/cpal_i2c_hal_stm32f4xx.h \

102 WICED/platform/MCU/STM32F4xx/peripherals/libraries/STM32_CPAL_Driver/inc/cpal.h \

103 WICED/platform/MCU/STM32F4xx/peripherals/libraries/STM32_CPAL_Driver/inc/cpal_conf_template.h \

104 platforms/STM32F4DISCOVERY_SN8000x/./platform.h include/wiced_rtos.h \

SDK_EVAL_Spirit_Gpio.d (https://github.com/DanieleWRL/Thingsquare-Contiki-O.S-Porting-STM32F4-Discovery.git) D · 52 lines

25 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_adc.h

26 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/contiki/cpu/arm/stm32f4xx/stm32f4xx.h

27 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_can.h

37 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_hash.h

38 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_gpio.h

39 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_i2c.h

40 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_iwdg.h

41 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_pwr.h

47 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_syscfg.h

48 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_tim.h

49 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_usart.h

50 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_wwdg.h

51 obj_mist-spirit1-F4/SDK_EVAL_Spirit_Gpio.o: /cygdrive/c/cygwin/home/Administrator/thingsquare-mist-1.0.1/platform/mist-spirit1-F4/STM32F4xx_StdPeriph_Driver/inc/misc.h

Stream.d (https://bitbucket.org/waymond91/fpv_bot.git) D · 109 lines

12 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/device/stm32f4xx.h \

13 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/device/stm32f446xx.h \

14 /home/pi/.platformio/packages/framework-mbed/cmsis/TARGET_CORTEX_M/core_cm4.h \

15 /home/pi/.platformio/packages/framework-mbed/cmsis/TARGET_CORTEX_M/cmsis_version.h \

17 /home/pi/.platformio/packages/framework-mbed/cmsis/TARGET_CORTEX_M/cmsis_gcc.h \

18 /home/pi/.platformio/packages/framework-mbed/cmsis/TARGET_CORTEX_M/mpu_armv7.h \

19 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/device/system_stm32f4xx.h \

20 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal.h \

23 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_def.h \

24 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F446xE/device/stm32f4xx.h \

25 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/device/stm32_hal_legacy.h \

27 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_gpio.h \

28 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_gpio_ex.h \

29 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_dma.h \

54 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_i2c_ex.h \

55 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_i2s.h \

56 /home/pi/.platformio/packages/framework-mbed/targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_i2s_ex.h \

stm32_leds.c (https://bitbucket.org/sanyaade/nuttx_boards.git) C · 311 lines

86 if ((clrbits & BOARD_LED1_BIT) != 0)

87 {

88 stm32_gpiowrite(GPIO_LED1, false);

89 }

90

152 /* Configure LED1-4 GPIOs for output. Initial state is OFF */

153

154 stm32_configgpio(GPIO_LED1);

155 stm32_configgpio(GPIO_LED2);

205

206 case 4:

207 stm32_gpiowrite(GPIO_LED4, false);

208 break;

209 }

244

245 case 4:

246 stm32_gpiowrite(GPIO_LED4, true);

247 break;

248 }

STM32F4_BlConfig.cpp (https://github.com/NETMF/netmf-interpreter.git) C++ · 145 lines

6 //

7 // Copyright (c) Microsoft Corporation. All rights reserved.

8 // Implementation for the MCBSTM32F400 board (STM32F4): Copyright (c) Oberon microsystems, Inc.

9 //

10 // *** STM32F4DISCOVERY Block Storage Configuration ***

41 #define STM32F4__SIZE_IN_BYTES 0x00100000

42 #define STM32F4__WP_GPIO_PIN GPIO_PIN_NONE

43 #define STM32F4__WP_ACTIVE FALSE

68 };

69

70 const BlockRegionInfo g_STM32F4_BlkRegion[STM32F4__NUM_REGIONS] =

71 {

72 {

117 { // BLOCK_CONFIG

118 {

119 STM32F4__WP_GPIO_PIN, // GPIO_PIN Pin;

120 STM32F4__WP_ACTIVE, // BOOL ActiveState;

main.c (https://bitbucket.org/adi_saha/microprocessor-systems.git) C · 259 lines

80 // GPIOB_Init.Mode = GPIO_MODE_OUTPUT_PP;

81 // GPIOB_Init.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14;

82 // GPIOB_Init.Pull = GPIO_NOPULL;

93 // GPIOC_Init.Mode = GPIO_MODE_INPUT;

94 // GPIOC_Init.Pin = GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6;

95 // GPIOC_Init.Pull = GPIO_PULLUP;

139 // if(HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_4) == GPIO_PIN_RESET){

140 // HAL_GPIO_WritePin(GPIOC, GPIO_PIN_4, GPIO_PIN_SET);

141 // interrupt_4 = 0;

142 // while(interrupt_4 < 150);

143 // if(HAL_GPIO_ReadPin(GPIOC, GPIO_PIN_4) == GPIO_PIN_RESET){

144 // printf("1\n");

145 // HAL_GPIO_WritePin(GPIOC, GPIO_PIN_4, GPIO_PIN_SET);

146 // }

147 // }

stm32_exti.h (https://bitbucket.org/sanyaade/nuttx_arch.git) C Header · 131 lines

48 */

49

50 #if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX)

51

52 /************************************************************************************

69 /* Register Addresses ***************************************************************/

70

71 #define STM32_EXTI_IMR (STM32_EXTI_BASE+STM32_EXTI_IMR_OFFSET)

72 #define STM32_EXTI_EMR (STM32_EXTI_BASE+STM32_EXTI_EMR_OFFSET)

75 #define STM32_EXTI_SWIER (STM32_EXTI_BASE+STM32_EXTI_SWIER_OFFSET)

76 #define STM32_EXTI_PR (STM32_EXTI_BASE+STM32_EXTI_PR_OFFSET)

77

78 /* Register Bitfield Definitions ****************************************************/

128 #define EXTI_IMR_MASK STM32_EXTI_MASK

129

130 #endif /* CONFIG_STM32F7_STM32F74XX || CONFIG_STM32F7_STM32F75XX */

131 #endif /* __ARCH_ARM_SRC_STM32F7_CHIP_STM32_EXTI_H */

stm32f7xx_it.c (https://bitbucket.org/oh5fsz/asig-stm32f7-dsp.git) C · 398 lines

1 /**

2 ******************************************************************************

3 * @file stm32f7xx_it.c

4 * @brief Interrupt Service Routines.

5 ******************************************************************************

32 */

33 /* Includes ------------------------------------------------------------------*/

34 #include "stm32f7xx_hal.h"

35 #include "stm32f7xx.h"

36 #include "stm32f7xx_it.h"

37 #include "cmsis_os.h"

38

288

289 /* USER CODE END EXTI15_10_IRQn 0 */

290 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_14);

291 /* USER CODE BEGIN EXTI15_10_IRQn 1 */

292

stm32_spi.c (https://bitbucket.org/hg42/nuttx.git) C · 194 lines

54 #include "photon.h"

55

56 #if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3)

57

58 /************************************************************************************

75

76 /****************************************************************************

77 * Name: stm32_spi1/2/3select and stm32_spi1/2/3status

78 *

79 * Description:

87 * 1. Provide logic in stm32_boardinitialize() to configure SPI chip select

88 * pins.

89 * 2. Provide stm32_spi1/2/3select() and stm32_spi1/2/3status() functions in your

90 * board-specific logic. These functions will perform chip selection and

91 * status operations using GPIOs in the way your board is configured.

192 #endif /* CONFIG_SPI_CMDDATA */

193

194 #endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI2 */

195

IO_Init.cpp (https://github.com/NETMF/netmf-interpreter.git) C++ · 105 lines

22 // Workaround, since CPU_GPIO_DisablePin() does not correctly initialize pin speeds

23 extern void STM32F4_GPIO_Pin_Config(GPIO_PIN pin, UINT32 mode, GPIO_RESISTOR resistor, UINT32 alternate);

24

25

63 PORT_PIN(GPIO_PORTC, 0),

64 // PD0, 1, 8-10, 14, 15

65 PORT_PIN(GPIO_PORTD, 0), PORT_PIN(GPIO_PORTD, 1), PORT_PIN(GPIO_PORTD, 8), PORT_PIN(GPIO_PORTD, 9),

66 PORT_PIN(GPIO_PORTD, 10), PORT_PIN(GPIO_PORTD, 14), PORT_PIN(GPIO_PORTD, 15),

72 PORT_PIN(GPIO_PORTF, 0), PORT_PIN(GPIO_PORTF, 1), PORT_PIN(GPIO_PORTF, 2), PORT_PIN(GPIO_PORTF, 3),

73 PORT_PIN(GPIO_PORTF, 4), PORT_PIN(GPIO_PORTF, 5), PORT_PIN(GPIO_PORTF, 11), PORT_PIN(GPIO_PORTF, 12),

74 PORT_PIN(GPIO_PORTF, 13), PORT_PIN(GPIO_PORTF, 14), PORT_PIN(GPIO_PORTF, 15),

75 // PG0, 1, 4, 5, 8, 15

76 PORT_PIN(GPIO_PORTG, 0), PORT_PIN(GPIO_PORTG, 1), PORT_PIN(GPIO_PORTG, 4), PORT_PIN(GPIO_PORTG, 5),

77 PORT_PIN(GPIO_PORTG, 8), PORT_PIN(GPIO_PORTG, 15)

adc.c (https://github.com/avikde/koduino.git) C · 207 lines

64

65 void adcInit(ADC_TypeDef *ADCx) {

66 #if defined(SERIES_STM32F37x) || defined(SERIES_STM32F30x)

67 // was causing problems if initing multiple ADCs

68 // ADC_DeInit(ADCx);

79

80 // Continuous conv

81 #if defined(SERIES_STM32F37x) || defined(SERIES_STM32F10x) || defined(SERIES_STM32F4xx)

82 ADC_InitStructure.ADC_ScanConvMode = DISABLE;

83 #endif

138 #if defined(STM32F303xC)

139 // PC4 and PC5 on ADC2

140 if ((PIN_MAP[pin].port==GPIOC && PIN_MAP[pin].pin==4) || (PIN_MAP[pin].port==GPIOC && PIN_MAP[pin].pin==5))

141 ADCx = ADC2;

142 #endif

fput_debug.d (https://bitbucket.org/adi_saha/microprocessor-systems.git) D · 44 lines

12 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h

13 .\objects\fput_debug.o: C:\Users\asaha2\Downloads\Github\microprocessor-systems\peripherals-interrupts-and-timers\Lab3_STM32F4Cube_Base_project\RTE\Device\STM32F407VGTx\stm32f4xx_hal_conf.h

14 .\objects\fput_debug.o: C:\Users\asaha2\Downloads\Github\microprocessor-systems\peripherals-interrupts-and-timers\Lab3_STM32F4Cube_Base_project\RTE\RTE_Components.h

15 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc.h

16 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h

19 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h

20 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h

21 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h

26 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc_ex.h

27 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h

28 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h

43 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_uart.h

44 .\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_usart.h

45

main.d (https://bitbucket.org/adi_saha/microprocessor-systems.git) D · 52 lines

10 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_def.h

11 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h

12 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f407xx.h

16 .\objects\main.o: C:\Keil_v5\ARM\PACK\ARM\CMSIS\4.5.0\CMSIS\Include\core_cmFunc.h

17 .\objects\main.o: C:\Keil_v5\ARM\PACK\ARM\CMSIS\4.5.0\CMSIS\Include\core_cmSimd.h

18 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h

19 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal.h

21 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rcc_ex.h

22 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio.h

23 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_gpio_ex.h

27 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc.h

28 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_adc_ex.h

29 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h

38 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr.h

39 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_pwr_ex.h

40 .\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_rtc.h

usb_otg.c (https://github.com/alibaba/AliOS-Things.git) C · 150 lines

75 {

76

77 GPIO_InitTypeDef GPIO_InitStruct;

78 if(pcdHandle->Instance==USB_OTG_FS)

79 {

95 GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;

96 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

97

98 GPIO_InitStruct.Pin = USB_VBUS_Pin;

100 GPIO_InitStruct.Pull = GPIO_NOPULL;

101 HAL_GPIO_Init(USB_VBUS_GPIO_Port, &GPIO_InitStruct);

102

103 /* USB_OTG_FS clock enable */

127 PA12 ------> USB_OTG_FS_DP

128 */

129 HAL_GPIO_DeInit(GPIOA, USB_SOF_Pin|USB_VBUS_Pin|USB_ID_Pin|USB_DM_Pin

130 |USB_DP_Pin);

131

spi.c (https://github.com/alibaba/AliOS-Things.git) C · 153 lines

40 /* Includes ------------------------------------------------------------------*/

41 #include "aos/hal/spi.h"

42 #include "stm32f1xx_hal.h"

43 #include "aos/hal/gpio.h"

53 {

54

55 GPIO_InitTypeDef GPIO_InitStruct;

56 if(spiHandle->Instance==SPI1)

57 {

stm32_adc.c (https://bitbucket.org/hg42/nuttx.git) C · 163 lines

1 /************************************************************************************

2 * configs/stm3220g-eval/src/stm32_adc.c

3 *

4 * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved.

74 #endif

75

76 #if defined(CONFIG_STM32_ADC1) || defined(CONFIG_STM32_ADC2) || defined(CONFIG_STM32_ADC3)

77 #ifndef CONFIG_STM32_ADC3

128 for (i = 0; i < ADC3_NCHANNELS; i++)

129 {

130 stm32_configgpio(g_pinlist[i]);

131 }

132

160 }

161

162 #endif /* CONFIG_STM32_ADC1 || CONFIG_STM32_ADC2 || CONFIG_STM32_ADC3 */

163 #endif /* CONFIG_ADC */

164

stm32l4_exti_wakeup.c (https://bitbucket.org/hg42/nuttx.git) C · 153 lines

1 /****************************************************************************

2 * arch/arm/src/stm32l4/stm32l4_exti_wakeup.c

3 *

4 * Copyright (C) 2009, 2012, 2017 Gregory Nutt. All rights reserved.

51 #include "up_arch.h"

52 #include "chip.h"

53 #include "stm32l4_gpio.h"

54 #include "stm32l4_exti.h"

98

99 /****************************************************************************

100 * Name: stm32l4_exti_wakeup

101 *

102 * Description:

124 if (func)

125 {

126 irq_attach(STM32L4_IRQ_RTC_WKUP, stm32l4_exti_wakeup_isr, NULL);

127 up_enable_irq(STM32L4_IRQ_RTC_WKUP);

am_stm32f103rbt6_usart.h (https://github.com/zlgopen/ametal.git) C Header · 173 lines

77

78 /**

79 * \brief �������ñ�־��AMHW_STM32F103RBT6_USART_DATA_*����AMHW_STM32F103RBT6_USART_PARITY_*��

80 * ��AMHW_STM32F103RBT6_USART_STOP_*�Ļ�ֵ

87

88 /**

89 * \brief ָ��ʹ�ܵ������ж�,AMHW_STM32F103RBT6_USART_INT_*��ֵ������AMHW_STM32F103RBT6_USART_INT_*����

90 * ��ֵ������(# AMHW_STM32F103RBT6237_USART_INT_TX_EMPTY_ENABLE),

151 * \return USART±ê×¼·þÎñ²Ù×÷¾ä±ú£¬ÖµÎªNULLʱ±íÃ÷³õʼ»¯Ê§°Ü

152 */

153 am_uart_handle_t am_stm32f103rbt6_usart_init(am_stm32f103rbt6_usart_dev_t *p_dev,

154 const am_stm32f103rbt6_usart_devinfo_t *p_devinfo);

160 * \param[in] p_dev : Ö¸Ïò´®¿ÚÉ豸µÄÖ¸Õë

161 */

162 void am_stm32f103rbt6_usart_deinit (am_stm32f103rbt6_usart_dev_t *p_dev);

163 /**

164 * @}

stm32_adc.c (https://bitbucket.org/zapparello/nuttx.git) C · 227 lines

1 /****************************************************************************

2 * boards/arm/stm32h7/stm32h747i-disco/src/stm32_adc.c

3 *

4 * Copyright (C) 2019 Gregory Nutt. All rights reserved.

91 /* Configurations of pins used by each ADC channels

92 *

93 * ADC1: {GPIO_ADC12_INP5, GPIO_ADC123_INP10, GPIO_ADC123_INP12,

94 * GPIO_ADC12_INP13, GPIO_ADC12_INP15};

97 static const uint32_t g_adc1_pinlist[ADC1_NCHANNELS] =

98 {

99 GPIO_ADC12_INP5, GPIO_ADC123_INP10, GPIO_ADC123_INP12, GPIO_ADC12_INP13,

100 GPIO_ADC12_INP15

224 }

225

226 #endif /* CONFIG_STM32H7_ADC1 || CONFIG_STM32H7_ADC2 || CONFIG_STM32H7_ADC3 */

227 #endif /* CONFIG_ADC */

228

platform_int.c (https://bitbucket.org/cicamargoba/stamp.git) C · 414 lines

260 static int int_gpio_posedge_set_status( elua_int_resnum resnum, int status )

261 {

262 return gpioh_set_int_status( INT_GPIO_POSEDGE, resnum, status );

263 }

264

283 static int int_gpio_negedge_get_status( elua_int_resnum resnum )

284 {

285 return gpioh_get_int_status( INT_GPIO_NEGEDGE, resnum );

286 }

287

288 static int int_gpio_negedge_get_flag( elua_int_resnum resnum, int clear )

289 {

290 return gpioh_get_int_flag( INT_GPIO_NEGEDGE, resnum, clear );

291 }

292

409 { int_gpio_posedge_set_status, int_gpio_posedge_get_status, int_gpio_posedge_get_flag },

410 { int_gpio_negedge_set_status, int_gpio_negedge_get_status, int_gpio_negedge_get_flag },

411 { int_tmr_match_set_status, int_tmr_match_get_status, int_tmr_match_get_flag },

412 { int_uart_rx_set_status, int_uart_rx_get_status, int_uart_rx_get_flag }

stm32h7xx_hal_msp.c (https://github.com/STMicroelectronics/STM32CubeH7.git) C · 192 lines

95 GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;

96 HAL_GPIO_Init(QSPI_BK1_D0_GPIO_PORT, &GPIO_InitStruct);

97

98 /* QSPI D1 GPIO pin configuration */

100 GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;

101 HAL_GPIO_Init(QSPI_BK1_D1_GPIO_PORT, &GPIO_InitStruct);

102

103 /* QSPI D2 GPIO pin configuration */

105 GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;

106 HAL_GPIO_Init(QSPI_BK1_D2_GPIO_PORT, &GPIO_InitStruct);

107

108 /* QSPI D3 GPIO pin configuration */

132 GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;

133 HAL_GPIO_Init(QSPI_BK2_D3_GPIO_PORT, &GPIO_InitStruct);

134

135 /*##-3- Configure the NVIC for QSPI #########################################*/

stm32h7xx_hal_msp.c (https://github.com/STMicroelectronics/STM32CubeH7.git) C · 184 lines

73 /* GPIOD configuration */

74 gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_3| GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 |\

75 GPIO_PIN_7 | GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 |\

79 /* GPIOE configuration */

80 gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_3| GPIO_PIN_4 | GPIO_PIN_7 |\

81 GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 |\

85 /* GPIOF configuration */

86 gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\

87 GPIO_PIN_5 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;

91 /* GPIOG configuration */

92 gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 |\

93 GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14;

96 /* GPIOH configuration */

97 gpio_init_structure.Pin = /*GPIO_PIN_3 | GPIO_PIN_6 |*/ GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 |\

98 GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15;

stm32f7xx_hal_msp.c (https://github.com/STMicroelectronics/STM32CubeF7.git) C · 138 lines

109 /*## Disable peripherals and GPIO Clocks ###################################*/

110 /* Configure FMC as alternate function */

111 HAL_GPIO_DeInit(GPIOD, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 |\

112 GPIO_PIN_7 | GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 |\

113 GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15);

114

115 HAL_GPIO_DeInit(GPIOE, GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 |\

116 GPIO_PIN_7 | GPIO_PIN_8 | GPIO_PIN_9 | GPIO_PIN_10 | GPIO_PIN_11 |\

117 GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15);

118

119 HAL_GPIO_DeInit(GPIOF, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\

120 GPIO_PIN_5 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 | GPIO_PIN_15);

121

122 HAL_GPIO_DeInit(GPIOG, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\

123 GPIO_PIN_5);

stm32f7xx_it.c (https://github.com/STMicroelectronics/STM32CubeF7.git) C · 207 lines

1 /**

2 ******************************************************************************

3 * @file USB_Device/DualCore_Standalone/Src/stm32f7xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

21

22 /* Includes ------------------------------------------------------------------*/

23 #include "stm32f7xx_it.h"

24

25 /* Private typedef -----------------------------------------------------------*/

31 extern PCD_HandleTypeDef hpcd;

32 extern USBD_HandleTypeDef USBD_Device_FS;

33 /* SD handler declared in "stm32746g_discovery_sd.c" file */

34 extern SD_HandleTypeDef uSdHandle;

35 /* Private function prototypes -----------------------------------------------*/

stm32_bringup.c (https://github.com/apache/incubator-nuttx.git) C · 182 lines

1 /****************************************************************************

2 * boards/arm/stm32/nucleo-f4x1re/src/stm32_bringup.c

3 *

4 * Copyright (C) 2014, 2016, 2019 Gregory Nutt. All rights reserved.

66

67 /****************************************************************************

68 * Name: stm32_bringup

69 *

70 * Description:

90 struct spi_dev_s *spi;

91

92 spi = stm32_spibus_initialize(1);

93 if (!spi)

94 {

100 #ifdef CONFIG_STM32_SPI1

101 stm32_configgpio(GPIO_MCP2515_CS); /* MEMS chip select */

102 #endif

103

stm32_nrf24l01.c (https://github.com/apache/incubator-nuttx.git) C · 155 lines

1 /****************************************************************************

2 * boards/arm/stm32/common/src/stm32_nrf24l01.c

3 *

4 * Copyright (C) 2017 Gregory Nutt. All rights reserved.

97 g_isr = isr;

98 g_arg = arg;

99 stm32_gpiosetevent(BOARD_NRF24L01_GPIO_IRQ, false, true, false,

100 g_isr, g_arg);

101 return OK;

105 {

106 wlinfo("CE:%d\n", enable);

107 stm32_gpiowrite(BOARD_NRF24L01_GPIO_CE, enable);

108 }

109

133 /* Setup CE & IRQ line IOs */

134

135 stm32_configgpio(BOARD_NRF24L01_GPIO_CE);

136 stm32_configgpio(BOARD_NRF24L01_GPIO_IRQ);

main.h (https://github.com/STMicroelectronics/STM32CubeL4.git) C Header · 127 lines

31 #define OSPI_CS_PIN GPIO_PIN_2

32 #define OSPI_CS_GPIO_PORT GPIOA

33 #define OSPI_CLK_PIN GPIO_PIN_3

34 #define OSPI_CLK_GPIO_PORT GPIOA

35 #define OSPI_D0_PIN GPIO_PIN_1

39 #define OSPI_D2_PIN GPIO_PIN_7

40 #define OSPI_D2_GPIO_PORT GPIOA

41 #define OSPI_D3_PIN GPIO_PIN_6

110 #define OSPI_D2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()

111 #define OSPI_D3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()

112 #define OSPI_D4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE()

114 #define OSPI_D6_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()

115 #define OSPI_D7_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()

116 #define OSPI_DQS_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()

ext_lld.h (https://bitbucket.org/minux/chibios.git) C Header · 153 lines

44 #define EXT_MODE_GPIO_OFF 4 /**< @brief Port field offset. */

45 #define EXT_MODE_GPIOA 0x00 /**< @brief GPIOA identifier. */

46 #define EXT_MODE_GPIOB 0x10 /**< @brief GPIOB identifier. */

47 #define EXT_MODE_GPIOC 0x20 /**< @brief GPIOC identifier. */

48 #define EXT_MODE_GPIOD 0x30 /**< @brief GPIOD identifier. */

49 #define EXT_MODE_GPIOE 0x40 /**< @brief GPIOE identifier. */

50 #define EXT_MODE_GPIOF 0x50 /**< @brief GPIOF identifier. */

51 #define EXT_MODE_GPIOG 0x60 /**< @brief GPIOG identifier. */

52 #define EXT_MODE_GPIOH 0x70 /**< @brief GPIOH identifier. */

53 #define EXT_MODE_GPIOI 0x80 /**< @brief GPIOI identifier. */

54 /** @} */

55

platform_config.h (https://github.com/pellepl/arcadehid.git) C Header · 117 lines

30 /* Uncomment the line corresponding to the STMicroelectronics evaluation board

31 used to run the example */

32 #if !defined (USE_STM32100B_EVAL) && !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) && !defined (USE_STM32100E_EVAL)

33 //#define USE_STM32100B_EVAL

62 #define USARTz_IRQn USART2_IRQn

63

64 #elif defined (USE_STM3210E_EVAL) || defined (USE_STM32100E_EVAL)

65

66 #define USARTy USART1

88

89 #define USARTy USART2

90 #define USARTy_GPIO GPIOD

91 #define USARTy_CLK RCC_APB1Periph_USART2

92 #define USARTy_GPIO_CLK RCC_APB2Periph_GPIOD

100 #define USARTz_GPIO GPIOC

101 #define USARTz_CLK RCC_APB1Periph_USART3

102 #define USARTz_GPIO_CLK RCC_APB2Periph_GPIOC

103 #define USARTz_RxPin GPIO_Pin_11

main.c (https://github.com/afiskon/stm32-ssd1306.git) C · 224 lines

157 {

158

159 GPIO_InitTypeDef GPIO_InitStruct;

160

161 /* GPIO Ports Clock Enable */

166 /*Configure GPIO pin Output Level */

167 HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET);

168

169 /*Configure GPIO pin : PC13 */

170 GPIO_InitStruct.Pin = GPIO_PIN_13;

171 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

172 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;

173 HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);

174

175 }

usbd_cdc.d (https://github.com/zapta/misc.git) D · 133 lines

20 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h \

21 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h \

22 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h \

35 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_pwr_ex.h \

36 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_spi.h \

37 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h \

85 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:

86

87 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:

88

89 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_exti.h:

95 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_cortex.h:

96

97 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc.h:

98

99 ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_adc_ex.h:

usart_dma.c (https://github.com/fcayci/libopencm3.git) C · 200 lines

28 rcc_clock_setup_in_hse_12mhz_out_72mhz();

29

30 /* Enable GPIOA, GPIOB, GPIOC clock. */

31 rcc_peripheral_enable_clock(&RCC_APB2ENR,

32 RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN |

43 void usart_setup(void)

44 {

45 /* Setup GPIO pin GPIO_USART2_TX and GPIO_USART2_RX. */

46 gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,

156 /* Set GPIO8 (in GPIO port A) to 'output push-pull'. */

157 gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_2_MHZ,

158 GPIO_CNF_OUTPUT_PUSHPULL, GPIO8);

177 /* Blink the LED (PA8) on the board with every transmitted byte. */

178 while (1) {

179 gpio_toggle(GPIOA, GPIO8); /* LED on/off */

180 while ( transfered != 1) {

181 if (received == 1) {

i2c.c (https://gitlab.com/MujibAzizi/cpkn.git) C · 165 lines

2 //EEPROM LIB v 1.0

3 //******************************************************************************/

4 #include "stm32f10x_gpio.h"

5 #include "stm32f10x_i2c.h"

19

20 I2C_InitTypeDef I2C_InitStructure;

21 GPIO_InitTypeDef GPIO_InitStructure;

22

23 RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C1,ENABLE);

26

27 /* Configure I2C1 pins: PB6->SCL and PB7->SDA */

28 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7;

29 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

30 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;

31 GPIO_Init(GPIOB, &GPIO_InitStructure);

stm32g4.dtsi (https://github.com/methodpark/zephyr.git) Device Tree · 488 lines

9 #include <dt-bindings/clock/stm32_clock.h>

10 #include <dt-bindings/i2c/i2c.h>

11 #include <dt-bindings/gpio/gpio.h>

12

13 / {

105 };

106

107 gpioc: gpio@48000800 {

108 compatible = "st,stm32-gpio";

263

264 spi2: spi@40003800 {

265 compatible = "st,stm32-spi-fifo", "st,stm32-spi";

266 #address-cells = <1>;

267 #size-cells = <0>;

274

275 spi3: spi@40003c00 {

276 compatible = "st,stm32-spi-fifo", "st,stm32-spi";

277 #address-cells = <1>;

278 #size-cells = <0>;

spi_driver.md (https://github.com/qmk/qmk_firmware.git) Markdown · 138 lines

19 ## ChibiOS/ARM Configuration

20

21 You'll need to determine which pins can be used for SPI -- as an example, STM32 parts generally have multiple SPI peripherals, labeled SPI1, SPI2, SPI3 etc.

22

23 To enable SPI, modify your board's `halconf.h` to enable SPI - both `HAL_USE_SPI` and `SPI_USE_WAIT` should be `TRUE`, and `SPI_SELECT_MODE` should be `SPI_SELECT_MODE_PAD`.

24 Then, modify your board's `mcuconf.h` to enable the SPI peripheral you've chosen -- in the case of using SPI2, modify `STM32_SPI_USE_SPI2` to be `TRUE`.

25

26 As per the AVR configuration, you may select any other standard GPIO as a slave select pin, and can be supplied to `spi_start()`.

27

28 Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303.

29

30 `config.h` override | Description | Default Value

stm32f4xx_it.c (https://github.com/Bosvark/STM32Cube_FW_F4_V1.1.0.git) C · 238 lines

1 /**

2 ******************************************************************************

3 * @file BSP/Src/stm32f4xx_it.c

4 * @author MCD Application Team

5 * @version V1.0.1

39

40 /* Includes ------------------------------------------------------------------*/

41 #include "stm32f4xx_it.h"

42

43

185 void EXTI2_IRQHandler(void)

186 {

187 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2);

188 }

189

variant.h (https://github.com/stm32duino/Arduino_Core_STM32.git) C Header · 192 lines

29 */

30

31 #ifndef _VARIANT_ARDUINO_STM32_

32 #define _VARIANT_ARDUINO_STM32_

155

156 // Timer Definitions

157 // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin

158 #define TIMER_TONE TIM6

159 #define TIMER_SERVO TIM7

190 #endif

191

192 #endif /* _VARIANT_ARDUINO_STM32_ */

193

stm32f4xx_conf.h (https://github.com/ginge/FreeRTOS-Pebble.git) C Header · 157 lines

1 /**

2 ******************************************************************************

3 * @file Project/STM32F4xx_StdPeriph_Templates/stm32f4xx_conf.h

4 * @author MCD Application Team

5 * @version V1.6.1

45 #include "stm32f4xx_flash.h"

46 #include "stm32f4xx_gpio.h"

47 #include "stm32f4xx_i2c.h"

58 #include "misc.h" /* High level functions for NVIC and SysTick (add-on to CMSIS functions) */

59

60 #if defined(STM32F429_439xx) || defined(STM32F446xx) || defined(STM32F469_479xx)

61 #include "stm32f4xx_cryp.h"

70 #include "stm32f4xx_sai.h"

71 #endif /* STM32F429_439xx || STM32F446xx || STM32F469_479xx */

72

73 #if defined(STM32F427_437xx)

io.h (https://github.com/borisbstyle/betaflight.git) C Header · 121 lines

65 #define IOCFG_IPD IO_CONFIG(GPIO_MODE_INPUT, GPIO_SPEED_FREQ_LOW, GPIO_PULLDOWN)

66 #define IOCFG_IPU IO_CONFIG(GPIO_MODE_INPUT, GPIO_SPEED_FREQ_LOW, GPIO_PULLUP)

67 #define IOCFG_IN_FLOATING IO_CONFIG(GPIO_MODE_INPUT, GPIO_SPEED_FREQ_LOW, GPIO_NOPULL)

75 #define IOCFG_OUT_PP_UP IO_CONFIG(GPIO_Mode_OUT, 0, GPIO_OType_PP, GPIO_PuPd_UP)

76 #define IOCFG_OUT_PP_25 IO_CONFIG(GPIO_Mode_OUT, GPIO_Speed_25MHz, GPIO_OType_PP, GPIO_PuPd_NOPULL)

77 #define IOCFG_OUT_OD IO_CONFIG(GPIO_Mode_OUT, 0, GPIO_OType_OD, GPIO_PuPd_NOPULL)

78 #define IOCFG_AF_PP IO_CONFIG(GPIO_Mode_AF, 0, GPIO_OType_PP, GPIO_PuPd_NOPULL)

79 #define IOCFG_AF_PP_PD IO_CONFIG(GPIO_Mode_AF, 0, GPIO_OType_PP, GPIO_PuPd_DOWN)

84 #define IOCFG_IN_FLOATING IO_CONFIG(GPIO_Mode_IN, 0, 0, GPIO_PuPd_NOPULL)

85 #define IOCFG_IPU_25 IO_CONFIG(GPIO_Mode_IN, GPIO_Speed_25MHz, 0, GPIO_PuPd_UP)

86

87 #elif defined(UNIT_TEST) || defined(SIMULATOR_BUILD)

116 void IOConfigGPIO(IO_t io, ioConfig_t cfg);

117 #if defined(STM32F3) || defined(STM32F4) || defined(STM32F7)

118 void IOConfigGPIOAF(IO_t io, ioConfig_t cfg, uint8_t af);

main.h (https://github.com/alibaba/AliOS-Things.git) C Header · 140 lines

53 #define SIM_DET_Pin GPIO_PIN_2

54 #define SIM_DET_GPIO_Port GPIOE

55 #define GS_LED_Pin GPIO_PIN_3

56 #define GS_LED_GPIO_Port GPIOE

57 #define PCIE_RST_Pin GPIO_PIN_13

84 #define CAM_PD_Pin GPIO_PIN_13

85 #define CAM_PD_GPIO_Port GPIOE

86 #define KEY_2_Pin GPIO_PIN_14

112 #define ALS_LED_Pin GPIO_PIN_6

113 #define ALS_LED_GPIO_Port GPIOB

114 #define CAM_RST_Pin GPIO_PIN_8

115 #define CAM_RST_GPIO_Port GPIOB

116

117 /* ########################## Assert Selection ############################## */

stm32f4xx_it.c (https://github.com/STMicroelectronics/STM32CubeF4.git) C · 204 lines

1 /**

2 ******************************************************************************

3 * @file Audio/Audio_playback_and_record/Src/stm32f4xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

28 /* Includes ------------------------------------------------------------------*/

29 #include "main.h"

30 #include "stm32f4xx_it.h"

31

32 /* Private typedef -----------------------------------------------------------*/

170 void EXTI2_IRQHandler(void)

171 {

172 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_2);

173 }

174

memorymap.h (https://gitlab.com/madresistor/libopencm3) C Header · 129 lines

3 *

4 * Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>

5 * Modified by 2013 Fernando Cortes <fernando.corcam@gmail.com> (stm32f3)

6 * Modified by 2013 Guillermo Rivera <memogrg@gmail.com> (stm32f3)

25 #include <libopencm3/cm3/memorymap.h>

26

27 /* --- STM32F3 specific peripheral definitions ----------------------------- */

28

29 /* Memory map for all busses */

85

86 /* AHB2 */

87 #define GPIO_PORT_A_BASE (PERIPH_BASE_AHB2 + 0x0000)

88 #define GPIO_PORT_B_BASE (PERIPH_BASE_AHB2 + 0x0400)

89 #define GPIO_PORT_C_BASE (PERIPH_BASE_AHB2 + 0x0800)

90 #define GPIO_PORT_D_BASE (PERIPH_BASE_AHB2 + 0x0C00)

stm32f0xx_it.c (https://github.com/aegean-odyssey/mpmd_marlin_1.1.x.git) C · 159 lines

1 /**

2 ******************************************************************************

3 * @file UART/UART_TwoBoards_ComIT/Src/stm32f0xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

38 /* Includes ------------------------------------------------------------------*/

39 #include "main.h"

40 #include "stm32f0xx_it.h"

41

42 /** @addtogroup STM32F0xx_HAL_Examples

136 void EXTI4_15_IRQHandler(void)

137 {

138 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_12);

139 }

140

stm32f0xx_it.c (https://github.com/aegean-odyssey/mpmd_marlin_1.1.x.git) C · 159 lines

1 /**

2 ******************************************************************************

3 * @file UART/UART_TwoBoards_ComIT/Src/stm32f0xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

38 /* Includes ------------------------------------------------------------------*/

39 #include "main.h"

40 #include "stm32f0xx_it.h"

41

42 /** @addtogroup STM32F0xx_HAL_Examples

112

113 /******************************************************************************/

114 /* STM32F0xx Peripherals Interrupt Handlers */

115 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */

116 /* available peripheral interrupt handler's name please refer to the startup */

stm32_autoleds.c (https://bitbucket.org/hg42/nuttx.git) C · 178 lines

67 /* Configure LD4,5 GPIO for output */

68

69 stm32l4_configgpio(GPIO_LED_RED);

70 stm32l4_configgpio(GPIO_LED_GRN);

116

117 case LED_PANIC:

118 stm32l4_gpiowrite(GPIO_LED_GRN, false);

119 stm32l4_gpiowrite(GPIO_LED_RED, true);

121

122 case LED_IDLE:

123 stm32l4_gpiowrite(GPIO_LED_GRN, true);

124 stm32l4_gpiowrite(GPIO_LED_RED, false);

172 stm32l4_gpiowrite(GPIO_LED_GRN, false);

173 stm32l4_gpiowrite(GPIO_LED_RED, false);

174 break;

175 }

usart_dma.c (https://bitbucket.org/PhracturedBlue/deviation) C · 200 lines

43 void usart_setup(void)

44 {

45 /* Setup GPIO pin GPIO_USART2_TX and GPIO_USART2_RX. */

46 gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_50_MHZ,

47 GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, GPIO_USART2_TX);

48 gpio_set_mode(GPIOA, GPIO_MODE_INPUT,

49 GPIO_CNF_INPUT_FLOAT, GPIO_USART2_RX);

156 /* Set GPIO8 (in GPIO port A) to 'output push-pull'. */

157 gpio_set_mode(GPIOA, GPIO_MODE_OUTPUT_2_MHZ,

158 GPIO_CNF_OUTPUT_PUSHPULL, GPIO8);

177 /* Blink the LED (PA8) on the board with every transmitted byte. */

178 while (1) {

179 gpio_toggle(GPIOA, GPIO8); /* LED on/off */

180 while ( transfered != 1) {

181 if (received == 1) {

console.c (https://github.com/alvarop/laserturret.git) C · 254 lines

7 #include "motor.h"

8

9 #include "stm32f4xx_conf.h"

10 #include "stm32f4xx.h"

62 uint8_t state = (uint8_t)strtoul(argv[1], NULL, 10);

63 if(state) {

64 GPIO_ResetBits(GPIOE, GPIO_Pin_4);

65 } else {

66 GPIO_SetBits(GPIOE, GPIO_Pin_4);

189 RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE);

190 GPIO_Init(GPIOE, &(GPIO_InitTypeDef){GPIO_Pin_4, GPIO_Mode_OUT, GPIO_OType_PP, GPIO_Speed_2MHz, GPIO_PuPd_NOPULL});

191 GPIO_SetBits(GPIOE, GPIO_Pin_4);

main.c (https://github.com/rurume/stm32-test.git) C · 150 lines

41 /* Private variables ---------------------------------------------------------*/

42 TIM_ICInitTypeDef TIM_ICInitStructure;

43 GPIO_InitTypeDef GPIO_InitStructure;

44 NVIC_InitTypeDef NVIC_InitStructure;

45

71 /* GPIOA Configuration: Pin 7 */

72 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;

73 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;

74 GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;

75 GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP;

76 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_40MHz;

77

78 GPIO_Init(GPIOA, &GPIO_InitStructure);

79 GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_TIM3);

80

81 /*-------------------------------- NVIC Configuration --------------------------*/

stm32f7xx_it.c (https://github.com/STMicroelectronics/STM32CubeF7.git) C · 210 lines

1 /**

2 ******************************************************************************

3 * @file USB_Host/AUDIO_Standalone/Src/stm32f7xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

27

28 /* Includes ------------------------------------------------------------------*/

29 #include "stm32f7xx_it.h"

30

31 /* Private typedef -----------------------------------------------------------*/

141

142 /******************************************************************************/

143 /* STM32F7xx Peripherals Interrupt Handlers */

144 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */

145 /* available peripheral interrupt handler's name please refer to the startup */

stm32f7xx_it.c (https://github.com/STMicroelectronics/STM32CubeF7.git) C · 216 lines

1 /**

2 ******************************************************************************

3 * @file UART/UART_TwoBoards_ComDMA/Src/stm32f7xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

22 /* Includes ------------------------------------------------------------------*/

23 #include "main.h"

24 #include "stm32f7xx_it.h"

25

26 /** @addtogroup STM32F7xx_HAL_Examples

144

145 /******************************************************************************/

146 /* STM32F7xx Peripherals Interrupt Handlers */

147 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */

148 /* available peripheral interrupt handler's name please refer to the startup */

stm32f7xx_it.c (https://github.com/STMicroelectronics/STM32CubeF7.git) C · 210 lines

1 /**

2 ******************************************************************************

3 * @file USB_Host/CDC_Standalone/Src/stm32f7xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

27

28 /* Includes ------------------------------------------------------------------*/

29 #include "stm32f7xx_it.h"

30

31 /* Private typedef -----------------------------------------------------------*/

141

142 /******************************************************************************/

143 /* STM32F7xx Peripherals Interrupt Handlers */

144 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */

145 /* available peripheral interrupt handler's name please refer to the startup */

spi.h (https://github.com/torfbolt/libmaple.git) C Header · 99 lines

32 */

33

34 #ifndef _LIBMAPLE_STM32F1_SPI_H_

35 #define _LIBMAPLE_STM32F1_SPI_H_

59 extern struct spi_dev *SPI1;

60 extern struct spi_dev *SPI2;

61 #if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)

62 extern struct spi_dev *SPI3;

63 #endif

67 */

68

69 /* spi_gpio_cfg(): Backwards compatibility shim to spi_config_gpios() */

70 struct gpio_dev;

71 extern void spi_config_gpios(struct spi_dev*, uint8,

72 struct gpio_dev*, uint8,

73 struct gpio_dev*, uint8, uint8, uint8);

stm32mp15xx-dhcom-drc02.dtsi (https://gitlab.com/deepcypher/linux) Device Tree · 169 lines

111 */

112 /delete-property/broken-cd;

113 cd-gpios = <&gpioi 10 GPIO_ACTIVE_HIGH>;

114 disable-wp;

115 };

124 status = "disabled"; /* Enable once there is display driver */

125 /*

126 * Note: PF3/GPIO_A , PD6/GPIO_B , PG0/GPIO_C , PC6/GPIO_E are

127 * also connected to the display board connector.

128 */

146 pinctrl-names = "default";

147 pinctrl-0 = <&uart8_pins_a>;

148 rts-gpios = <&gpioe 6 GPIO_ACTIVE_HIGH>;

149 /delete-property/dmas;

150 /delete-property/dma-names;

STM32_Discovery.c (https://github.com/coon42legacy/flyfi_sd_midi.git) C · 195 lines

53 * @{

54 */

55 GPIO_TypeDef* GPIO_PORT[LEDn] = {LED3_GPIO_PORT, LED4_GPIO_PORT};

56 const uint16_t GPIO_PIN[LEDn] = {LED3_PIN, LED4_PIN};

91 GPIO_InitStructure.GPIO_Pin = GPIO_PIN[Led];

92

93 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;

94 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

95 GPIO_Init(GPIO_PORT[Led], &GPIO_InitStructure);

96 }

97

155

156 /* Configure Button pin as input floating */

157 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;

158 GPIO_InitStructure.GPIO_Pin = BUTTON_PIN[Button];

SHT30.c (https://github.com/LiteOS/LiteOS_Lab.git) C · 163 lines

12

13 #include "SHT30.h"

14 #include "stm32l4xx.h"

15 #include "i2c.h"

16 #include "gpio.h"

HardwareProvider.cs (https://bitbucket.org/CW2/netduinofirmware.git) C# · 86 lines

8 // Implementation for STM32: Copyright (c) Oberon microsystems, Inc.

9 //

10 // class Microsoft.SPOT.Hardware.STM32.STM32HardwareProvider

11 //

12 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

19 namespace Microsoft.SPOT.Hardware.STM32

20 {

21 internal class STM32HardwareProvider : HardwareProvider

22 {

23 static STM32HardwareProvider()

44 break;

45 case "COM3":

46 rxPin = Pins.GPIO_PIN_B_11;

47 txPin = Pins.GPIO_PIN_B_10;

72 msk = Pins.GPIO_PIN_B_13;

73 miso = Pins.GPIO_PIN_B_14;

74 mosi = Pins.GPIO_PIN_B_15;

stm32f0xx_hal_tim.d (https://github.com/GreHack/CTF-challs.git) D · 80 lines

15 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h \

16 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h \

17 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h \

26 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr_ex.h \

27 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h \

28 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h

56 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h:

57

58 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h:

59

60 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h:

64 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h:

65

66 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h:

67

68 D:/STM32/Datas/STM32CubeMX/GH18-F030bigLVL5-01/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h:

stm32_extmem.c (https://github.com/apache/incubator-nuttx.git) C · 148 lines

1 /****************************************************************************

2 * boards/arm/stm32/mikroe_stm32f4/src/stm32_extmem.c

3 *

4 * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.

78 GPIO_FSMC_A0, GPIO_FSMC_A1 , GPIO_FSMC_A2, GPIO_FSMC_A3, GPIO_FSMC_A4 , GPIO_FSMC_A5,

79 GPIO_FSMC_A6, GPIO_FSMC_A7, GPIO_FSMC_A8, GPIO_FSMC_A9, GPIO_FSMC_A10, GPIO_FSMC_A11,

80 GPIO_FSMC_A12, GPIO_FSMC_A13, GPIO_FSMC_A14, GPIO_FSMC_A15, GPIO_FSMC_A16, GPIO_FSMC_A17,

81 GPIO_FSMC_A18, GPIO_FSMC_A19, GPIO_FSMC_A20, GPIO_FSMC_A21, GPIO_FSMC_A22, GPIO_FSMC_A23,

82 GPIO_FSMC_A24, GPIO_FSMC_A25

87 GPIO_FSMC_D0, GPIO_FSMC_D1 , GPIO_FSMC_D2, GPIO_FSMC_D3, GPIO_FSMC_D4 , GPIO_FSMC_D5,

88 GPIO_FSMC_D6, GPIO_FSMC_D7, GPIO_FSMC_D8, GPIO_FSMC_D9, GPIO_FSMC_D10, GPIO_FSMC_D11,

89 GPIO_FSMC_D12, GPIO_FSMC_D13, GPIO_FSMC_D14, GPIO_FSMC_D15

110 ****************************************************************************/

111

112 void stm32_extmemgpios(const uint32_t *gpios, int ngpios)

113 {

114 int i;

stm32l4xx_it.c (https://github.com/STMicroelectronics/STM32CubeL4.git) C · 216 lines

1 /**

2 ******************************************************************************

3 * @file UART/UART_TwoBoards_ComDMA/Src/stm32l4xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

22 /* Includes ------------------------------------------------------------------*/

23 #include "main.h"

24 #include "stm32l4xx_it.h"

25

26 /** @addtogroup STM32L4xx_HAL_Examples

144

145 /******************************************************************************/

146 /* STM32L4xx Peripherals Interrupt Handlers */

147 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */

148 /* available peripheral interrupt handler's name please refer to the startup */

main.h (https://github.com/STMicroelectronics/STM32CubeL4.git) C Header · 122 lines

23

24 /* Includes ------------------------------------------------------------------*/

25 #include "stm32l4xx_hal.h"

26 #include "stm32l4xx_nucleo_144.h"

61

62 /* Definition of ADCx channels pins */

63 #define ADCx_CHANNELa_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()

64 #define ADCx_CHANNELa_GPIO_PORT GPIOA

96 #define DACx DAC1

97 #define DACx_CLK_ENABLE() __HAL_RCC_DAC1_CLK_ENABLE()

98 #define DACx_CHANNEL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()

99

100 #define DACx_FORCE_RESET() __HAL_RCC_DAC1_FORCE_RESET()

107 #define DACx_CHANNEL_TO_ADCx_CHANNELa_PIN GPIO_PIN_4

108 #define DACx_CHANNEL_TO_ADCx_CHANNELa_GPIO_PORT GPIOA

109

110 /* Definition of DACx NVIC resources */

main.c (https://bitbucket.org/doudoudou/incas.git) C · 127 lines

23 };

24

25 static const struct can_instance can1 = {&CAND1, GPIOD_LED5};

26 static const struct can_instance can2 = {&CAND2, GPIOD_LED3};

29 * Internal loopback mode, 500KBaud, automatic wakeup, automatic recover

30 * from abort mode.

31 * See section 22.7.7 on the STM32 reference manual.

32 */

33 static const CANConfig cancfg = {

56 &rxmsg, TIME_IMMEDIATE) == RDY_OK) {

57 /* Process message.*/

58 palTogglePad(GPIOD, cip->led);

59 }

60 }

platform_config.h (https://github.com/FabLabSeoul/WingProject.git) C Header · 126 lines

29 /* Uncomment the line corresponding to the STMicroelectronics evaluation board

30 used to run the example */

31 #if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) && !defined (USE_STM3210C_EVAL) && !defined (USE_STM32100B_EVAL)

32 //#define USE_STM32100B_EVAL

62 #define USARTy_GPIO GPIOA

63 #define USARTy_CLK RCC_APB2Periph_USART1

64 #define USARTy_GPIO_CLK RCC_APB2Periph_GPIOA

65 #define USARTy_RxPin GPIO_Pin_10

91 #define USARTz_GPIO GPIOC

92 #define USARTz_CLK RCC_APB1Periph_USART3

93 #define USARTz_GPIO_CLK RCC_APB2Periph_GPIOC

94 #define USARTz_RxPin GPIO_Pin_11

111 #define USARTz_GPIO GPIOD

112 #define USARTz_CLK RCC_APB1Periph_USART2

113 #define USARTz_GPIO_CLK RCC_APB2Periph_GPIOD

114 #define USARTz_RxPin GPIO_Pin_6

stm32f1xx_it.c (https://github.com/STMicroelectronics/STM32CubeF1.git) C · 216 lines

1 /**

2 ******************************************************************************

3 * @file UART/UART_TwoBoards_ComDMA/Src/stm32f1xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

22 /* Includes ------------------------------------------------------------------*/

23 #include "main.h"

24 #include "stm32f1xx_it.h"

25

26 /** @addtogroup STM32F1xx_HAL_Examples

144

145 /******************************************************************************/

146 /* STM32F1xx Peripherals Interrupt Handlers */

147 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */

148 /* available peripheral interrupt handler's name please refer to the startup */

tm4c_buttons.c (https://bitbucket.org/zapparello/nuttx.git) C · 171 lines

59 * Private Data

60 ****************************************************************************/

61 /* Pin configuration for each STM3210E-EVAL button. This array is indexed by

62 * the BUTTON_* and JOYSTICK_* definitions in board.h

63 */

65 static const uint32_t g_buttons[NUM_BUTTONS] =

66 {

67 GPIO_SW1, GPIO_SW2

68 };

69

91 int i;

92

93 /* Configure the GPIO pins as inputs. */

94

95 for (i = 0; i < NUM_BUTTONS; i++)

stm32_buttons.c (https://bitbucket.org/zapparello/nuttx.git) C · 151 lines

1 /****************************************************************************

2 * boards/arm/stm32/olimex-stm32-h407/src/stm32_buttons.c

3 *

4 * Copyright (C) 2014-2015, 2017 Gregory Nutt. All rights reserved.

89 for (i = 0; i < NUM_BUTTONS; i++)

90 {

91 stm32_configgpio(g_buttons[i]);

92 }

93 }

103 /* Check that state of each key */

104

105 if (!stm32_gpioread(g_buttons[BUTTON_BUT]))

106 {

107 ret |= BUTTON_BUT_BIT;

142 if (id >= MIN_IRQBUTTON && id <= MAX_IRQBUTTON)

143 {

144 ret = stm32_gpiosetevent(g_buttons[id], true, true, true, irqhandler,

145 arg);

146 }

stm32h7xx_hal_msp.c (https://github.com/STMicroelectronics/STM32CubeH7.git) C · 167 lines

84 void HAL_DAC_MspInit(DAC_HandleTypeDef *hdac)

85 {

86 GPIO_InitTypeDef GPIO_InitStruct;

87 static DMA_HandleTypeDef hdma_dac1;

88

99 GPIO_InitStruct.Pin = DACx_CHANNEL_PIN;

100 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

101 GPIO_InitStruct.Pull = GPIO_NOPULL;

102 HAL_GPIO_Init(DACx_CHANNEL_GPIO_PORT, &GPIO_InitStruct);

103

104 /*##-3- Configure the DMA ##########################################*/

143 /* De-initialize the DAC Channel1 GPIO pin */

144 HAL_GPIO_DeInit(DACx_CHANNEL_GPIO_PORT, DACx_CHANNEL_PIN);

145

146 /*##-3- Disable the DMA Stream ############################################*/

stm32h7xx_it.c (https://github.com/STMicroelectronics/STM32CubeH7.git) C · 216 lines

1 /**

2 ******************************************************************************

3 * @file UART/UART_TwoBoards_ComDMA/Src/stm32h7xx_it.c

4 * @author MCD Application Team

5 * @brief Main Interrupt Service Routines.

22 /* Includes ------------------------------------------------------------------*/

23 #include "main.h"

24 #include "stm32h7xx_it.h"

25

26 /** @addtogroup STM32H7xx_HAL_Examples

144

145 /******************************************************************************/

146 /* STM32H7xx Peripherals Interrupt Handlers */

147 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */

148 /* available peripheral interrupt handler's name please refer to the startup */

main.h (https://github.com/STMicroelectronics/STM32CubeH7.git) C Header · 122 lines

23

24 /* Includes ------------------------------------------------------------------*/

25 #include "stm32h7xx_hal.h"

26 #include "stm32h7xx_nucleo.h"

61

62 /* Definition of ADCx channels pins */

63 #define ADCy_CHANNELa_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE()

64 #define ADCy_CHANNELa_GPIO_PORT GPIOF

96 #define DACx DAC1

97 #define DACx_CLK_ENABLE() __HAL_RCC_DAC12_CLK_ENABLE()

98 #define DACx_CHANNEL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()

99

100 #define DACx_FORCE_RESET() __HAL_RCC_DAC12_FORCE_RESET()

107 #define DACx_CHANNEL_TO_ADCx_CHANNELa_PIN GPIO_PIN_4

108 #define DACx_CHANNEL_TO_ADCx_CHANNELa_GPIO_PORT GPIOA

109

110 /* Definition of DACx NVIC resources */

main.h (https://github.com/STMicroelectronics/STM32CubeH7.git) C Header · 122 lines

23

24 /* Includes ------------------------------------------------------------------*/

25 #include "stm32h7xx_hal.h"

26 #include "stm32h745i_discovery.h"

61

62 /* Definition of ADCx channels pins */

63 #define ADCy_CHANNELa_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE()

64 #define ADCy_CHANNELa_GPIO_PORT GPIOF

96 #define DACx DAC1

97 #define DACx_CLK_ENABLE() __HAL_RCC_DAC12_CLK_ENABLE()

98 #define DACx_CHANNEL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()

99

100 #define DACx_FORCE_RESET() __HAL_RCC_DAC12_FORCE_RESET()

107 #define DACx_CHANNEL_TO_ADCx_CHANNELa_PIN GPIO_PIN_4

108 #define DACx_CHANNEL_TO_ADCx_CHANNELa_GPIO_PORT GPIOA

109

110 /* Definition of DACx NVIC resources */

fast_pin.h (https://github.com/BrewPi/firmware.git) C Header · 166 lines

71 inline void pinSetFast(pin_t _pin)

72 {

73 GPIO_SetBit_BB((__IO uint32_t)&pin_map[_pin].gpio_peripheral->ODR, pin_map[_pin].gpio_pin_source);

74 }

75

76 inline void pinResetFast(pin_t _pin)

77 {

78 GPIO_ResetBit_BB((__IO uint32_t)&pin_map[_pin].gpio_peripheral->ODR, pin_map[_pin].gpio_pin_source);

79 }

80

81 inline int32_t pinReadFast(pin_t _pin)

82 {

83 return GPIO_GetBit_BB((__IO uint32_t)&pin_map[_pin].gpio_peripheral->IDR, pin_map[_pin].gpio_pin_source);

84 }

85

stm32_autoleds.c (https://bitbucket.org/hg42/nuttx.git) C · 287 lines

179 if ((on_bitset & BOARD_RED_LED_BIT) != 0)

180 {

181 stm32_gpiowrite(GPIO_LED2, false);

182 }

183

214 if ((off_bitset & BOARD_RED_LED_BIT) != 0)

215 {

216 stm32_gpiowrite(GPIO_LED2, true);

217 }

218

219 if ((off_bitset & BOARD_GREEN_LED_BIT) != 0)

220 {

221 stm32_gpiowrite(GPIO_LED4, true);

222 }

223

hw_r2.c (https://github.com/cyrilh/bldc.git) C · 151 lines

58 // GPIOA Configuration: Channel 1 to 3 as alternate function push-pull

59 palSetPadMode(GPIOA, 8, PAL_MODE_ALTERNATE(GPIO_AF_TIM1) |

60 PAL_STM32_OSPEED_HIGHEST |

61 PAL_STM32_PUDR_FLOATING);

62 palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(GPIO_AF_TIM1) |

63 PAL_STM32_OSPEED_HIGHEST |

64 PAL_STM32_PUDR_FLOATING);

65 palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(GPIO_AF_TIM1) |

66 PAL_STM32_OSPEED_HIGHEST |

67 PAL_STM32_PUDR_FLOATING);

68

69 palSetPadMode(GPIOB, 13, PAL_MODE_ALTERNATE(GPIO_AF_TIM1) |

70 PAL_STM32_OSPEED_HIGHEST |

71 PAL_STM32_PUDR_FLOATING);

72 palSetPadMode(GPIOB, 14, PAL_MODE_ALTERNATE(GPIO_AF_TIM1) |

73 PAL_STM32_OSPEED_HIGHEST |

VirtualCom.C (https://github.com/wegam/STM32F10xUSBE.git) C · 197 lines

157 // GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD;

158 // GPIO_Init(GPIOA, &GPIO_InitStructure);

159 //

160 //// GPIO_SetBits(GPIOB,GPIO_Pin_0);

162 // GPIO_ResetBits(GPIOB,GPIO_Pin_10); //����LED��

163 // GPIO_Configuration_AOD2(GPIOB,GPIO_Pin_9); //VBUS

164 GPIO_Configuration_OPP2(LED_CONNECTED_PORT,LED_CONNECTED_PIN); //��LED

165 GPIO_Configuration_OPP2(LED_RUNNING_PORT,LED_RUNNING_PIN); //��LED

166 GPIO_Configuration_OPP2(GPIOB,GPIO_Pin_10); //CMSIS��Դ����

167 PB10=1;

168

178 void VirtualCom_LedRun(void)

179 {

180 // if(GPIO_ReadOutputDataBit(GPIOB,GPIO_Pin_0))

181 // {

182 // PB0=0; //µãÁÁLEDÓÒ

App_LoadMeasure.c (https://github.com/WittXie/STM32.git) C · 174 lines

5 * @By : Wind(лÓñÉì)

6 * @Email : 1659567673@qq.com

7 * @Platform : Keil uVision5 v5.15 (STM32F103RC)

8 * @Explain : ¸ºÔؼì²â

9 *=============================================================================*/

81 ADC1_Init();

82 ADC2_Init();

83 GPIO_Relay_Init();//�̵���

84 Message_Update_Flag = 1;

85

Drive_AD9851.c (https://github.com/WittXie/STM32.git) C · 163 lines

50 void AD9851_Init(void)

51 {

52 GPIO_InitTypeDef GPIO_InitStructure;

53 RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOG|RCC_AHB1Periph_GPIOC,ENABLE);

54

55 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3

56 |GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7;

57 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;

58 GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;

59 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;

60 GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;

61 GPIO_Init(GPIOG, &GPIO_InitStructure);

62

63 GPIO_InitStructure.GPIO_Pin =GPIO_Pin_12|GPIO_Pin_10|GPIO_Pin_11 ;

64 GPIO_Init(GPIOC, &GPIO_InitStructure);

stm32f4xx_it.c (https://github.com/fboris/STM32Cube_FW_F4.git) C · 198 lines

1 /**

2 ******************************************************************************

3 * @file USB_Host/MTP_Standalone/Src/stm32f4xx_it.c

4 * @author MCD Application Team

5 * @version V1.1.0

30 /* Includes ------------------------------------------------------------------*/

31 #include "main.h"

32 #include "stm32f4xx_it.h"

33

34 /* Private typedef -----------------------------------------------------------*/

173 void EXTI9_5_IRQHandler(void)

174 {

175 HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8);

176 }

177

tm_stm32f4_mco_output.h (https://github.com/drowe67/codec2.git) C Header · 188 lines

4 * @website http://stm32f4-discovery.com

5 * @link http://stm32f4-discovery.com/2014/10/library-40-output-clocks-stm32f4/

6 * @version v1.1

7 * @ide Keil uVision

8 * @license GNU GPL v3

9 * @brief MCO Output for STM32F4xx

10 *

11 @verbatim

38 /**

39 * @defgroup TM_MCO

40 * @brief MCO Output clock for STM32F4xx - http://stm32f4-discovery.com/2014/10/library-40-output-clocks-stm32f4/

41 * @{

42 *

85 #include "stm32f4xx_rcc.h"

86 #include "defines.h"

87 #include "tm_stm32f4_gpio.h"

88

89 /* C++ detection */

stm32f10x_conf.h (https://github.com/sunilgandhi007/Juggernauts.git) C Header · 74 lines

19 #ifndef __STM32F10x_CONF_H

20 #define __STM32F10x_CONF_H

21

22 /* Includes ------------------------------------------------------------------*/

23 /* Uncomment the line below to enable peripheral header file inclusion */

24 #include "stm32f10x_adc.h"

25 #include "stm32f10x_bkp.h"

31 #include "stm32f10x_exti.h"

32 #include "stm32f10x_flash.h"

33 #include "stm32f10x_fsmc.h"

34 #include "stm32f10x_gpio.h"

35 #include "stm32f10x_i2c.h"

41 #include "stm32f10x_spi.h"

42 #include "stm32f10x_tim.h"

43 #include "stm32f10x_usart.h"

stm32f10x_conf.h (https://github.com/robots/STM32.git) C Header · 72 lines

1 /******************** (C) COPYRIGHT 2009 STMicroelectronics ********************

2 * File Name : stm32f10x_conf.h

3 * Author : MCD Application Team

4 * Version : V3.0.1

20 /* Includes ------------------------------------------------------------------*/

21 /* Uncomment the line below to enable peripheral header file inclusion */

22 #include "stm32f10x_adc.h"

23 /* #include "stm32f10x_bkp.h" */

24 /* #include "stm32f10x_can.h" */

25 /* #include "stm32f10x_crc.h" */

26 /* #include "stm32f10x_dac.h" */

27 /* #include "stm32f10x_dbgmcu.h" */

31 /* #include "stm32f10x_fsmc.h" */

32 #include "stm32f10x_gpio.h"

33 /* #include "stm32f10x_i2c.h" */

main.c (https://github.com/AlexWongws/Firmware.git) C · 240 lines

14 #include "utils.h"

15 #include "hw_config.h"

16 #include "stm32f10x_tim.h"

17

18 #define SETTLE_PAUSE 13

23 void Periph_clock_enable(void)

24 {

25 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |

26 RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOD |

27 RCC_APB2Periph_GPIOE | RCC_APB2Periph_AFIO |

28 RCC_APB2Periph_ADC1 | RCC_APB2Periph_TIM1 |

29 RCC_APB2Periph_TIM8, ENABLE);

59

60 Periph_clock_enable();

61 GPIO_Config();

62

63 __enable_irq();

stm32h747i_discovery_sd.h (https://github.com/STMicroelectronics/STM32CubeH7.git) C Header · 181 lines

28

29 /* Includes ------------------------------------------------------------------*/

30 #include "stm32h747i_discovery_conf.h"

31 #include "stm32h747i_discovery_errno.h"

103 #define SD_DETECT_PIN GPIO_PIN_8

104 #define SD_DETECT_GPIO_PORT GPIOI

105 #define SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOI_CLK_ENABLE()

106 #define SD_DETECT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOI_CLK_DISABLE()

107 #define SD_DETECT_EXTI_IRQn EXTI9_5_IRQn

108

109 #define SD_DETECT_EXTI_LINE EXTI_LINE_8

110 #define SD_DetectIRQHandler() HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_8)

111

112 /**

at91-kizbox3-hs.dts (https://github.com/penberg/linux.git) Device Tree · 309 lines

45 red {

46 label = "pio:red:user";

47 gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;

48 default-state = "off";

49 };

51 white {

52 label = "pio:white:user";

53 gpios = <&pioA PIN_PB8 GPIO_ACTIVE_HIGH>;

54 default-state = "off";

55 };

153 io_boot_0 {

154 label = "io boot 0";

155 gpio = <&pioA PIN_PC11 GPIO_ACTIVE_HIGH>;

156 output;

157 init-low;

ParTest.c (https://github.com/ransford/freertos-moo.git) C · 126 lines

66

67 /*-----------------------------------------------------------

68 * Simple GPIO (parallel port) IO routines.

69 *-----------------------------------------------------------*/

70

77

78 /* Hardware includes. */

79 #include "stm320518_eval.h"

80

81 /* Only the LEDs on one of the two seven segment displays are used. */

stm32l4r5.dtsi (https://github.com/methodpark/zephyr.git) Device Tree · 235 lines

23 gpiod: gpio@48000c00 {

24 compatible = "st,stm32-gpio";

25 gpio-controller;

30 };

31

32 gpioe: gpio@48001000 {

33 compatible = "st,stm32-gpio";

39 };

40

41 gpiof: gpio@48001400 {

42 compatible = "st,stm32-gpio";

48 };

49

50 gpiog: gpio@48001800 {

51 compatible = "st,stm32-gpio";

stm32f10x_it.c (https://github.com/ymqqqqdx/n2_taximeter.git) C · 188 lines

1 /**

2 ******************************************************************************

3 * @file EXTI/stm32f10x_it.c

4 * @author MCD Application Team

5 * @version V3.0.0

22

23 /* Includes ------------------------------------------------------------------*/

24 #include "stm32f10x_it.h"

25 #include "platform_config.h"

26

142

143 /******************************************************************************/

144 /* STM32F10x Peripherals Interrupt Handlers */

145 /******************************************************************************/

146

156 /* Toggle GPIO_LED pin 6 */

157 GPIO_WriteBit(GPIO_LED, GPIO_Pin_6, (BitAction)((1-GPIO_ReadOutputDataBit(GPIO_LED, GPIO_Pin_6))));

158

159 /* Clear the Key Button EXTI line pending bit */

ParTest_MCBSTM32.c (https://github.com/ammarkham/freertos-moo.git) C · 136 lines

79

80 /* Configure PE14, PD13, PD3 and PD4 output push-pull */

81 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15;

82 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;

83 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;

84 GPIO_Init( GPIOB, &GPIO_InitStructure );

103 }

104

105 GPIO_WriteBit( GPIOB, ( GPIO_Pin_8 << uxLED ), ucBitStates[ uxLED ] );

106 }

107 portEXIT_CRITICAL();

117 {

118 ucBitStates[ uxLED ] = !ucBitStates[ uxLED ];

119 GPIO_WriteBit( GPIOB, ( GPIO_Pin_8 << uxLED ), ucBitStates[ uxLED ] );

120 }

121 portEXIT_CRITICAL();

main.c (https://github.com/jiesse/time-meter.git) C · 166 lines

74 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOF | RCC_APB2Periph_GPIOG, ENABLE);

75

76 GPIO_Init(GPIOF, &GPIO_InitStructure);

77 GPIO_Init(GPIOG, &GPIO_InitStructure);

83 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIO_LED, ENABLE);

84

85 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9;

86 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;

96

97 /* Turn on LD2 and LD3 */

98 GPIO_SetBits(GPIO_LED, GPIO_Pin_7 | GPIO_Pin_8);

99 /* Turn off LD1 */

100 GPIO_ResetBits(GPIO_LED, GPIO_Pin_6);

105 GPIO_SetBits(GPIO_LED, GPIO_Pin_9);

106 /* Turn off LD2 and LD3 */

107 GPIO_ResetBits(GPIO_LED, GPIO_Pin_8 | GPIO_Pin_7);

108 /* Insert delay */

109 Delay(0xAFFFF);

stm32f4xx.c (https://github.com/hikob/openlab.git) C · 119 lines

31 /* All GPIOs */

32 GPIO_INIT(_gpioA, GPIOA_BASE_ADDRESS, RCC_AHB_BIT_GPIOA);

33 GPIO_INIT(_gpioB, GPIOB_BASE_ADDRESS, RCC_AHB_BIT_GPIOB);

34 GPIO_INIT(_gpioC, GPIOC_BASE_ADDRESS, RCC_AHB_BIT_GPIOC);

35 GPIO_INIT(_gpioD, GPIOD_BASE_ADDRESS, RCC_AHB_BIT_GPIOD);

36 GPIO_INIT(_gpioE, GPIOE_BASE_ADDRESS, RCC_AHB_BIT_GPIOE);

37 GPIO_INIT(_gpioF, GPIOF_BASE_ADDRESS, RCC_AHB_BIT_GPIOF);

38 GPIO_INIT(_gpioG, GPIOG_BASE_ADDRESS, RCC_AHB_BIT_GPIOG);

39 GPIO_INIT(_gpioH, GPIOH_BASE_ADDRESS, RCC_AHB_BIT_GPIOH);

40 GPIO_INIT(_gpioI, GPIOI_BASE_ADDRESS, RCC_AHB_BIT_GPIOI);

90

91 /* Definitions for user access */

92 const gpio_t gpioA = GPIO_A;

93 const gpio_t gpioB = GPIO_B;

ParTest.c (https://github.com/aeste/freertos.git) C · 126 lines

66

67 /*-----------------------------------------------------------

68 * Simple GPIO (parallel port) IO routines.

69 *-----------------------------------------------------------*/

70

77

78 /* Starter kit includes. */

79 #include "iar_stm32f407zg_sk.h"

80

81 /* Only the LEDs on one of the two seven segment displays are used. */

main.c (https://github.com/skywolf/stm32f10x_stdperiph_lib.git) C · 165 lines

60 RCC_APB2Periph_GPIOE, ENABLE);

61

62 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;

63 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;

64 GPIO_Init(GPIOA, &GPIO_InitStructure);

65 GPIO_Init(GPIOB, &GPIO_InitStructure);

66 GPIO_Init(GPIOC, &GPIO_InitStructure);

67 GPIO_Init(GPIOD, &GPIO_InitStructure);

68 GPIO_Init(GPIOE, &GPIO_InitStructure);

69

70 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |

76 GPIO_Init(GPIOF, &GPIO_InitStructure);

77 GPIO_Init(GPIOG, &GPIO_InitStructure);

78 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOF | RCC_APB2Periph_GPIOG, DISABLE);

platform_config.h (https://github.com/kounst/QuadVolucer.git) C Header · 127 lines

29 /* Uncomment the line corresponding to the STMicroelectronics evaluation board

30 used to run the example */

31 #if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) && !defined (USE_STM3210C_EVAL) && !defined (USE_STM32100B_EVAL) && !defined (USE_STM32100E_EVAL)

32 //#define USE_STM32100B_EVAL

41

42 #define USARTy USART1

43 #define USARTy_GPIO GPIOA

44 #define USARTy_CLK RCC_APB2Periph_USART1

45 #define USARTy_GPIO_CLK RCC_APB2Periph_GPIOA

81

82 #define USARTy USART2

83 #define USARTy_GPIO GPIOD

84 #define USARTy_CLK RCC_APB1Periph_USART2

85 #define USARTy_GPIO_CLK RCC_APB2Periph_GPIOD

103 #define USARTy_GPIO GPIOA

104 #define USARTy_CLK RCC_APB2Periph_USART1

105 #define USARTy_GPIO_CLK RCC_APB2Periph_GPIOA

106 #define USARTy_RxPin GPIO_Pin_10

stm32f4xx_hal_msp.c (https://github.com/clarenceliu/Mplib.git) C · 139 lines

83 GPIO_InitStruct.Pin = USARTx_TX_PIN;

84 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

85 GPIO_InitStruct.Pull = GPIO_PULLUP;

87 GPIO_InitStruct.Alternate = USARTx_TX_AF;

88

89 HAL_GPIO_Init(USARTx_TX_GPIO_PORT, &GPIO_InitStruct);

90

91 /* UART RX GPIO pin configuration */

93 GPIO_InitStruct.Alternate = USARTx_RX_AF;

94

95 HAL_GPIO_Init(USARTx_RX_GPIO_PORT, &GPIO_InitStruct);

96

97 /*##-3- Configure the NVIC for UART ########################################*/

119 HAL_GPIO_DeInit(USARTx_TX_GPIO_PORT, USARTx_TX_PIN);

120 /* Configure UART Rx as alternate function */

121 HAL_GPIO_DeInit(USARTx_RX_GPIO_PORT, USARTx_RX_PIN);

122

123 /*##-3- Disable the NVIC for UART ##########################################*/

stm32f4xx_hal_msp.c (https://github.com/Bosvark/STM32Cube_FW_F4_V1.1.0.git) C · 132 lines

81 GPIO_InitStruct.Pin = ADCx_REG_CHANNEL_PIN;

82 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;

83 GPIO_InitStruct.Pull = GPIO_NOPULL;

84 HAL_GPIO_Init(ADCx_REG_CHANNEL_GPIO_PORT, &GPIO_InitStruct);

85 /* ADC1 Channel12 GPIO pin configuration */

88 GPIO_InitStruct.Pull = GPIO_NOPULL;

89 HAL_GPIO_Init(ADCx_INJ_CHANNEL_GPIO_PORT, &GPIO_InitStruct);

90

91

114 /* De-initialize the ADC1 Channel11 GPIO pin */

115 HAL_GPIO_DeInit(ADCx_REG_CHANNEL_GPIO_PORT, ADCx_REG_CHANNEL_PIN);

116 /* De-initialize the ADC1 Channel12 GPIO pin */

117 HAL_GPIO_DeInit(ADCx_INJ_CHANNEL_GPIO_PORT, ADCx_INJ_CHANNEL_PIN);

118 }

119

stm32_autoleds.c (https://bitbucket.org/benchmark-electronics/nuttx.git) C · 96 lines

67 /* Configure LD3 GPIO for output */

68

69 stm32l4_configgpio(GPIO_LD3);

70 }

71

78 if (led == 1)

79 {

80 stm32l4_gpiowrite(GPIO_LD3, true);

81 }

82 }

90 if (led == 1)

91 {

92 stm32l4_gpiowrite(GPIO_LD3, false);

93 }

94 }

hal_tick_16b.c (https://github.com/adamgreen/gcc4mbed.git) C · 182 lines

93 PreviousVal = val;

94 #if DEBUG_TICK > 0

95 HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_6);

96 #endif

97 }

158 __GPIOB_CLK_ENABLE();

159 GPIO_InitTypeDef GPIO_InitStruct;

160 GPIO_InitStruct.Pin = GPIO_PIN_6;

161 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

162 GPIO_InitStruct.Pull = GPIO_PULLUP;

163 GPIO_InitStruct.Speed = GPIO_SPEED_FAST;

164 HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

165 #endif

166

uart_arch.h (https://github.com/agreee45/SNUT.git) C Header · 186 lines

38

39

40 /* sort out the problem of UART5 already defined in stm32.h */

41 #define USART5 ((USART_TypeDef *) UART5_BASE)

42 #undef UART5

49 #define UART2_RxPin GPIO_Pin_3

50 #define UART3_RxPin GPIO_Pin_11

51 #define UART5_RxPin GPIO_Pin_2

53 #define UART1_TxPort GPIOA

54 #define UART2_TxPort GPIOA

55 #define UART3_TxPort GPIOC

73 #define UART2_remap {}

74 #define UART3_remap {RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE); \

75 GPIO_PinRemapConfig(GPIO_PartialRemap_USART3, ENABLE);}

76 #define UART5_remap {}

77

main-ex9.c (https://bitbucket.org/teknohan/mastering-stm32-book-example.git) C · 118 lines

72

73 void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_base) {

74 GPIO_InitTypeDef GPIO_InitStruct;

75 if (htim_base->Instance == TIM2) {

76 __TIM2_CLK_ENABLE();

79 PA6 ------> TIM3_CH1

80 */

81 GPIO_InitStruct.Pin = GPIO_PIN_5;

82 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

83 GPIO_InitStruct.Pull = GPIO_NOPULL;

84 GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;

85 GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;

86 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

87 }

88 }

main-ex9.c (https://bitbucket.org/teknohan/mastering-stm32-book-example.git) C · 116 lines

69

70 void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_base) {

71 GPIO_InitTypeDef GPIO_InitStruct;

72 if (htim_base->Instance == TIM3) {

73 __TIM3_CLK_ENABLE();

77 PA7 ------> TIM3_CH2

78 */

79 GPIO_InitStruct.Pin = GPIO_PIN_6 | GPIO_PIN_7;

80 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;

81 GPIO_InitStruct.Pull = GPIO_NOPULL;

82 GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;

83 GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;

84 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);

85 }

86 }

pinmux_stm32.c (https://github.com/zephyrproject-rtos/zephyr.git) C · 158 lines

18 #include <soc.h>

19 #include <drivers/pinmux.h>

20 #include <gpio/gpio_stm32.h>

21 #include <drivers/clock_control/stm32_clock_control.h>

22 #include <pinmux/stm32/pinmux_stm32.h>

23

24 #ifdef CONFIG_SOC_SERIES_STM32MP1X

30 /* base address for where GPIO registers start */

31 #define GPIO_PORTS_BASE (GPIOA_BASE)

32

33 static const uint32_t ports_enable[STM32_PORTS_MAX] = {

67 #ifdef GPIOJ_BASE

68 STM32_PERIPH_GPIOJ,

69 #else

70 STM32_PORT_NOT_AVAILABLE,

main.c (https://gitlab.com/aoscarius/embedded-exercise) C · 98 lines

1 #include "stm32f4xx.h"

2 #include "stm32f4xx_hal_gpio.h"

3

4 #include "cmsis_os.h"

45 GPIO_InitStruct.Pin = LEDS;

46 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

47 GPIO_InitStruct.Pull = GPIO_PULLDOWN;

50 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);

51

52 HAL_GPIO_WritePin(GPIOD, LEDS, GPIO_PIN_RESET);

53 }

54

76 void threadBLUE(void *args){

77 while(1){

78 HAL_GPIO_TogglePin(GPIOD, LED_BLUE);

79 HAL_Delay(2000);

80 }

Makefile (https://gitlab.com/gmbnomis/u-boot) Makefile · 55 lines

20 endif

21 obj-$(CONFIG_FSL_IIM) += fsl_iim.o

22 obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o

23 obj-$(CONFIG_$(SPL_)I2C_EEPROM) += i2c_eeprom.o

24 obj-$(CONFIG_FSL_MC9SDZ60) += mc9sdz60.o

53 obj-$(CONFIG_QFW) += qfw.o

54 obj-$(CONFIG_ROCKCHIP_EFUSE) += rockchip-efuse.o

55 obj-$(CONFIG_STM32_RCC) += stm32_rcc.o

56

u8x8cb.c (https://github.com/olikraus/u8g2.git) C · 112 lines

93 case U8X8_MSG_GPIO_MENU_SELECT:

94 u8x8_SetGPIOResult(u8x8, Chip_GPIO_GetPinState(LPC_GPIO, KEY_SELECT_PORT, KEY_SELECT_PIN));

95 break;

96 case U8X8_MSG_GPIO_MENU_NEXT:

97 u8x8_SetGPIOResult(u8x8, Chip_GPIO_GetPinState(LPC_GPIO, KEY_NEXT_PORT, KEY_NEXT_PIN));

98 break;

99 case U8X8_MSG_GPIO_MENU_PREV:

100 u8x8_SetGPIOResult(u8x8, Chip_GPIO_GetPinState(LPC_GPIO, KEY_PREV_PORT, KEY_PREV_PIN));

101 break;

102

103 case U8X8_MSG_GPIO_MENU_HOME:

104 u8x8_SetGPIOResult(u8x8, Chip_GPIO_GetPinState(LPC_GPIO, KEY_HOME_PORT, KEY_HOME_PIN));

105 break;

106 */

Makefile (https://bitbucket.org/rofisoft/stm32f4-discovery-firmware-makefile.git) Makefile · 86 lines

20 #MCFLAGS = -mcpu=$(MCU) -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb-interwork

21 #-mfpu=fpa -mfloat-abi=hard -mthumb-interwork

22 STM32_INCLUDES = -I../../Utilities/STM32F4-Discovery \

23 -I../../Libraries/CMSIS/ST/STM32F4xx/Include/ \

31 OPTIMIZE = -Os

32

33 CFLAGS = $(MCFLAGS) $(OPTIMIZE) $(DEFS) -I./ -I./ $(STM32_INCLUDES) -Wl,-T,stm32_flash.ld

34 AFLAGS = $(MCFLAGS)

35 LDFLAGS = -L../Libraries/CMSIS/Lib/ARM/arm_cortexM4lf_math.lib -L../Libraries/CMSIS/Lib/GCC/libarm_cortexM4lf_math.a

54 ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c \

55 ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c \

56 ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.c \

57 ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c \

58 ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c \

59 ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c \

60 ../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dac.c \

61 ../../Libraries/STM32_USB_OTG_Driver/src/usb_dcd_int.c \

stm32f0xx_hal_flash_ex.d (https://github.com/dekuNukem/daytripper.git) D · 41 lines

1 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c

2 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h

4 tx\stm32f0xx_hal_flash_ex.o: ../Inc/main.h

5 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc.h

6 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_def.h

7 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f0xx.h

8 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f042x6.h

17 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_rcc_ex.h

18 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio.h

19 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h

30 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pcd.h

31 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pcd_ex.h

32 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_pwr.h

40 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart.h

41 tx\stm32f0xx_hal_flash_ex.o: ../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h

42

stm32_eval_legacy.h (https://gitlab.com/21mece13/FreeRTOS) C Header · 205 lines

39 #define USE_STM322xG_EVAL

40 #endif

41 #define STM3220F_LCD_Init STM322xG_LCD_Init

42

43 /* Button Defines Legacy */

50 #define Button_DOWN BUTTON_DOWN

51 #define Button_SEL BUTTON_SEL

52 #define Mode_GPIO BUTTON_MODE_GPIO

53 #define Mode_EXTI BUTTON_MODE_EXTI

54 #define Button_Mode_TypeDef ButtonMode_TypeDef

57

58 /* LCD Defines Legacy */

59 #define LCD_RSNWR_GPIO_CLK LCD_NWR_GPIO_CLK

60 #define LCD_SPI_GPIO_PORT LCD_SPI_SCK_GPIO_PORT

61 #define LCD_SPI_GPIO_CLK LCD_SPI_SCK_GPIO_CLK

62 #define R0 LCD_REG_0

63 #define R1 LCD_REG_1

stm32f4xx_exti.h (https://gitlab.com/paelzer/qemu) C Header · 59 lines

1 /*

2 * STM32F4XX EXTI

3 *

4 * Copyright (c) 2014 Alistair Francis <alistair@alistair23.me>

36 #define EXTI_PR 0x14

37

38 #define TYPE_STM32F4XX_EXTI "stm32f4xx-exti"

39 OBJECT_DECLARE_SIMPLE_TYPE(STM32F4xxExtiState, STM32F4XX_EXTI)

40

41 #define NUM_GPIO_EVENT_IN_LINES 16

42 #define NUM_INTERRUPT_OUT_LINES 16

43

44 struct STM32F4xxExtiState {

45 SysBusDevice parent_obj;

46

Config.h (https://github.com/fredcooke/DSOQuad_SourceCode.git) C Header · 220 lines

6 #define __CONFIG_H

7

8 #include "stm32f10x_lib.h"

9

10 //============================================================================//

166

167

168 #define GPIOA_CRL (*((vu32 *)(0x40010800+0x00)))

169 #define GPIOA_CRH (*((vu32 *)(0x40010800+0x04)))

170 #define GPIOA_IDR (*((vu32 *)(0x40010800+0x08)))

171 #define GPIOA_ODR (*((vu32 *)(0x40010800+0x0C)))

172 #define GPIOA_BSRR (*((vu32 *)(0x40010800+0x10)))

173 #define GPIOA_BRR (*((vu32 *)(0x40010800+0x14)))

up_adc.c (https://gitlab.com/BlueCabbage/NuttX) C · 168 lines

74 #endif

75

76 #if defined(CONFIG_STM32_ADC1) || defined(CONFIG_STM32_ADC2) || defined(CONFIG_STM32_ADC3)

77 #ifndef CONFIG_STM32_ADC3

88 /* The STM3240G-EVAL has a 10 Kohm potentiometer RV1 connected to PF9 of

89 * STM32F407IGH6 on the board: TIM14_CH1/FSMC_CD/ADC3_IN7

90 */

91

133 for (i = 0; i < ADC3_NCHANNELS; i++)

134 {

135 stm32_configgpio(g_pinlist[i]);

136 }

137

165 }

166

167 #endif /* CONFIG_STM32_ADC1 || CONFIG_STM32_ADC2 || CONFIG_STM32_ADC3 */

168 #endif /* CONFIG_ADC */

up_adc.c (https://gitlab.com/BlueCabbage/NuttX) C · 168 lines

74 #endif

75

76 #if defined(CONFIG_STM32_ADC1) || defined(CONFIG_STM32_ADC2) || defined(CONFIG_STM32_ADC3)

77 #ifndef CONFIG_STM32_ADC3

88 /* The STM3220G-EVAL has a 10 Kohm potentiometer RV1 connected to PF9 of

89 * STM32F207IGH6 on the board: TIM14_CH1/FSMC_CD/ADC3_IN7

90 */

91

133 for (i = 0; i < ADC3_NCHANNELS; i++)

134 {

135 stm32_configgpio(g_pinlist[i]);

136 }

137

165 }

166

167 #endif /* CONFIG_STM32_ADC1 || CONFIG_STM32_ADC2 || CONFIG_STM32_ADC3 */

168 #endif /* CONFIG_ADC */

main.h (https://github.com/aegean-odyssey/mpmd_marlin_1.1.x.git) C Header · 76 lines

39

40 /* Includes ------------------------------------------------------------------*/

41 #include "stm32f0xx_ll_bus.h"

42 #include "stm32f0xx_ll_rcc.h"

43 #include "stm32f0xx_ll_system.h"

44 #include "stm32f0xx_ll_utils.h"

45 #include "stm32f0xx_ll_gpio.h"

46 #include "stm32f0xx_ll_crc.h"

47 #if defined(USE_FULL_ASSERT)

48 #include "stm32_assert.h"

49 #endif /* USE_FULL_ASSERT */

50

58 #define LED2_PIN LL_GPIO_PIN_5

59 #define LED2_GPIO_PORT GPIOA

60 #define LED2_GPIO_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOA)

system_stm32f10x.d (https://bitbucket.org/pmt_met/pmi_linux.git) D · 86 lines

6 STM32F10x/stm32f10x_conf.h \

7 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_adc.h \

8 STM32F10x/CMSIS/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h \

18 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_fsmc.h \

19 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_gpio.h \

20 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_i2c.h \

30 STM32F10x/STM32F10x_StdPeriph_Driver/inc/misc.h

31

32 STM32F10x/CMSIS/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h:

33

34 STM32F10x/CMSIS/CM3/CoreSupport/core_cm3.h:

62 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_fsmc.h:

63

64 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_gpio.h:

65

66 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_i2c.h:

ccsbcs.d (https://bitbucket.org/pmt_met/pmi_linux.git) D · 90 lines

6 STM32F10x/stm32f10x_conf.h \

7 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_adc.h \

8 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_bkp.h \

17 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_fsmc.h \

18 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_gpio.h \

19 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_i2c.h \

34 FATFS/src/option/../integer.h:

35

36 STM32F10x/CMSIS/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h:

37

38 STM32F10x/CMSIS/CM3/CoreSupport/core_cm3.h:

64 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_fsmc.h:

65

66 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_gpio.h:

67

68 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_i2c.h:

stm32_autoleds.c (https://bitbucket.org/hg42/nuttx.git) C · 96 lines

67 /* Configure LD2 GPIO for output */

68

69 stm32l4_configgpio(GPIO_LD2);

70 }

71

78 if (led == 1)

79 {

80 stm32l4_gpiowrite(GPIO_LD2, true);

81 }

82 }

90 if (led == 1)

91 {

92 stm32l4_gpiowrite(GPIO_LD2, false);

93 }

94 }

stm32_autoleds.c (https://bitbucket.org/hg42/nuttx.git) C · 96 lines

67 /* Configure LD2 GPIO for output */

68

69 stm32f0_configgpio(GPIO_LD2);

70 }

71

78 if (led == 1)

79 {

80 stm32f0_gpiowrite(GPIO_LD2, true);

81 }

82 }

90 if (led == 1)

91 {

92 stm32f0_gpiowrite(GPIO_LD2, false);

93 }

94 }

stm32f4xx_hal.d (https://gitlab.com/Infrared-KHTN/aulluminate) D · 30 lines

4 final\stm32f4xx_hal.o: ../Inc/main.h

5 final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h

6 final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h

14 final\stm32f4xx_hal.o: ../Drivers/CMSIS/Include/core_cmSimd.h

15 final\stm32f4xx_hal.o: ../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h

16 final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h

17 final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

18 final\stm32f4xx_hal.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h

19 final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h

20 final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h

21 final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h

22 final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h

23 final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h

main.h (https://github.com/STMicroelectronics/STM32CubeF4.git) C Header · 82 lines

25 #include "stm32f4xx_ll_bus.h"

26 #include "stm32f4xx_ll_rcc.h"

27 #include "stm32f4xx_ll_system.h"

28 #include "stm32f4xx_ll_utils.h"

29 #include "stm32f4xx_ll_gpio.h"

30 #include "stm32f4xx_ll_exti.h"

31 #include "stm32f4xx_ll_dma.h"

32 #include "stm32f4xx_ll_tim.h"

46 #define LED1_PIN LL_GPIO_PIN_0

47 #define LED1_GPIO_PORT GPIOB

48 #define LED1_GPIO_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOB)

61 #define USER_BUTTON_GPIO_PORT GPIOC

62 #define USER_BUTTON_GPIO_CLK_ENABLE() LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_GPIOC)

63 #define USER_BUTTON_EXTI_LINE LL_EXTI_LINE_13

64 #define USER_BUTTON_EXTI_IRQn EXTI15_10_IRQn

stm32f469-disco.dts (https://gitlab.com/oyvholm/linux) Device Tree · 134 lines

47

48 /dts-v1/;

49 #include "stm32f429.dtsi"

50 #include "stm32f469-pinctrl.dtsi"

53 model = "STMicroelectronics STM32F469i-DISCO board";

54 compatible = "st,stm32f469i-disco", "st,stm32f469";

55

56 chosen {

75 compatible = "regulator-fixed";

76 enable-active-high;

77 gpio = <&gpiob 2 0>;

78 regulator-name = "vcc5_host1";

79 regulator-always-on;

82

83 &rcc {

84 compatible = "st,stm32f469-rcc", "st,stm32f42xx-rcc", "st,stm32-rcc";

85 };

86

main.cpp (https://github.com/modm-io/modm.git) C++ · 127 lines

17

18 /**

19 * Example of CAN Hardware on STM32 F3 Discovery Board.

20 *

21 * Connect PB8 / PB9 to a CAN transceiver which is connected to a CAN bus.

76

77 // Initialize Usart

78 Usart2::connect<GpioOutputA2::Tx>();

79 Usart2::initialize<Board::SystemClock, 115200_Bd>();

80

83 MODM_LOG_INFO << "Initializing Can ..." << modm::endl;

84 // Initialize Can

85 Can::connect<GpioInputB8::Rx, GpioOutputB9::Tx>(Gpio::InputType::PullUp);

86 Can::initialize<Board::SystemClock, 125_kbps>(9);

87

hw_led.h (https://github.com/imby/STM32VLDiscovery_BeRTOS.git) C Header · 71 lines

47

48 #define LED_PIN BV(8)

49 #define LED_GPIO_BASE ((struct stm32_gpio *)GPIOC_BASE)

50

51 #define LED_ON() \

52 do { \

53 stm32_gpioPinWrite(LED_GPIO_BASE, LED_PIN, 1); \

54 } while (0)

55

56 #define LED_OFF() \

57 do { \

58 stm32_gpioPinWrite(LED_GPIO_BASE, LED_PIN, 0); \

59 } while (0)

60

65 /* Configure the LED pin as GPIO */ \

66 stm32_gpioPinConfig(LED_GPIO_BASE, \

67 LED_PIN, GPIO_MODE_OUT_PP, \

Makefile (https://gitlab.com/jiangming1399/u-boot) Makefile · 47 lines

7 obj-$(CONFIG_DM_I2C) += i2c-uclass.o

8 obj-$(CONFIG_DM_I2C_COMPAT) += i2c-uclass-compat.o

9 obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o

10 obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o

11 obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o

38 obj-$(CONFIG_SYS_I2C_SH) += sh_i2c.o

39 obj-$(CONFIG_SYS_I2C_SOFT) += soft_i2c.o

40 obj-$(CONFIG_SYS_I2C_STM32F7) += stm32f7_i2c.o

41 obj-$(CONFIG_SYS_I2C_TEGRA) += tegra_i2c.o

42 obj-$(CONFIG_SYS_I2C_UNIPHIER) += i2c-uniphier.o

stm32f0xx_conf.h (https://github.com/lab11/polypoint.git) C Header · 83 lines

1 /**

2 ******************************************************************************

3 * @file GPIO/GPIO_IOToggle/stm32f0xx_conf.h

4 * @author MCD Application Team

5 * @version V1.4.0

34 #include "stm32f0xx_adc.h"

35 #include "stm32f0xx_can.h"

36 #include "stm32f0xx_cec.h"

42 #include "stm32f0xx_dma.h"

43 #include "stm32f0xx_exti.h"

44 #include "stm32f0xx_flash.h"

45 #include "stm32f0xx_gpio.h"

46 #include "stm32f0xx_i2c.h"

53 #include "stm32f0xx_tim.h"

54 #include "stm32f0xx_usart.h"

55 #include "stm32f0xx_wwdg.h"

stm32f3xx_ll_opamp.c (https://github.com/stm32duino/Arduino_Core_STM32.git) C · 238 lines

1 /**

2 ******************************************************************************

3 * @file stm32f3xx_ll_opamp.c

4 * @author MCD Application Team

5 * @brief OPAMP LL module driver

20

21 /* Includes ------------------------------------------------------------------*/

22 #include "stm32f3xx_ll_opamp.h"

23

24 #ifdef USE_FULL_ASSERT

25 #include "stm32_assert.h"

26 #else

27 #define assert_param(expr) ((void)0U)

stm32f37x_conf.h (https://github.com/avikde/koduino.git) C Header · 83 lines

32 /* Includes ------------------------------------------------------------------*/

33 /* Comment the line below to disable peripheral header file inclusion */

34 #include "stm32f37x_adc.h"

35 #include "stm32f37x_can.h"

36 #include "stm32f37x_cec.h"

37 #include "stm32f37x_crc.h"

38 #include "stm32f37x_comp.h"

39 #include "stm32f37x_dac.h"

43 #include "stm32f37x_flash.h"

44 #include "stm32f37x_gpio.h"

45 #include "stm32f37x_syscfg.h"

53 #include "stm32f37x_tim.h"

54 #include "stm32f37x_usart.h"

55 #include "stm32f37x_wwdg.h"

stm32_gpiov2_port.xsd (https://bitbucket.org/doudoudou/incas.git) XML Schema · 214 lines

4 xmlns:xs="http://www.w3.org/2001/XMLSchema">

5

6 <xs:complexType name="STM32GPIOv2PortType">

7

8 <xs:sequence>

9 <xs:element

10 name="pin0"

11 type="STM32GPIOv2PinType"

12 maxOccurs="1"

13 minOccurs="1"></xs:element>

14 <xs:element

15 name="pin1"

16 type="STM32GPIOv2PinType"

17 maxOccurs="1"

18 minOccurs="1"></xs:element>

stm32f4xx_conf.h (https://github.com/nabilt/STM32F4-Discovery-Firmware.git) C Header · 94 lines

25

26 #if defined (HSE_VALUE)

27 /* Redefine the HSE value; it's equal to 8 MHz on the STM32F4-DISCOVERY Kit */

28 #undef HSE_VALUE

29 #define HSE_VALUE ((uint32_t)8000000)

32 /* Includes ------------------------------------------------------------------*/

33 /* Uncomment the line below to enable peripheral header file inclusion */

34 #include "stm32f4xx_adc.h"

35 #include "stm32f4xx_can.h"

43 #include "stm32f4xx_flash.h"

44 #include "stm32f4xx_fsmc.h"

45 #include "stm32f4xx_hash.h"

46 #include "stm32f4xx_gpio.h"

47 #include "stm32f4xx_i2c.h"

49 #include "stm32f4xx_pwr.h"

50 #include "stm32f4xx_rcc.h"

51 #include "stm32f4xx_rng.h"

stm32mp131.dtsi (https://gitlab.com/dieselnutjob/linux-next) Device Tree · 283 lines

184 };

185

186 gpiob: gpio@50003000 {

187 gpio-controller;

244 };

245

246 gpiog: gpio@50008000 {

247 gpio-controller;

256 };

257

258 gpioh: gpio@50009000 {

259 gpio-controller;

268 };

269

270 gpioi: gpio@5000a000 {

271 gpio-controller;

platform_config.h (https://github.com/zaurus04/cortexm3.git) C Header · 44 lines

23 /* Uncomment the line corresponding to the STMicroelectronics evaluation board

24 used to run the example */

25 #if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL)

26 //#define USE_STM3210B_EVAL

27 #define USE_STM3210E_EVAL

28 #endif

29

30 /* Define the STM32F10x hardware depending on the used evaluation board */

31 #ifdef USE_STM3210B_EVAL

32 #define GPIO_LED GPIOC

33 #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOC

34 #elif defined USE_STM3210E_EVAL

35 #define GPIO_LED GPIOF

36 #define RCC_APB2Periph_GPIO_LED RCC_APB2Periph_GPIOF