PageRenderTime 160ms queryTime 27ms sortTime 3ms getByIdsTime 41ms findMatchingLines 38ms

100+ results results for 'stm32 gpio' (160 ms)

Not the results you expected?
usbhw.c https://github.com/FlameN/STM32RUNO.git | C | 507 lines
                    
4 *      Name:    USBHW.C
                    
5 *      Purpose: USB Hardware Layer Module for ST STM32F10x
                    
6 *      Version: V1.10
                    
17
                    
18#include "stm32f10x.h"                            // stm32f10x definitions
                    
19
                    
95  /* Control USB connecting via SW */
                    
96  RCC->APB2ENR |= (1 << 5);                 /* enable clock for GPIOD */
                    
97  GPIOD->CRL &= ~0x00000F00;                /* clear port PD2 */
                    
97  GPIOD->CRL &= ~0x00000F00;                /* clear port PD2 */
                    
98  GPIOD->CRL |=  0x00000700;                /* PD2 General purpose output open-drain, max speed 50 MHz */
                    
99  GPIOD->BRR  = 0x0004;                     /* reset PD2  (set to low) */
                    
                
stm32_eval.h https://github.com/FlameN/STM32RUNO.git | C Header | 369 lines
                    
141
                    
142#if !defined (USE_STM32100B_EVAL) && !defined (USE_STM3210B_EVAL) &&  !defined (USE_STM3210E_EVAL)\
                    
143   &&  !defined (USE_STM3210C_EVAL) &&  !defined (USE_STM32L152_EVAL) &&  !defined (USE_STM32100E_EVAL)
                    
168 #include "stm32f10x.h"
                    
169 #include "stm32100e_eval/stm32100e_eval.h"
                    
170#else
                    
170#else
                    
171 #error "Please select first the STM32 EVAL board to be used (in stm32_eval.h)"
                    
172#endif
                    
185#define Button_SEL           BUTTON_SEL
                    
186#define Mode_GPIO            BUTTON_MODE_GPIO
                    
187#define Mode_EXTI            BUTTON_MODE_EXTI
                    
194  */
                    
195#define LCD_RSNWR_GPIO_CLK  LCD_NWR_GPIO_CLK
                    
196#define LCD_SPI_GPIO_PORT   LCD_SPI_SCK_GPIO_PORT
                    
                
pios_adc.c https://gitlab.com/sonium/librepilot | C | 391 lines
                    
5 * @addtogroup   PIOS_ADC ADC Functions
                    
6 * @brief STM32 ADC PIOS interface
                    
7 * @{
                    
74/* Local Variables */
                    
75static GPIO_TypeDef *ADC_GPIO_PORT[PIOS_ADC_NUM_PINS] = PIOS_ADC_PORTS;
                    
76static const uint32_t ADC_GPIO_PIN[PIOS_ADC_NUM_PINS] = PIOS_ADC_PINS;
                    
125    /* Setup analog pins */
                    
126    GPIO_InitTypeDef GPIO_InitStructure;
                    
127    GPIO_StructInit(&GPIO_InitStructure);
                    
127    GPIO_StructInit(&GPIO_InitStructure);
                    
128    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
                    
129    GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_AIN;
                    
132    for (int32_t i = 0; i < PIOS_ADC_NUM_PINS; i++) {
                    
133        GPIO_InitStructure.GPIO_Pin = ADC_GPIO_PIN[i];
                    
134        GPIO_Init(ADC_GPIO_PORT[i], &GPIO_InitStructure);
                    
                
stm32_usb.c https://bitbucket.org/hg42/nuttx.git | C | 311 lines
                    
153
                    
154  stm32_configgpio(GPIO_OTGFS_VBUS);
                    
155  stm32_configgpio(GPIO_OTGFS_PWRON);
                    
155  stm32_configgpio(GPIO_OTGFS_PWRON);
                    
156  stm32_configgpio(GPIO_OTGFS_OVER);
                    
157#endif
                    
256
                    
257      stm32_gpiowrite(GPIO_OTGFS_PWRON, false);
                    
258    }
                    
262
                    
263      stm32_gpiowrite(GPIO_OTGFS_PWRON, true);
                    
264    }
                    
287{
                    
288  return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg);
                    
289}
                    
                
pios_tim.c https://bitbucket.org/qbingx/librepilot.git | C | 374 lines
                    
77        break;
                    
78#ifdef STM32F10X_HD
                    
79    case (uint32_t)TIM5:
                    
136
                    
137        /* Enable the peripheral clock for the GPIO */
                    
138        switch ((uint32_t)chan->pin.gpio) {
                    
138        switch ((uint32_t)chan->pin.gpio) {
                    
139        case (uint32_t)GPIOA:
                    
140            RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
                    
141            break;
                    
142        case (uint32_t)GPIOB:
                    
143            RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
                    
151        }
                    
152        GPIO_Init(chan->pin.gpio, &chan->pin.init);
                    
153
                    
                
stm32f1xx_hal_conf.h https://gitlab.com/david.furminieux/zephyr-os | C Header | 367 lines
                    
41#ifndef __STM32F1xx_HAL_CONF_H
                    
42#define __STM32F1xx_HAL_CONF_H
                    
43
                    
64#define HAL_FLASH_MODULE_ENABLED
                    
65#define HAL_GPIO_MODULE_ENABLED
                    
66#define HAL_HCD_MODULE_ENABLED
                    
225#ifdef HAL_GPIO_MODULE_ENABLED
                    
226 #include "stm32f1xx_hal_gpio.h"
                    
227#endif /* HAL_GPIO_MODULE_ENABLED */
                    
261#ifdef HAL_FLASH_MODULE_ENABLED
                    
262 #include "stm32f1xx_hal_flash.h"
                    
263#endif /* HAL_FLASH_MODULE_ENABLED */
                    
338#ifdef HAL_HCD_MODULE_ENABLED
                    
339 #include "stm32f1xx_hal_hcd.h"
                    
340#endif /* HAL_HCD_MODULE_ENABLED */   
                    
                
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
                    
250#define sFLASH_SPI_MISO_PIN              GPIO_Pin_6                  /* PA.06 */
                    
251#define sFLASH_SPI_MISO_GPIO_PORT        GPIOA                       /* GPIOA */
                    
252#define sFLASH_SPI_MISO_GPIO_CLK         RCC_APB2Periph_GPIOA
                    
275#define LM75_I2C_SDA_PIN                 GPIO_Pin_7                  /* PB.07 */
                    
276#define LM75_I2C_SDA_GPIO_PORT           GPIOB                       /* GPIOB */
                    
277#define LM75_I2C_SDA_GPIO_CLK            RCC_APB2Periph_GPIOB
                    
278#define LM75_I2C_SMBUSALERT_PIN          GPIO_Pin_5                  /* PB.05 */
                    
279#define LM75_I2C_SMBUSALERT_GPIO_PORT    GPIOB                       /* GPIOB */
                    
280#define LM75_I2C_SMBUSALERT_GPIO_CLK     RCC_APB2Periph_GPIOB
                    
                
main.c https://bitbucket.org/philpem/stm32_spl | C | 281 lines
                    
22/* Includes ------------------------------------------------------------------*/
                    
23#include "stm32f10x.h"
                    
24
                    
71  /* GPIO configuration ------------------------------------------------------*/
                    
72  GPIO_Configuration();
                    
73
                    
223{
                    
224  GPIO_InitTypeDef GPIO_InitStructure;
                    
225
                    
227     ADC Channel14) as analog inputs */
                    
228  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4;
                    
229  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
                    
229  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
                    
230  GPIO_Init(GPIOC, &GPIO_InitStructure);
                    
231}
                    
                
stm32f3xx_hal_conf.h https://bitbucket.org/teknohan/mastering-stm32-book-example.git | C Header | 341 lines
                    
84//#define HAL_PCD_MODULE_ENABLED   
                    
85#define HAL_GPIO_MODULE_ENABLED
                    
86#define HAL_DMA_MODULE_ENABLED
                    
186#ifdef HAL_RCC_MODULE_ENABLED
                    
187 #include "stm32f3xx_hal_rcc.h"
                    
188#endif /* HAL_RCC_MODULE_ENABLED */
                    
190#ifdef HAL_GPIO_MODULE_ENABLED
                    
191 #include "stm32f3xx_hal_gpio.h"
                    
192#endif /* HAL_GPIO_MODULE_ENABLED */
                    
242#ifdef HAL_PCCARD_MODULE_ENABLED
                    
243  #include "stm32f3xx_hal_pccard.h"
                    
244#endif /* HAL_PCCARD_MODULE_ENABLED */ 
                    
298#ifdef HAL_TIM_MODULE_ENABLED
                    
299 #include "stm32f3xx_hal_tim.h"
                    
300#endif /* HAL_TIM_MODULE_ENABLED */
                    
                
stm3210e-eval.h https://bitbucket.org/sanyaade/nuttx_boards.git | C Header | 346 lines
                    
98
                    
99#define GPIO_BTN_WAKEUP  (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
                    
100                          GPIO_PORTA|GPIO_PIN0)
                    
102                          GPIO_PORTC|GPIO_PIN13)
                    
103#define GPIO_BTN_KEY     (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
                    
104                          GPIO_EXTI|GPIO_PORTG|GPIO_PIN8)
                    
109                          GPIO_EXTI|GPIO_PORTD|GPIO_PIN3)
                    
110#define GPIO_JOY_LEFT    (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|\
                    
111                          GPIO_EXTI|GPIO_PORTG|GPIO_PIN14)
                    
133
                    
134#define GPIO_USB_PULLUP (GPIO_OUTPUT|GPIO_CNF_OUTOD|GPIO_MODE_50MHz|\
                    
135                         GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN14)
                    
223
                    
224void stm32_extmemgpios(const uint16_t *gpios, int ngpios);
                    
225
                    
                
board.h https://bitbucket.org/erwinkendo/unas.git | C Header | 255 lines
                    
24/*
                    
25 * Setup for the STMicroelectronics STM3210E-EVAL evaluation board.
                    
26 */
                    
30 */
                    
31#define BOARD_ST_STM3210E_EVAL
                    
32#define BOARD_NAME              "ST STM3210E-EVAL"
                    
36 */
                    
37#define STM32_LSECLK            32768
                    
38#define STM32_HSECLK            8000000
                    
41 * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
                    
42 * Note: Older board revisions should define STM32F10X_HD instead, please
                    
43 *       verify the STM32 model mounted on your board. The change also
                    
45 */
                    
46#define STM32F10X_XL
                    
47
                    
                
nucleo-l476rg.h https://bitbucket.org/benchmark-electronics/nuttx.git | C Header | 424 lines
                    
95#define GPIO_LD2 \
                    
96  (GPIO_PORTA | GPIO_PIN5 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_PULLUP | \
                    
97   GPIO_SPEED_50MHz)
                    
264
                    
265#define GPIO_IN1          (GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN0)
                    
266#define GPIO_OUT1         (GPIO_OUTPUT | GPIO_OUTPUT | GPIO_SPEED_50MHz | \
                    
267                           GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN1)
                    
268#define GPIO_INT1         (GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN2)
                    
269
                    
269
                    
270#define GPIO_HTS221_INT   (GPIO_INPUT | GPIO_FLOAT | GPIO_PORTA | GPIO_PIN10)
                    
271#define GPIO_LSM6DSL_INT1 (GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN4)
                    
271#define GPIO_LSM6DSL_INT1 (GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN4)
                    
272#define GPIO_LSM6DSL_INT2 (GPIO_INPUT | GPIO_FLOAT | GPIO_PORTB | GPIO_PIN5)
                    
273
                    
                
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 \
                    
61
                    
62C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:
                    
63
                    
85
                    
86C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:
                    
87
                    
87
                    
88C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h:
                    
89
                    
111
                    
112C:/Projects/AC6Workspace/Proba/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rtc_ex.h:
                    
113
                    
                
stm32f4xx_hal_msp.c https://gitlab.com/BGCX261/zhonx3-svn-to-git.git | C | 503 lines
                    
70    */
                    
71    GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3 
                    
72                          |GPIO_PIN_4|GPIO_PIN_5;
                    
76
                    
77    GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5 
                    
78                          |GPIO_PIN_6|GPIO_PIN_7;
                    
124    */
                    
125    HAL_GPIO_DeInit(GPIOC, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3 
                    
126                          |GPIO_PIN_4|GPIO_PIN_5);
                    
127
                    
128    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1|GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5 
                    
129                          |GPIO_PIN_6|GPIO_PIN_7);
                    
434    */
                    
435    HAL_GPIO_DeInit(GPIOC, GPIO_PIN_6|GPIO_PIN_9);
                    
436
                    
                
board-omap3beagle.c https://github.com/robots/Beagleboard-OSy2010.git | C | 596 lines
                    
160#if 0 /* TODO: This needs to be modified to not rely on u-boot */
                    
161	gpio_request(gpio + 1, "EHCI_nOC");
                    
162	gpio_direction_input(gpio + 1);
                    
164	/* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */
                    
165	gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR");
                    
166	gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1);
                    
169	/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
                    
170	gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
                    
171	return 0;
                    
385
                    
386static struct gpio_led_platform_data gpio_led_info = {
                    
387	.leds		= gpio_leds,
                    
425	if (display->hw_config.panel_reset_gpio != -1)
                    
426		gpio_set_value(display->hw_config.panel_reset_gpio, 1);
                    
427
                    
                
main.c https://gitlab.com/willemwouters/STM32F.git | C | 227 lines
                    
179  /* GPIOC Configuration: TIM3 CH1 (PC6), TIM3 CH2 (PC7), TIM3 CH2 (PC8) and TIM3 CH4 (PC9) */
                    
180  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9;
                    
181  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
                    
181  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;
                    
182  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
                    
183  GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
                    
184  GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ;
                    
185  GPIO_Init(GPIOC, &GPIO_InitStructure); 
                    
186    
                    
188  GPIO_PinAFConfig(GPIOC, GPIO_PinSource6, GPIO_AF_TIM3);
                    
189  GPIO_PinAFConfig(GPIOC, GPIO_PinSource7, GPIO_AF_TIM3); 
                    
190  GPIO_PinAFConfig(GPIOC, GPIO_PinSource8, GPIO_AF_TIM3);
                    
190  GPIO_PinAFConfig(GPIOC, GPIO_PinSource8, GPIO_AF_TIM3);
                    
191  GPIO_PinAFConfig(GPIOC, GPIO_PinSource9, GPIO_AF_TIM3);
                    
192
                    
                
config.d https://gitlab.com/jakubrak/wiced-sdk-3-0-1 | D | 134 lines
                    
75 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_adc.h \
                    
76 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_can.h \
                    
77 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_crc.h \
                    
83 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_exti.h \
                    
84 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_flash.h \
                    
85 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_fsmc.h \
                    
86 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_hash.h \
                    
87 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_gpio.h \
                    
88 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_i2c.h \
                    
94 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_sdio.h \
                    
95 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_spi.h \
                    
96 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_syscfg.h \
                    
102 WICED/platform/MCU/STM32F4xx/peripherals/libraries/STM32_CPAL_Driver/inc/cpal_i2c.h \
                    
103 WICED/platform/MCU/STM32F4xx/peripherals/libraries/STM32_CPAL_Driver/devices/stm32f4xx/cpal_i2c_hal_stm32f4xx.h \
                    
104 WICED/platform/MCU/STM32F4xx/peripherals/libraries/STM32_CPAL_Driver/inc/cpal.h \
                    
                
wiced_cooee.d https://gitlab.com/jakubrak/wiced-sdk-3-0-1 | D | 135 lines
                    
81 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_exti.h \
                    
82 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_flash.h \
                    
83 WICED/platform/MCU/STM32F4xx/peripherals/libraries/inc/stm32f4xx_fsmc.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 \
                    
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 \
                    
                
oled.c https://gitlab.com/ondrejsika-other/hww | C | 406 lines
                    
19
                    
20#include <libopencm3/stm32/gpio.h>
                    
21#include <libopencm3/stm32/spi.h>
                    
50#define SPI_BASE			SPI1
                    
51#define OLED_DC_PORT			GPIOB
                    
52#define OLED_DC_PIN			GPIO0	// PB0 | Data/Command
                    
52#define OLED_DC_PIN			GPIO0	// PB0 | Data/Command
                    
53#define OLED_CS_PORT			GPIOA
                    
54#define OLED_CS_PIN			GPIO4	// PA4 | SPI Select
                    
54#define OLED_CS_PIN			GPIO4	// PA4 | SPI Select
                    
55#define OLED_RST_PORT			GPIOB
                    
56#define OLED_RST_PIN			GPIO1	// PB1 | Reset display
                    
124
                    
125	gpio_clear(OLED_DC_PORT, OLED_DC_PIN);		// set to CMD
                    
126	gpio_set(OLED_CS_PORT, OLED_CS_PIN);		// SPI deselect
                    
                
hw_config.c https://github.com/mwalecki/ptbldc.git | C | 382 lines
                    
78{
                    
79#if defined(STM32L1XX_MD) || defined(STM32L1XX_HD) || defined(STM32L1XX_MD_PLUS) 
                    
80  /* Enable USB clock */
                    
95  RCC_APB1PeriphClockCmd(RCC_APB1Periph_USB, ENABLE);
                    
96#endif /* STM32F10X_CL */
                    
97}
                    
147
                    
148#if defined(STM32L1XX_MD) || defined(STM32L1XX_HD) || defined(STM32L1XX_MD_PLUS) 
                    
149  NVIC_InitStructure.NVIC_IRQChannel = USB_LP_IRQn;
                    
168  NVIC_Init(&NVIC_InitStructure);
                    
169#endif /* STM32L1XX_XD */
                    
170}
                    
310
                    
311#if defined(STM32L1XX_MD) || defined(STM32L1XX_HD) || defined(STM32L1XX_MD_PLUS) 
                    
312  Device_Serial0 = *(uint32_t*)(0x1FF80050);
                    
                
PinNames.h https://gitlab.com/hufan/mbed_hufan | C Header | 261 lines
                    
38
                    
39// See stm32f4xx_hal_gpio.h and stm32f4xx_hal_gpio_ex.h for values of MODE, PUPD and AFNUM
                    
40#define STM_PIN_DATA(MODE, PUPD, AFNUM)  ((int)(((AFNUM) << 7) | ((PUPD) << 4) | ((MODE) << 0)))
                    
                
platform_int.c https://github.com/mwilbur/elua.git | C | 413 lines
                    
261{
                    
262  return gpioh_set_int_status( INT_GPIO_POSEDGE, resnum, status );
                    
263}
                    
279{
                    
280  return gpioh_set_int_status( INT_GPIO_NEGEDGE, resnum, status );
                    
281}
                    
284{
                    
285  return gpioh_get_int_status( INT_GPIO_NEGEDGE, resnum );
                    
286}
                    
289{
                    
290  return gpioh_get_int_flag( INT_GPIO_NEGEDGE, resnum, clear );
                    
291}
                    
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 },
                    
                
usbh_msc_fatfs.d https://bitbucket.org/trottagio/stm32f4-discovery-firmware-makefile.git | D | 56 lines
                    
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
                    
20.\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_exti.h
                    
21.\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_flash.h
                    
22.\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_fsmc.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
                    
30.\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_rtc.h
                    
31.\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_sdio.h
                    
32.\MEDIA_USB_KEY\usbh_msc_fatfs.o: ..\..\..\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_spi.h
                    
                
main.c https://gitlab.com/avr_master/Doggy_SFP | C | 224 lines
                    
171{
                    
172  GPIO_InitTypeDef GPIO_InitStructure;
                    
173
                    
183  GPIO_InitStructure.GPIO_Pin = USARTy_TxPin;
                    
184  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
185  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
                    
185  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
                    
186  GPIO_Init(USARTy_GPIO, &GPIO_InitStructure);
                    
187  
                    
188  /* Configure USARTy Rx as input floating */
                    
189  GPIO_InitStructure.GPIO_Pin = USARTy_RxPin;
                    
190  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
                    
190  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
                    
191  GPIO_Init(USARTy_GPIO, &GPIO_InitStructure);
                    
192}
                    
                
up_nsh.c https://gitlab.com/BlueCabbage/NuttX | C | 232 lines
                    
1/****************************************************************************
                    
2 * config/stm3220g_eval/src/up_nsh.c
                    
3 * arch/arm/src/board/up_nsh.c
                    
57
                    
58#ifdef CONFIG_STM32_OTGFS
                    
59#  include "stm32_usbhost.h"
                    
62#include "stm32.h"
                    
63#include "stm3220g-internal.h"
                    
64
                    
93
                    
94#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO)
                    
95#  undef HAVE_MMCSD
                    
210  /* Then let's guess and say that there is a card in the slot.  I need to check to
                    
211   * see if the STM3220G-EVAL board supports a GPIO to detect if there is a card in
                    
212   * the slot.
                    
                
stm32_leds.c https://bitbucket.org/sanyaade/nuttx_boards.git | C | 311 lines
                    
92    {
                    
93      stm32_gpiowrite(GPIO_LED2, false);
                    
94    }
                    
153
                    
154  stm32_configgpio(GPIO_LED1);
                    
155  stm32_configgpio(GPIO_LED2);
                    
156  stm32_configgpio(GPIO_LED3);
                    
157  stm32_configgpio(GPIO_LED4);
                    
158}
                    
206    case 4:
                    
207      stm32_gpiowrite(GPIO_LED4, false);
                    
208      break;
                    
245    case 4:
                    
246      stm32_gpiowrite(GPIO_LED4, true);
                    
247      break;
                    
                
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 \
                    
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 \
                    
                
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");
                    
144//					printf("1\n");
                    
145//					HAL_GPIO_WritePin(GPIOC, GPIO_PIN_4, GPIO_PIN_SET);
                    
146//				}
                    
                
stm32_exti.h https://bitbucket.org/sanyaade/nuttx_arch.git | C Header | 131 lines
                    
49
                    
50#if defined(CONFIG_STM32F7_STM32F74XX) || defined(CONFIG_STM32F7_STM32F75XX)
                    
51
                    
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)
                    
73#define STM32_EXTI_RTSR          (STM32_EXTI_BASE+STM32_EXTI_RTSR_OFFSET)
                    
74#define STM32_EXTI_FTSR          (STM32_EXTI_BASE+STM32_EXTI_FTSR_OFFSET)
                    
75#define STM32_EXTI_SWIER         (STM32_EXTI_BASE+STM32_EXTI_SWIER_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
                    
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
                    
2  ******************************************************************************
                    
3  * @file    stm32f7xx_it.c
                    
4  * @brief   Interrupt Service Routines.
                    
33/* Includes ------------------------------------------------------------------*/
                    
34#include "stm32f7xx_hal.h"
                    
35#include "stm32f7xx.h"
                    
35#include "stm32f7xx.h"
                    
36#include "stm32f7xx_it.h"
                    
37#include "cmsis_os.h"
                    
177/******************************************************************************/
                    
178/* STM32F7xx Peripheral Interrupt Handlers                                    */
                    
179/* Add here the Interrupt Handlers for the used peripherals.                  */
                    
289  /* USER CODE END EXTI15_10_IRQn 0 */
                    
290  HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_14);
                    
291  /* USER CODE BEGIN EXTI15_10_IRQn 1 */
                    
                
STM32H7.mk https://repo.or.cz/betaflight.git | Makefile | 285 lines
                    
12#STDPERIPH
                    
13STDPERIPH_DIR   = $(ROOT)/lib/main/STM32H7/Drivers/STM32H7xx_HAL_Driver
                    
14STDPERIPH_SRC   = $(notdir $(wildcard $(STDPERIPH_DIR)/Src/*.c))
                    
101
                    
102USBCDC_DIR = $(ROOT)/lib/main/STM32H7/Middlewares/ST/STM32_USB_Device_Library/Class/CDC
                    
103USBCDC_SRC = $(notdir $(wildcard $(USBCDC_DIR)/Src/*.c))
                    
106
                    
107USBHID_DIR = $(ROOT)/lib/main/STM32H7/Middlewares/ST/STM32_USB_Device_Library/Class/HID
                    
108USBHID_SRC = $(notdir $(wildcard $(USBHID_DIR)/Src/*.c))
                    
109
                    
110USBMSC_DIR = $(ROOT)/lib/main/STM32H7/Middlewares/ST/STM32_USB_Device_Library/Class/MSC
                    
111USBMSC_SRC = $(notdir $(wildcard $(USBMSC_DIR)/Src/*.c))
                    
133                   $(CMSIS_DIR)/Core/Include \
                    
134                   $(ROOT)/lib/main/STM32H7/Drivers/CMSIS/Device/ST/STM32H7xx/Include \
                    
135                   $(ROOT)/src/main/vcp_hal
                    
                
stm32_spi.c https://bitbucket.org/hg42/nuttx.git | C | 194 lines
                    
55
                    
56#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3)
                    
57
                    
65 * Description:
                    
66 *   Called to configure SPI chip select GPIO pins for the Mikroe Clicker2 STM32 board.
                    
67 *
                    
76/****************************************************************************
                    
77 * Name:  stm32_spi1/2/3select and stm32_spi1/2/3status
                    
78 *
                    
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
                    
193
                    
194#endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI2 */
                    
195
                    
                
USBHAL_STM32F303ZE.h https://github.com/adamgreen/gcc4mbed.git | C Header | 128 lines
                    
17*/
                    
18#ifndef USBHAL_STM32F303ZE_H
                    
19#define USBHAL_STM32F303ZE_H
                    
45	uint32_t pBufRx0[MAX_PACKET_SIZE_EP0>>2];
                    
46    gpio_t usb_switch;
                    
47}USBHAL_Private_t;
                    
55    USBHAL_Private_t *priv=((USBHAL_Private_t *)(hpcd->pData));
                    
56    gpio_write(&(priv->usb_switch),state);
                    
57}
                    
102    instance = this;
                    
103    __HAL_RCC_GPIOA_CLK_ENABLE();
                    
104    /* Configure USB DM pin. This is optional, and maintained only for user guidance. */
                    
104    /* Configure USB DM pin. This is optional, and maintained only for user guidance. */
                    
105    pin_function(PA_11, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF14_USB));
                    
106    pin_function(PA_12, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF14_USB));
                    
                
main.c https://bitbucket.org/pedromalagon/lse2018.git | C | 176 lines
                    
120  /* Reset value is LL_GPIO_SPEED_FREQ_LOW */
                    
121  //LL_GPIO_SetPinSpeed(LED2_GPIO_PORT, LED2_PIN, LL_GPIO_SPEED_FREQ_LOW);
                    
122  /* Reset value is LL_GPIO_PULL_NO */
                    
122  /* Reset value is LL_GPIO_PULL_NO */
                    
123  //LL_GPIO_SetPinPull(LED2_GPIO_PORT, LED2_PIN, LL_GPIO_PULL_NO);
                    
124}
                    
136  /* Configure the MCO pin in alternate function mode */
                    
137  LL_GPIO_SetPinMode(GPIOA, LL_GPIO_PIN_8, LL_GPIO_MODE_ALTERNATE);
                    
138  LL_GPIO_SetPinOutputType(GPIOA, LL_GPIO_PIN_8, LL_GPIO_OUTPUT_PUSHPULL);
                    
138  LL_GPIO_SetPinOutputType(GPIOA, LL_GPIO_PIN_8, LL_GPIO_OUTPUT_PUSHPULL);
                    
139  LL_GPIO_SetPinSpeed(GPIOA, LL_GPIO_PIN_8, LL_GPIO_SPEED_FREQ_HIGH);
                    
140  LL_GPIO_SetPinPull(GPIOA, LL_GPIO_PIN_8, LL_GPIO_PULL_NO);
                    
140  LL_GPIO_SetPinPull(GPIOA, LL_GPIO_PIN_8, LL_GPIO_PULL_NO);
                    
141  LL_GPIO_SetAFPin_8_15(GPIOA, LL_GPIO_PIN_8, LL_GPIO_AF_0);
                    
142  
                    
                
stm32469i_eval_qspi.h https://bitbucket.org/pedromalagon/lse2018.git | C Header | 172 lines
                    
83#define QSPI_CS_GPIO_CLK_DISABLE()  __HAL_RCC_GPIOB_CLK_DISABLE()
                    
84#define QSPI_DX_CLK_GPIO_CLK_ENABLE() __HAL_RCC_GPIOF_CLK_ENABLE()
                    
85#define QSPI_DX_CLK_GPIO_CLK_DISABLE()  __HAL_RCC_GPIOF_CLK_DISABLE()
                    
93#define QSPI_CLK_PIN               GPIO_PIN_10
                    
94#define QSPI_CLK_GPIO_PORT         GPIOF
                    
95#define QSPI_D0_PIN                GPIO_PIN_8
                    
98#define QSPI_D3_PIN                GPIO_PIN_6
                    
99#define QSPI_DX_GPIO_PORT          GPIOF
                    
100
                    
106/* Exported types ------------------------------------------------------------*/
                    
107/** @defgroup STM32446E_EVAL_QSPI_Exported_Types STM32469I EVAL QSPI Exported Types
                    
108  * @{
                    
130/* Exported functions --------------------------------------------------------*/
                    
131/** @defgroup STM32469I_EVAL_QSPI_Exported_Functions STM32469I EVAL QSPI Exported Functions
                    
132  * @{
                    
                
stm32mp157c-dhcom-pdk2.dts git://github.com/torvalds/linux.git | Device Tree | 265 lines
                    
5
                    
6#include "stm32mp157c-dhcom-som.dtsi"
                    
7#include <dt-bindings/pwm/pwm.h>
                    
10	model = "STMicroelectronics STM32MP157C DHCOM Premium Developer Kit (2)";
                    
11	compatible = "dh,stm32mp157c-dhcom-pdk2", "st,stm32mp157";
                    
12
                    
34		default-brightness-level = <8>;
                    
35		enable-gpios = <&gpioi 0 GPIO_ACTIVE_HIGH>;
                    
36		status = "okay";
                    
43		regulator-max-microvolt = <3300000>;
                    
44		gpio = <&gpiog 3 GPIO_ACTIVE_LOW>;
                    
45		regulator-always-on;
                    
85	st,eth-ref-clk-sel;
                    
86	phy-reset-gpios = <&gpioh 15 GPIO_ACTIVE_LOW>;
                    
87
                    
                
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
                    
17.\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h
                    
18.\objects\fput_debug.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\Legacy/stm32_hal_legacy.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
                    
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
                    
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
                    
29.\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash.h
                    
30.\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ex.h
                    
31.\objects\main.o: C:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.7.0\Drivers\STM32F4xx_HAL_Driver\Inc\stm32f4xx_hal_flash_ramfunc.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
                    
                
stm32f4xx_exti.c https://github.com/monyuonyu/pinoc.git | C | 311 lines
                    
2  ******************************************************************************
                    
3  * @file    stm32f4xx_exti.c
                    
4  * @author  MCD Application Team
                    
18 [..] External interrupt/event lines are mapped as following:
                    
19   (#) All available GPIO pins are connected to the 16 external 
                    
20       interrupt/event lines from EXTI0 to EXTI15.
                    
33      below:
                    
34   (#) Configure the I/O in input mode using GPIO_Init()
                    
35   (#) Select the input source pin for the EXTI line using SYSCFG_EXTILineConfig()
                    
66/* Includes ------------------------------------------------------------------*/
                    
67#include "stm32f4xx_exti.h"
                    
68
                    
68
                    
69/** @addtogroup STM32F4xx_StdPeriph_Driver
                    
70  * @{
                    
                
stm32_adc.c https://bitbucket.org/hg42/nuttx.git | C | 163 lines
                    
1/************************************************************************************
                    
2 * configs/stm3220g-eval/src/stm32_adc.c
                    
3 *
                    
75
                    
76#if defined(CONFIG_STM32_ADC1) || defined(CONFIG_STM32_ADC2) || defined(CONFIG_STM32_ADC3)
                    
77#ifndef CONFIG_STM32_ADC3
                    
93
                    
94#ifdef CONFIG_STM32_ADC3
                    
95static const uint8_t  g_chanlist[ADC3_NCHANNELS] = {7};
                    
129        {
                    
130          stm32_configgpio(g_pinlist[i]);
                    
131        }
                    
161
                    
162#endif /* CONFIG_STM32_ADC1 || CONFIG_STM32_ADC2 || CONFIG_STM32_ADC3 */
                    
163#endif /* CONFIG_ADC */
                    
                
stm32l4_exti_wakeup.c https://bitbucket.org/hg42/nuttx.git | C | 153 lines
                    
1/****************************************************************************
                    
2 * arch/arm/src/stm32l4/stm32l4_exti_wakeup.c
                    
3 *
                    
52#include "chip.h"
                    
53#include "stm32l4_gpio.h"
                    
54#include "stm32l4_exti.h"
                    
76
                    
77static int stm32l4_exti_wakeup_isr(int irq, void *context, FAR void *arg)
                    
78{
                    
99/****************************************************************************
                    
100 * Name: stm32l4_exti_wakeup
                    
101 *
                    
125    {
                    
126      irq_attach(STM32L4_IRQ_RTC_WKUP, stm32l4_exti_wakeup_isr, NULL);
                    
127      up_enable_irq(STM32L4_IRQ_RTC_WKUP);
                    
                
memorymap.h https://gitlab.com/madresistor/libopencm3 | C Header | 129 lines
                    
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)
                    
26
                    
27/* --- STM32F3 specific peripheral definitions ----------------------------- */
                    
28
                    
86/* AHB2 */
                    
87#define GPIO_PORT_A_BASE		(PERIPH_BASE_AHB2 + 0x0000)
                    
88#define GPIO_PORT_B_BASE		(PERIPH_BASE_AHB2 + 0x0400)
                    
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)
                    
90#define GPIO_PORT_D_BASE		(PERIPH_BASE_AHB2 + 0x0C00)
                    
91#define GPIO_PORT_E_BASE		(PERIPH_BASE_AHB2 + 0x1000)
                    
92#define GPIO_PORT_F_BASE		(PERIPH_BASE_AHB2 + 0x1400)
                    
                
main.c https://bitbucket.org/jansmol/mbd-priedas-programu-kodai.git | C | 361 lines
                    
274  /*Configure GPIO pin Output Level */
                    
275  HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_RESET);
                    
276
                    
277  /*Configure GPIO pin Output Level */
                    
278  HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3|GPIO_PIN_4, GPIO_PIN_RESET);
                    
279
                    
280  /*Configure GPIO pin Output Level */
                    
281  HAL_GPIO_WritePin(GPIOB, GPIO_PIN_0|GPIO_PIN_1, GPIO_PIN_RESET);
                    
282
                    
301  /*Configure GPIO pins : PB0 PB1 */
                    
302  GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
                    
303  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
                    
304  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
                    
305  HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
                    
306
                    
                
Target Tracker with Display.py https://bitbucket.org/JamesHepworth_UCT/target-tracker.git | Python | 229 lines
                    
28
                    
29	GPIO.output(31,GPIO.HIGH) #Casues EXTI interrup on PA4 on STM32
                    
30
                    
30
                    
31	while GPIO.input(37) == 1: #wait for STM32 of acknowledge data is ready to be sent: STM32 lowers PB2
                    
32		nothing
                    
44
                    
45	GPIO.output(31,GPIO.LOW)
                    
46
                    
75GPIO.setup(37,GPIO.IN)
                    
76GPIO.setup(35,GPIO.IN)
                    
77GPIO.setup(33,GPIO.IN)
                    
78GPIO.setup(31,GPIO.OUT)
                    
79GPIO.setup(11,GPIO.OUT)
                    
80GPIO.setup(13,GPIO.IN)
                    
                
stm32_adc.c https://bitbucket.org/zapparello/nuttx.git | C | 227 lines
                    
1/****************************************************************************
                    
2 * boards/arm/stm32h7/stm32h747i-disco/src/stm32_adc.c
                    
3 *
                    
50#include "chip.h"
                    
51#include "stm32_gpio.h"
                    
52#include "stm32_adc.h"
                    
92 *
                    
93 * ADC1: {GPIO_ADC12_INP5, GPIO_ADC123_INP10, GPIO_ADC123_INP12,
                    
94 *        GPIO_ADC12_INP13, GPIO_ADC12_INP15};
                    
98{
                    
99  GPIO_ADC12_INP5, GPIO_ADC123_INP10, GPIO_ADC123_INP12, GPIO_ADC12_INP13,
                    
100  GPIO_ADC12_INP15
                    
225
                    
226#endif /* CONFIG_STM32H7_ADC1 || CONFIG_STM32H7_ADC2 || CONFIG_STM32H7_ADC3 */
                    
227#endif /* CONFIG_ADC */
                    
                
stm32_sx127x.c https://bitbucket.org/zapparello/nuttx.git | C | 225 lines
                    
105
                    
106  stm32_gpiosetevent(GPIO_SX127X_DIO0, true, false, false, isr, arg);
                    
107  return OK;
                    
119
                    
120  stm32_configgpio(GPIO_SX127X_RESET | GPIO_OUTPUT | GPIO_SPEED_HIGH |
                    
121                   GPIO_OUTPUT_CLEAR);
                    
124
                    
125  stm32_gpiowrite(GPIO_SX127X_RESET, false);
                    
126
                    
132
                    
133  stm32_configgpio(GPIO_SX127X_RESET | GPIO_INPUT | GPIO_FLOAT);
                    
134
                    
201
                    
202  stm32_configgpio(GPIO_SX127X_DIO0);
                    
203
                    
                
PinNames.h https://github.com/tmk/tmk_keyboard.git | C Header | 188 lines
                    
38
                    
39// See stm32f0xx_hal_gpio.h and stm32f0xx_hal_gpio_ex.h for values of MODE, PUPD and AFNUM
                    
40#define STM_PIN_DATA(MODE, PUPD, AFNUM)  ((int)(((AFNUM) << 7) | ((PUPD) << 4) | ((MODE) << 0)))
                    
                
comm_tim.c https://github.com/esden/open-bldc.git | C | 243 lines
                    
32
                    
33#include <libopencm3/stm32/f1/nvic.h>
                    
34#include <libopencm3/stm32/f1/rcc.h>
                    
35#include <libopencm3/stm32/timer.h>
                    
36#include <libopencm3/stm32/f1/gpio.h>
                    
37
                    
                
lisa_test_adxl345_dma.c https://bitbucket.org/tamasszabo/paparazzi_mavlink.git | C | 185 lines
                    
21
                    
22#include "libopencm3/stm32/f1/gpio.h"
                    
23#include "libopencm3/stm32/f1/nvic.h"
                    
23#include "libopencm3/stm32/f1/nvic.h"
                    
24#include "libopencm3/stm32/exti.h"
                    
25
                    
166  rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPBEN | RCC_APB2ENR_AFIOEN);
                    
167  gpio_set_mode(GPIOB, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT, GPIO2);
                    
168
                    
168
                    
169  exti_select_source(EXTI2, GPIOB);
                    
170  exti_set_trigger(EXTI2, EXTI_TRIGGER_FALLING);
                    
                
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.       */
                    
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.       */
                    
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.       */
                    
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.       */
                    
52#define EXT_MODE_GPIOH      0x70        /**< @brief GPIOH identifier.       */
                    
53#define EXT_MODE_GPIOI      0x80        /**< @brief GPIOI identifier.       */
                    
54/** @} */
                    
                
i2c.c https://gitlab.com/MujibAzizi/cpkn.git | C | 165 lines
                    
3//******************************************************************************/
                    
4#include "stm32f10x_gpio.h"
                    
5#include "stm32f10x_i2c.h"
                    
5#include "stm32f10x_i2c.h"
                    
6#include "stm32f10x_rcc.h"
                    
7
                    
20   	   I2C_InitTypeDef  I2C_InitStructure;
                    
21	   GPIO_InitTypeDef  GPIO_InitStructure;
                    
22
                    
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;
                    
29	   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
30	   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
                    
31	   GPIO_Init(GPIOB, &GPIO_InitStructure);
                    
                
stm324xg_eval_audio.h https://gitlab.com/fascx/stm32f4_ex | C Header | 182 lines
                    
48#include "..\Components\cs43l22\cs43l22.h"
                    
49#include "stm324xg_eval.h"
                    
50
                    
54
                    
55/** @addtogroup STM324xG_EVAL
                    
56  * @{
                    
58    
                    
59/** @defgroup stm324xg_eval_audio
                    
60  * @{
                    
82#define AUDIO_I2Sx_SCK_SD_WS_AF             GPIO_AF5_SPI2
                    
83#define AUDIO_I2Sx_SCK_SD_WS_CLK_ENABLE()   __GPIOI_CLK_ENABLE()
                    
84#define AUDIO_I2Sx_MCK_CLK_ENABLE()         __GPIOC_CLK_ENABLE()
                    
88#define AUDIO_I2Sx_MCK_PIN                  GPIO_PIN_6
                    
89#define AUDIO_I2Sx_SCK_SD_WS_GPIO_PORT      GPIOI
                    
90#define AUDIO_I2Sx_MCK_GPIO_PORT            GPIOC
                    
                
usart_dma.c https://bitbucket.org/PhracturedBlue/deviation | C | 200 lines
                    
29
                    
30	/* Enable GPIOA, GPIOB, GPIOC clock. */
                    
31	rcc_peripheral_enable_clock(&RCC_APB2ENR,
                    
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);
                    
178	while (1) {
                    
179		gpio_toggle(GPIOA, GPIO8);	/* LED on/off */
                    
180		while ( transfered != 1) {
                    
                
stm32746g-eval.dts git://github.com/torvalds/linux.git | Device Tree | 212 lines
                    
50	model = "STMicroelectronics STM32746g-EVAL board";
                    
51	compatible = "st,stm32746g-eval", "st,stm32f746";
                    
52
                    
69		green {
                    
70			gpios = <&gpiof 10 1>;
                    
71			linux,default-trigger = "heartbeat";
                    
76		red {
                    
77			gpios = <&gpiob 7 1>;
                    
78		};
                    
91			linux,code = <KEY_WAKEUP>;
                    
92			gpios = <&gpioc 13 0>;
                    
93		};
                    
176			joystick_pins: joystick {
                    
177				pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4";
                    
178				drive-push-pull;
                    
                
main-ex1.c https://bitbucket.org/teknohan/mastering-stm32-book-example.git | C | 167 lines
                    
50	while(1) {
                    
51		HAL_GPIO_TogglePin(GPIOA, GPIO_PIN_5);
                    
52		HAL_Delay(500);
                    
115	GPIO_InitStruct.Pull = GPIO_NOPULL;
                    
116	HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
                    
117
                    
118	/*Configure GPIO pins : PA2 PA3 */
                    
119	GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3;
                    
120	GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
                    
123	GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
                    
124	HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
                    
125
                    
130	GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
                    
131	HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
                    
132
                    
                
main-ex1.c https://bitbucket.org/teknohan/mastering-stm32-book-example.git | C | 155 lines
                    
60int main(void) {
                    
61  GPIO_InitTypeDef GPIO_InitStruct;
                    
62
                    
72  GPIO_InitStruct.Pull = GPIO_PULLDOWN;
                    
73  HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
                    
74
                    
77  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
                    
78  GPIO_InitStruct.Pull = GPIO_NOPULL;
                    
79  GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
                    
79  GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
                    
80  HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct);
                    
81
                    
88  __HAL_GPIO_EXTI_CLEAR_IT(GPIO_PIN_13);
                    
89  HAL_GPIO_TogglePin(LD2_GPIO_Port, GPIO_PIN_5);
                    
90}
                    
                
stm32_autoleds.c https://bitbucket.org/hg42/nuttx.git | C | 178 lines
                    
68
                    
69  stm32l4_configgpio(GPIO_LED_RED);
                    
70  stm32l4_configgpio(GPIO_LED_GRN);
                    
108      case LED_ASSERTION:
                    
109        stm32l4_gpiowrite(GPIO_LED_RED, true);
                    
110        break;
                    
117      case LED_PANIC:
                    
118        stm32l4_gpiowrite(GPIO_LED_GRN, false);
                    
119        stm32l4_gpiowrite(GPIO_LED_RED, true);
                    
122      case LED_IDLE:
                    
123        stm32l4_gpiowrite(GPIO_LED_GRN, true);
                    
124        stm32l4_gpiowrite(GPIO_LED_RED, false);
                    
166      case LED_PANIC:
                    
167        stm32l4_gpiowrite(GPIO_LED_GRN, false);
                    
168        stm32l4_gpiowrite(GPIO_LED_RED, false);
                    
                
0005-CM730-firmware-changes-for-NimbRo-OP.patch https://github.com/NimbRo/nimbro-op.git | Patch | 284 lines
                    
57+
                    
58+	if ( GPIO_ReadOutputDataBit(PORT_ENABLE_TXD, PIN_ENABLE_TXD) == Bit_RESET) {
                    
59+		//TxDString(USART_ZIGBEE,"\r\n TEST0");
                    
61+		GPIO_ResetBits(PORT_ENABLE_RXD, PIN_ENABLE_RXD);	// RX Disable
                    
62+		GPIO_SetBits(PORT_ENABLE_TXD, PIN_ENABLE_TXD);	// TX Enable
                    
63+
                    
152 	gbDxlPwr = 1;
                    
153diff --git a/firmware/CM730_APP/src/stm32f10x_it.c b/firmware/CM730_APP/src/stm32f10x_it.c
                    
154index 8ac8324..0364377 100644
                    
155--- a/firmware/CM730_APP/src/stm32f10x_it.c
                    
156+++ b/firmware/CM730_APP/src/stm32f10x_it.c
                    
157@@ -38,7 +38,6 @@ extern vu16 CCR3_Val;       // from system_init.c
                    
237-			//if (TXD0_FINISH) {
                    
238-			GPIO_ResetBits(PORT_ENABLE_RXD, PIN_ENABLE_RXD);	// RX Disable
                    
239-			GPIO_SetBits(PORT_ENABLE_TXD, PIN_ENABLE_TXD);	// TX Enable
                    
                
stm32mp15xx-dhcom-drc02.dtsi https://github.com/tiwai/sound.git | Device Tree | 169 lines
                    
31	 * NOTE: On DRC02, the RS485_RX_En is controlled by a separate
                    
32	 * GPIO line, however the STM32 UART driver assumes RX happens
                    
33	 * during TX anyway and that it only controls drive enable DE
                    
112	/delete-property/broken-cd;
                    
113	cd-gpios = <&gpioi 10 GPIO_ACTIVE_HIGH>;
                    
114	disable-wp;
                    
119	pinctrl-0 = <&spi1_pins_a>;
                    
120	cs-gpios = <&gpioz 3 0>;
                    
121	/* Use PIO for the display */
                    
125	/*
                    
126	 * Note: PF3/GPIO_A , PD6/GPIO_B , PG0/GPIO_C , PC6/GPIO_E are
                    
127	 * also connected to the display board connector.
                    
147	pinctrl-0 = <&uart8_pins_a>;
                    
148	rts-gpios = <&gpioe 6 GPIO_ACTIVE_HIGH>;
                    
149	/delete-property/dmas;
                    
                
ser_stm32.c https://github.com/mtarek/BeRTOS.git | C | 386 lines
                    
103		.tx_pin = GPIO_USART3_TX_PIN,
                    
104		.sysctl_gpio = RCC_APB2_GPIOB,
                    
105		.sysctl_usart = RCC_APB1_USART3,
                    
163
                    
164	stm32_gpioPinConfig((struct stm32_gpio *)gpio_uart[port].base,  gpio_uart[port].tx_pin,
                    
165				GPIO_MODE_AF_PP, GPIO_SPEED_50MHZ);
                    
166
                    
167	stm32_gpioPinConfig((struct stm32_gpio *)gpio_uart[port].base,  gpio_uart[port].rx_pin,
                    
168				GPIO_MODE_IN_FLOATING, GPIO_SPEED_50MHZ);
                    
229{
                    
230	struct stm32_usart *base = (struct stm32_usart *)UARTDesc[port].base;
                    
231	uint32_t status;
                    
285		struct CM3Serial *hw = (struct CM3Serial *)_hw;			     \
                    
286		struct stm32_usart *base = (struct stm32_usart *)USART## port ## _BASE; \
                    
287		if (hw->sending)						\
                    
                
spi.h https://github.com/torfbolt/libmaple.git | C Header | 99 lines
                    
30 * @author Marti Bolivar <mbolivar@leaflabs.com>
                    
31 * @brief STM32F1 SPI/I2S series header.
                    
32 */
                    
33
                    
34#ifndef _LIBMAPLE_STM32F1_SPI_H_
                    
35#define _LIBMAPLE_STM32F1_SPI_H_
                    
60extern struct spi_dev *SPI2;
                    
61#if defined(STM32_HIGH_DENSITY) || defined(STM32_XL_DENSITY)
                    
62extern struct spi_dev *SPI3;
                    
68
                    
69/* spi_gpio_cfg(): Backwards compatibility shim to spi_config_gpios() */
                    
70struct gpio_dev;
                    
71extern void spi_config_gpios(struct spi_dev*, uint8,
                    
72                             struct gpio_dev*, uint8,
                    
73                             struct gpio_dev*, uint8, uint8, uint8);
                    
                
HardwareProvider.cs https://bitbucket.org/CW2/netduinofirmware.git | C# | 86 lines
                    
9//
                    
10//  class Microsoft.SPOT.Hardware.STM32.STM32HardwareProvider
                    
11//
                    
20{
                    
21    internal class STM32HardwareProvider : HardwareProvider
                    
22    {
                    
22    {
                    
23        static STM32HardwareProvider()
                    
24        {
                    
45                case "COM3":
                    
46                    rxPin  = Pins.GPIO_PIN_B_11;
                    
47                    txPin  = Pins.GPIO_PIN_B_10;
                    
76                case SPI.SPI_module.SPI3:
                    
77                    msk  = Pins.GPIO_PIN_B_3;
                    
78                    miso = Pins.GPIO_PIN_B_4;
                    
                
main.c https://github.com/zaurus04/cortexm3.git | C | 281 lines
                    
57    /* Set GPIO_LED pin 6 */
                    
58    GPIO_SetBits(GPIO_LED, GPIO_Pin_6);
                    
59
                    
158  /* Configure GPIO_LED pin 6 and pin 7 as Output push-pull */
                    
159  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7;
                    
160  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
                    
161  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
162  GPIO_Init(GPIO_LED, &GPIO_InitStructure);
                    
163
                    
164  /* Configure Key Button GPIO Pin as input floating (Key Button EXTI Line) */
                    
165  GPIO_InitStructure.GPIO_Pin = GPIO_PIN_KEY_BUTTON;
                    
166  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
                    
166  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
                    
167  GPIO_Init(GPIO_KEY_BUTTON, &GPIO_InitStructure);
                    
168}
                    
                
stm32mp15xx-dhcor-avenger96.dtsi https://github.com/tiwai/sound.git | Device Tree | 438 lines
                    
46			label = "green:user0";
                    
47			gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>;
                    
48			linux,default-trigger = "heartbeat";
                    
53			label = "green:user1";
                    
54			gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>;
                    
55			linux,default-trigger = "mmc0";
                    
102
                    
103		gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>;
                    
104		enable-active-high;
                    
318	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>;
                    
319	cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
                    
320	disable-wp;
                    
408		max-speed = <3000000>;
                    
409		shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>;
                    
410	};
                    
                
lcd.c https://bitbucket.org/sunvsuv/deviationfor6810 | C | 201 lines
                    
14*/
                    
15#include <libopencm3/stm32/f1/gpio.h>
                    
16#include <libopencm3/stm32/f1/rcc.h>
                    
20
                    
21#define CS_HI() gpio_set(GPIOB, GPIO0)
                    
22#define CS_LO() gpio_clear(GPIOB, GPIO0)
                    
22#define CS_LO() gpio_clear(GPIOB, GPIO0)
                    
23#define CMD_MODE() gpio_clear(GPIOC,GPIO5)
                    
24#define DATA_MODE() gpio_set(GPIOC,GPIO5)
                    
83    rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPCEN);
                    
84    gpio_set_mode(GPIOB, GPIO_MODE_OUTPUT_50_MHZ,
                    
85                  GPIO_CNF_OUTPUT_PUSHPULL, GPIO0);
                    
85                  GPIO_CNF_OUTPUT_PUSHPULL, GPIO0);
                    
86    gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_50_MHZ,
                    
87                  GPIO_CNF_OUTPUT_PUSHPULL, GPIO5);
                    
                
board.cpp https://github.com/torfbolt/libmaple.git | C++ | 197 lines
                    
35#include <libmaple/fsmc.h>
                    
36#include <libmaple/gpio.h>
                    
37#include <libmaple/rcc.h>
                    
47
                    
48extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS] = {
                    
49
                    
51
                    
52    {GPIOB,   NULL, NULL, 10, 0, ADCx}, /* D0/PB10 */
                    
53    {GPIOB,   NULL, NULL, 11, 0, ADCx}, /* D1/PB11 */
                    
53    {GPIOB,   NULL, NULL, 11, 0, ADCx}, /* D1/PB11 */
                    
54    {GPIOB,   NULL, NULL, 12, 0, ADCx}, /* D2/PB12 */
                    
55    {GPIOB,   NULL, NULL, 13, 0, ADCx}, /* D3/PB13 */
                    
55    {GPIOB,   NULL, NULL, 13, 0, ADCx}, /* D3/PB13 */
                    
56    {GPIOB,   NULL, NULL, 14, 0, ADCx}, /* D4/PB14 */
                    
57    {GPIOB,   NULL, NULL, 15, 0, ADCx}, /* D5/PB15 */
                    
                
stm32f10x_conf.h https://github.com/sunilgandhi007/Juggernauts.git | C Header | 74 lines
                    
3/******************** (C) COPYRIGHT 2011 STMicroelectronics ********************
                    
4* File Name          : stm32f10x_conf.h
                    
5* Author             : MCD Application Team
                    
24#include "stm32f10x_adc.h"
                    
25#include "stm32f10x_bkp.h"
                    
26#include "stm32f10x_can.h"
                    
26#include "stm32f10x_can.h"
                    
27#include "stm32f10x_crc.h"
                    
28#include "stm32f10x_dac.h"
                    
31#include "stm32f10x_exti.h"
                    
32#include "stm32f10x_flash.h"
                    
33#include "stm32f10x_fsmc.h"
                    
33#include "stm32f10x_fsmc.h"
                    
34#include "stm32f10x_gpio.h"
                    
35#include "stm32f10x_i2c.h" 
                    
                
nuttx_px4fmu-v4_default.cmake https://gitlab.com/SJWink623/Firmware | CMake | 198 lines
                    
11	drivers/device
                    
12	drivers/stm32
                    
13	drivers/stm32/adc
                    
13	drivers/stm32/adc
                    
14	drivers/stm32/tone_alarm
                    
15	drivers/led
                    
78	modules/mavlink
                    
79	modules/gpio_led
                    
80	modules/uavcan
                    
181	uavcan
                    
182	uavcan_stm32_driver
                    
183	)
                    
                
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 *
                    
48
                    
49#include "olimex-stm32-h407.h"
                    
50
                    
90    {
                    
91      stm32_configgpio(g_buttons[i]);
                    
92    }
                    
104
                    
105  if (!stm32_gpioread(g_buttons[BUTTON_BUT]))
                    
106    {
                    
143    {
                    
144      ret = stm32_gpiosetevent(g_buttons[id], true, true, true, irqhandler,
                    
145                               arg);
                    
                
tm4c_buttons.c https://bitbucket.org/zapparello/nuttx.git | C | 171 lines
                    
60 ****************************************************************************/
                    
61/* Pin configuration for each STM3210E-EVAL button.  This array is indexed by
                    
62 * the BUTTON_* and JOYSTICK_* definitions in board.h
                    
66{
                    
67  GPIO_SW1, GPIO_SW2
                    
68};
                    
92
                    
93  /* Configure the GPIO pins as inputs. */
                    
94
                    
96    {
                    
97      tiva_configgpio(g_buttons[i]);
                    
98    }
                    
100#ifdef CONFIG_ARCH_IRQBUTTONS
                    
101  /* Configure GPIO interrupts */
                    
102
                    
                
stm32_autoleds.c https://bitbucket.org/hg42/nuttx.git | C | 287 lines
                    
180    {
                    
181      stm32_gpiowrite(GPIO_LED2, false);
                    
182    }
                    
185    {
                    
186      stm32_gpiowrite(GPIO_LED4, false);
                    
187    }
                    
190    {
                    
191      stm32_gpiowrite(GPIO_LED3, false);
                    
192    }
                    
215    {
                    
216      stm32_gpiowrite(GPIO_LED2, true);
                    
217    }
                    
225    {
                    
226      stm32_gpiowrite(GPIO_LED3, true);
                    
227    }
                    
                
stm32f10x_conf.h https://github.com/robots/STM32.git | C Header | 72 lines
                    
21/* Uncomment the line below to enable peripheral header file inclusion */
                    
22#include "stm32f10x_adc.h"
                    
23/* #include "stm32f10x_bkp.h" */
                    
23/* #include "stm32f10x_bkp.h" */
                    
24/* #include "stm32f10x_can.h" */
                    
25/* #include "stm32f10x_crc.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" */
                    
40/* #include "stm32f10x_tim.h" */
                    
41/* #include "stm32f10x_usart.h" */
                    
42/* #include "stm32f10x_wwdg.h" */
                    
                
main.c https://github.com/jiesse/time-meter.git | C | 258 lines
                    
70  /* GPIO configuration ------------------------------------------------------*/
                    
71  GPIO_Configuration();
                    
72
                    
166{
                    
167  GPIO_InitTypeDef GPIO_InitStructure;
                    
168
                    
169  /* Configure I2C1 pins: SCL and SDA ----------------------------------------*/
                    
170  GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_6 | GPIO_Pin_7;
                    
171  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
172  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
                    
173  GPIO_Init(GPIOB, &GPIO_InitStructure);
                    
174
                    
175  /* Configure I2C2 pins: SCL and SDA ----------------------------------------*/
                    
176  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10 | GPIO_Pin_11;
                    
177  GPIO_Init(GPIOB, &GPIO_InitStructure);
                    
                
lineFollower.c https://gitlab.com/BGCX261/zhonx3-git.git | C | 314 lines
                    
8/**************************************************************************/
                    
9/* STM32 hal library declarations */
                    
10#include "stm32f4xx_hal.h"
                    
56
                    
57GPIO_InitTypeDef GPIO_InitStruct;
                    
58
                    
                
at91-kizbox3-hs.dts https://github.com/penberg/linux.git | Device Tree | 309 lines
                    
46			label = "pio:red:user";
                    
47			gpios = <&pioA PIN_PB1 GPIO_ACTIVE_HIGH>;
                    
48			default-state = "off";
                    
52			label = "pio:white:user";
                    
53			gpios = <&pioA PIN_PB8 GPIO_ACTIVE_HIGH>;
                    
54			default-state = "off";
                    
154			label = "io boot 0";
                    
155			gpio = <&pioA PIN_PC11 GPIO_ACTIVE_HIGH>;
                    
156			output;
                    
180			label = "id usba";
                    
181			gpio = <&pioA PIN_PC0 GPIO_ACTIVE_LOW>;
                    
182			input;
                    
187&pioA {
                    
188	pinctrl_key_gpio_default: key_gpio_default {
                    
189		pinmux=  <PIN_PA22__GPIO>,
                    
                
stm32_lowputc_v1.c https://bitbucket.org/zapparello/nuttx.git | C | 406 lines
                    
248#ifdef STM32_CONSOLE_RS485_DIR
                    
249  stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, STM32_CONSOLE_RS485_DIR_POLARITY);
                    
250#endif
                    
257  while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_ISR_OFFSET) & USART_ISR_TC) == 0);
                    
258  stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, !STM32_CONSOLE_RS485_DIR_POLARITY);
                    
259#endif
                    
290  stm32_configgpio(GPIO_USART1_TX);
                    
291  stm32_configgpio(GPIO_USART1_RX);
                    
292
                    
310  stm32_configgpio(GPIO_USART2_RS485_DIR);
                    
311  stm32_gpiowrite(GPIO_USART2_RS485_DIR, !CONFIG_USART2_RS485_DIR_POLARITY);
                    
312#endif
                    
342  stm32_configgpio(GPIO_USART4_RS485_DIR);
                    
343  stm32_gpiowrite(GPIO_USART4_RS485_DIR, !CONFIG_USART4_RS485_DIR_POLARITY);
                    
344#endif
                    
                
stm32f10x_it.c https://github.com/jiesse/time-meter.git | C | 188 lines
                    
2  ******************************************************************************
                    
3  * @file EXTI/stm32f10x_it.c 
                    
4  * @author  MCD Application Team
                    
23/* Includes ------------------------------------------------------------------*/
                    
24#include "stm32f10x_it.h"
                    
25#include "platform_config.h"
                    
143/******************************************************************************/
                    
144/*            STM32F10x Peripherals Interrupt Handlers                        */
                    
145/******************************************************************************/
                    
156    /* Toggle GPIO_LED pin 6 */
                    
157    GPIO_WriteBit(GPIO_LED, GPIO_Pin_6, (BitAction)((1-GPIO_ReadOutputDataBit(GPIO_LED, GPIO_Pin_6))));
                    
158
                    
164/******************************************************************************/
                    
165/*                 STM32F10x Peripherals Interrupt Handlers                   */
                    
166/*  Add here the Interrupt Handler for the used peripheral(s) (PPP), for the  */
                    
                
main.c https://gitlab.com/timofonic/smart-plug | C | 397 lines
                    
153	// enable SPI 1 & 2 peripheral clock and GPIO
                    
154  RCC_APB2PeriphClockCmd( RCC_APB2Periph_SPI1 | RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOC | RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO, ENABLE );
                    
155	RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
                    
161	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
162	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
                    
163	GPIO_Init(GPIOB, &GPIO_InitStructure);
                    
216	GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
217	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
                    
218	GPIO_Init( GPIOA, &GPIO_InitStructure );
                    
273	GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
                    
274	GPIO_Init( GPIOB, &GPIO_InitStructure );
                    
275	
                    
370
                    
371	/* Enable GPIOA, GPIOB, GPIOC, GPIOD, GPIOE and AFIO clocks */
                    
372	RCC_APB2PeriphClockCmd(	RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC |
                    
                
up_selectsram.c https://github.com/l--putt/nuttx-bb.git | C | 145 lines
                    
51
                    
52#ifdef CONFIG_STM32_FSMC
                    
53
                    
57
                    
58#if STM32_NGPIO_PORTS < 6
                    
59#  error "Required GPIO ports not enabled"
                    
95
                    
96  GPIO_NPS_NE3, GPIO_NPS_NBL0, GPIO_NPS_NBL1
                    
97};
                    
117{
                    
118  /* Configure new GPIO state */
                    
119
                    
120  stm32_extmemgpios(g_commonconfig, NCOMMON_CONFIG);
                    
121  stm32_extmemgpios(g_sramconfig, NSRAM_CONFIG);
                    
122
                    
                
board_config.h https://bitbucket.org/VitalyGrachev/firmware.git | C Header | 282 lines
                    
77
                    
78#define GPIO_RC_PWM   (GPIO_INPUT | GPIO_PULLUP | GPIO_PORTA | GPIO_PIN0)
                    
79
                    
79
                    
80#define GPIO_OC_ADJ   (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | \
                    
81		       GPIO_PORTA | GPIO_PIN4 | GPIO_OUTPUT_CLEAR)
                    
124
                    
125#define GPIO_LED1       (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | \
                    
126			 GPIO_PORTA | GPIO_PIN2 | GPIO_OUTPUT_CLEAR)
                    
128
                    
129#define GPIO_LED2       (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | \
                    
130			 GPIO_PORTA | GPIO_PIN3 | GPIO_OUTPUT_CLEAR)
                    
132
                    
133#define GPIO_LED3       (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | \
                    
134			 GPIO_PORTA | GPIO_PIN1 | GPIO_OUTPUT_CLEAR)
                    
                
stm32_usb.c https://bitbucket.org/sanyaade/nuttx_boards.git | C | 313 lines
                    
148#ifdef CONFIG_STM32_OTGHS
                    
149  stm32_configgpio(GPIO_OTGHS_VBUS);
                    
150  stm32_configgpio(GPIO_OTGHS_PWRON);
                    
150  stm32_configgpio(GPIO_OTGHS_PWRON);
                    
151  stm32_configgpio(GPIO_OTGHS_OVER);
                    
152#endif
                    
261
                    
262      stm32_gpiowrite(GPIO_OTGHS_PWRON, false);
                    
263    }
                    
267
                    
268      stm32_gpiowrite(GPIO_OTGHS_PWRON, true);
                    
269    }
                    
290{
                    
291  return stm32_gpiosetevent(GPIO_OTGHS_OVER, true, true, true, handler);
                    
292}
                    
                
main.c https://bitbucket.org/dukzcry/hobbies.git | C | 443 lines
                    
81	/* ???????? ?????? ??????? ???? */
                    
82		if (GPIO_ReadInputDataBit(GPIOA, REV_PIN))									// ?????? ???????? ????????
                    
83		{
                    
84			ReverseOffCnt = 0;
                    
85			if (!GPIO_ReadOutputDataBit(GPIOC, AV_PIN))								// ?????? ?? ????????
                    
86			{
                    
89				{
                    
90					GPIO_SetBits(GPIOC, AV_PIN | BLUE_PIN);									// ???????? ??????
                    
91					ReverseOnCnt = 0;
                    
97			ReverseOnCnt = 0;
                    
98			if (GPIO_ReadOutputDataBit(GPIOC, AV_PIN))								// ?????? ????????
                    
99			{
                    
131		
                    
132		GPIO_WriteBit(GPIOC, GPIO_Pin_9, (BitAction)(!GPIO_ReadOutputDataBit(GPIOC, GPIO_Pin_9)));
                    
133		IWDG_ReloadCounter();
                    
                
main.c https://github.com/jwithee/bearboard.git | C | 165 lines
                    
61
                    
62  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;
                    
63  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
                    
63  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
                    
64  GPIO_Init(GPIOA, &GPIO_InitStructure);
                    
65  GPIO_Init(GPIOB, &GPIO_InitStructure);
                    
65  GPIO_Init(GPIOB, &GPIO_InitStructure);
                    
66  GPIO_Init(GPIOC, &GPIO_InitStructure);
                    
67  GPIO_Init(GPIOD, &GPIO_InitStructure);
                    
67  GPIO_Init(GPIOD, &GPIO_InitStructure);
                    
68  GPIO_Init(GPIOE, &GPIO_InitStructure);
                    
69
                    
76  GPIO_Init(GPIOF, &GPIO_InitStructure);
                    
77  GPIO_Init(GPIOG, &GPIO_InitStructure);
                    
78  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOF | RCC_APB2Periph_GPIOG, DISABLE);
                    
                
stm32_usb.c https://bitbucket.org/hg42/nuttx.git | C | 313 lines
                    
153#ifdef CONFIG_STM32_OTGFS
                    
154  stm32_configgpio(GPIO_OTGFS_VBUS);
                    
155  stm32_configgpio(GPIO_OTGFS_PWRON);
                    
155  stm32_configgpio(GPIO_OTGFS_PWRON);
                    
156  stm32_configgpio(GPIO_OTGFS_OVER);
                    
157#endif
                    
256
                    
257      stm32_gpiowrite(GPIO_OTGFS_PWRON, false);
                    
258    }
                    
262
                    
263      stm32_gpiowrite(GPIO_OTGFS_PWRON, true);
                    
264    }
                    
287{
                    
288  return stm32_gpiosetevent(GPIO_OTGFS_OVER, true, true, true, handler, arg);
                    
289}
                    
                
stm32f4xx.c https://github.com/hikob/openlab.git | C | 119 lines
                    
32GPIO_INIT(_gpioA, GPIOA_BASE_ADDRESS, RCC_AHB_BIT_GPIOA);
                    
33GPIO_INIT(_gpioB, GPIOB_BASE_ADDRESS, RCC_AHB_BIT_GPIOB);
                    
34GPIO_INIT(_gpioC, GPIOC_BASE_ADDRESS, RCC_AHB_BIT_GPIOC);
                    
34GPIO_INIT(_gpioC, GPIOC_BASE_ADDRESS, RCC_AHB_BIT_GPIOC);
                    
35GPIO_INIT(_gpioD, GPIOD_BASE_ADDRESS, RCC_AHB_BIT_GPIOD);
                    
36GPIO_INIT(_gpioE, GPIOE_BASE_ADDRESS, RCC_AHB_BIT_GPIOE);
                    
36GPIO_INIT(_gpioE, GPIOE_BASE_ADDRESS, RCC_AHB_BIT_GPIOE);
                    
37GPIO_INIT(_gpioF, GPIOF_BASE_ADDRESS, RCC_AHB_BIT_GPIOF);
                    
38GPIO_INIT(_gpioG, GPIOG_BASE_ADDRESS, RCC_AHB_BIT_GPIOG);
                    
38GPIO_INIT(_gpioG, GPIOG_BASE_ADDRESS, RCC_AHB_BIT_GPIOG);
                    
39GPIO_INIT(_gpioH, GPIOH_BASE_ADDRESS, RCC_AHB_BIT_GPIOH);
                    
40GPIO_INIT(_gpioI, GPIOI_BASE_ADDRESS, RCC_AHB_BIT_GPIOI);
                    
91/* Definitions for user access */
                    
92const gpio_t gpioA = GPIO_A;
                    
93const gpio_t gpioB = GPIO_B;
                    
                
main.c https://github.com/ymqqqqdx/n2_taximeter.git | C | 166 lines
                    
63  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
                    
64  GPIO_Init(GPIOA, &GPIO_InitStructure);
                    
65  GPIO_Init(GPIOB, &GPIO_InitStructure);
                    
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;
                    
97    /* Turn on LD2 and LD3 */
                    
98    GPIO_SetBits(GPIO_LED, GPIO_Pin_7 | GPIO_Pin_8);
                    
99    /* Turn off LD1 */
                    
106    /* Turn off LD2 and LD3 */
                    
107    GPIO_ResetBits(GPIO_LED, GPIO_Pin_8 | GPIO_Pin_7);
                    
108    /* Insert delay */
                    
111    /* Turn off LD4 */
                    
112    GPIO_ResetBits(GPIO_LED, GPIO_Pin_9);
                    
113  }
                    
                
platform_config.h https://github.com/kounst/QuadVolucer.git | C Header | 127 lines
                    
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  
                    
42  #define USARTy                   USART1
                    
43  #define USARTy_GPIO              GPIOA
                    
44  #define USARTy_CLK               RCC_APB2Periph_USART1
                    
44  #define USARTy_CLK               RCC_APB2Periph_USART1
                    
45  #define USARTy_GPIO_CLK          RCC_APB2Periph_GPIOA
                    
46  #define USARTy_RxPin             GPIO_Pin_10
                    
93  #define USARTz_CLK               RCC_APB1Periph_USART3
                    
94  #define USARTz_GPIO_CLK          RCC_APB2Periph_GPIOC
                    
95  #define USARTz_RxPin             GPIO_Pin_11
                    
102  #define USARTy                   USART1
                    
103  #define USARTy_GPIO              GPIOA
                    
104  #define USARTy_CLK               RCC_APB2Periph_USART1
                    
                
platform.h https://github.com/esden/blackmagic.git | C Header | 187 lines
                    
41/* Hardware definitions... */
                    
42#define TMS_PORT	GPIOA
                    
43#define TCK_PORT	GPIOA
                    
59#define LED_PORT_UART	GPIOC
                    
60#define LED_UART	GPIO14
                    
61
                    
69#define TMS_SET_MODE() \
                    
70	gpio_set_mode(TMS_PORT, GPIO_MODE_OUTPUT_2_MHZ, \
                    
71	              GPIO_CNF_OUTPUT_PUSHPULL, TMS_PIN);
                    
85	AFIO_MAPR |= AFIO_MAPR_USART1_REMAP; \
                    
86	gpio_set_mode(USBUSART_PORT, GPIO_MODE_OUTPUT_50_MHZ, \
                    
87	              GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, USBUSART_TX_PIN); \
                    
87	              GPIO_CNF_OUTPUT_ALTFN_PUSHPULL, USBUSART_TX_PIN); \
                    
88	gpio_set_mode(USBUSART_PORT, GPIO_MODE_INPUT, \
                    
89				  GPIO_CNF_INPUT_PULL_UPDOWN, USBUSART_RX_PIN); \
                    
                
main.c https://gitlab.com/aoscarius/embedded-exercise | C | 98 lines
                    
1#include "stm32f4xx.h"
                    
2#include "stm32f4xx_hal_gpio.h"
                    
3
                    
45	GPIO_InitStruct.Pin = LEDS;
                    
46	GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
                    
47	GPIO_InitStruct.Pull = GPIO_PULLDOWN;
                    
49
                    
50	HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
                    
51
                    
51
                    
52	HAL_GPIO_WritePin(GPIOD, LEDS, GPIO_PIN_RESET);
                    
53}
                    
77	while(1){
                    
78		HAL_GPIO_TogglePin(GPIOD, LED_BLUE);
                    
79		HAL_Delay(2000);
                    
                
hal_tick_16b.c https://github.com/adamgreen/gcc4mbed.git | C | 182 lines
                    
35
                    
36#if defined(TARGET_STM32F0)
                    
37void timer_update_irq_handler(void) {
                    
94#if DEBUG_TICK > 0
                    
95                HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_6);
                    
96#endif
                    
158    __GPIOB_CLK_ENABLE();
                    
159    GPIO_InitTypeDef GPIO_InitStruct;
                    
160    GPIO_InitStruct.Pin = GPIO_PIN_6;
                    
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
                    
                
stm32_autoleds.c https://bitbucket.org/benchmark-electronics/nuttx.git | C | 97 lines
                    
1/****************************************************************************
                    
2 * configs/nucleo-l452re/src/stm32_autoleds.c
                    
3 *
                    
50#include "up_internal.h"
                    
51#include "stm32l4_gpio.h"
                    
52#include "nucleo-l452re.h"
                    
69
                    
70  stm32l4_configgpio(GPIO_LD2);
                    
71}
                    
80    {
                    
81      stm32l4_gpiowrite(GPIO_LD2, true);
                    
82    }
                    
92    {
                    
93      stm32l4_gpiowrite(GPIO_LD2, false);
                    
94    }
                    
                
stm32_autoleds.c https://bitbucket.org/benchmark-electronics/nuttx.git | C | 96 lines
                    
1/****************************************************************************
                    
2 * configs/nucleo-l432kc/src/stm32l4_autoleds.c
                    
3 *
                    
51#include "up_internal.h"
                    
52#include "stm32l4.h"
                    
53#include "nucleo-l432kc.h"
                    
68
                    
69  stm32l4_configgpio(GPIO_LD3);
                    
70}
                    
79    {
                    
80      stm32l4_gpiowrite(GPIO_LD3, true);
                    
81    }
                    
91    {
                    
92      stm32l4_gpiowrite(GPIO_LD3, false);
                    
93    }
                    
                
stm32429i-eval.dts https://github.com/gby/linux.git | Device Tree | 299 lines
                    
50#include <dt-bindings/input/input.h>
                    
51#include <dt-bindings/gpio/gpio.h>
                    
52
                    
120			linux,code = <KEY_WAKEUP>;
                    
121			gpios = <&gpioa 0 0>;
                    
122		};
                    
189		resetb-gpios = <&stmpegpio 2 GPIO_ACTIVE_HIGH>;
                    
190		pwdn-gpios = <&stmpegpio 0 GPIO_ACTIVE_LOW>;
                    
191		clocks = <&clk_ext_camera>;
                    
204		reg = <0x42>;
                    
205		irq-gpio = <&gpioi 8 0>;
                    
206		irq-trigger = <3>;
                    
211
                    
212		stmpegpio: stmpe_gpio {
                    
213			compatible = "st,stmpe-gpio";
                    
                
main.c https://bitbucket.org/doudoudou/incas.git | C | 127 lines
                    
24
                    
25static const struct can_instance can1 = {&CAND1, GPIOD_LED5};
                    
26static const struct can_instance can2 = {&CAND2, GPIOD_LED3};
                    
30 * from abort mode.
                    
31 * See section 22.7.7 on the STM32 reference manual.
                    
32 */
                    
57      /* Process message.*/
                    
58      palTogglePad(GPIOD, cip->led);
                    
59    }
                    
                
stm32f4xx_hal.d https://gitlab.com/Infrared-KHTN/aulluminate | D | 30 lines
                    
4final\stm32f4xx_hal.o: ../Inc/main.h
                    
5final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h
                    
6final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h
                    
6final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h
                    
7final\stm32f4xx_hal.o: ../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h
                    
8final\stm32f4xx_hal.o: ../Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f411xe.h
                    
14final\stm32f4xx_hal.o: ../Drivers/CMSIS/Include/core_cmSimd.h
                    
15final\stm32f4xx_hal.o: ../Drivers/CMSIS/Device/ST/STM32F4xx/Include/system_stm32f4xx.h
                    
16final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal.h
                    
19final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc_ex.h
                    
20final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h
                    
21final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h
                    
21final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio_ex.h
                    
22final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h
                    
23final\stm32f4xx_hal.o: ../Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma_ex.h
                    
                
platform_config.h https://github.com/ymqqqqdx/n2_taximeter.git | C Header | 50 lines
                    
30   used to run the example */
                    
31#if !defined (USE_STM3210B_EVAL) &&  !defined (USE_STM3210E_EVAL)
                    
32 //#define USE_STM3210B_EVAL
                    
32 //#define USE_STM3210B_EVAL
                    
33 #define USE_STM3210E_EVAL
                    
34#endif
                    
35
                    
36/* Define the STM32F10x hardware depending on the used evaluation board */
                    
37#ifdef USE_STM3210B_EVAL
                    
37#ifdef USE_STM3210B_EVAL
                    
38  #define GPIO_LED                          GPIOC    
                    
39  #define RCC_APB2Periph_GPIO_LED           RCC_APB2Periph_GPIOC
                    
40#elif defined USE_STM3210E_EVAL
                    
41  #define GPIO_LED                          GPIOF    
                    
42  #define RCC_APB2Periph_GPIO_LED           RCC_APB2Periph_GPIOF
                    
                
stm32f10x_gpio.h https://github.com/fredcooke/DSOQuad_SourceCode.git | C Header | 237 lines
                    
218void GPIO_AFIODeInit(void);
                    
219void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct);
                    
220void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct);
                    
220void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct);
                    
221u8 GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, u16 GPIO_Pin);
                    
222u16 GPIO_ReadInputData(GPIO_TypeDef* GPIOx);
                    
222u16 GPIO_ReadInputData(GPIO_TypeDef* GPIOx);
                    
223u8 GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, u16 GPIO_Pin);
                    
224u16 GPIO_ReadOutputData(GPIO_TypeDef* GPIOx);
                    
226void GPIO_ResetBits(GPIO_TypeDef* GPIOx, u16 GPIO_Pin);
                    
227void GPIO_WriteBit(GPIO_TypeDef* GPIOx, u16 GPIO_Pin, BitAction BitVal);
                    
228void GPIO_Write(GPIO_TypeDef* GPIOx, u16 PortVal);
                    
228void GPIO_Write(GPIO_TypeDef* GPIOx, u16 PortVal);
                    
229void GPIO_PinLockConfig(GPIO_TypeDef* GPIOx, u16 GPIO_Pin);
                    
230void GPIO_EventOutputConfig(u8 GPIO_PortSource, u8 GPIO_PinSource);
                    
                
Makefile https://bitbucket.org/trottagio/stm32f4-discovery-firmware-makefile.git | Makefile | 86 lines
                    
32
                    
33CFLAGS	= $(MCFLAGS)  $(OPTIMIZE)  $(DEFS) -I./ -I./ $(STM32_INCLUDES)  -Wl,-T,stm32_flash.ld
                    
34AFLAGS	= $(MCFLAGS) 
                    
50	../../Libraries/STM32F4xx_StdPeriph_Driver/src/misc.c \
                    
51	../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_adc.c \
                    
52	../../Libraries/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c \
                    
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 \
                    
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 \
                    
                
uart_arch.h https://github.com/agreee45/SNUT.git | C Header | 186 lines
                    
43
                    
44#define UART1_TxPin GPIO_Pin_9
                    
45#define UART2_TxPin GPIO_Pin_2
                    
45#define UART2_TxPin GPIO_Pin_2
                    
46#define UART3_TxPin GPIO_Pin_10
                    
47
                    
53#define UART1_TxPort GPIOA
                    
54#define UART2_TxPort GPIOA
                    
55#define UART3_TxPort GPIOC
                    
74#define UART3_remap {RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE); \
                    
75                     GPIO_PinRemapConfig(GPIO_PartialRemap_USART3, ENABLE);}
                    
76#define UART5_remap {}
                    
185
                    
186#endif /* STM32_UART_ARCH_H */
                    
187
                    
                
stm32f0xx_ll_gpio.c https://github.com/adamgreen/gcc4mbed.git | C | 283 lines
                    
51
                    
52#if defined (GPIOA) || defined (GPIOB) || defined (GPIOC) || defined (GPIOD) || defined (GPIOE) || defined (GPIOF)
                    
53
                    
174  */
                    
175ErrorStatus LL_GPIO_Init(GPIO_TypeDef *GPIOx, LL_GPIO_InitTypeDef *GPIO_InitStruct)
                    
176{
                    
200
                    
201      if ((GPIO_InitStruct->Mode == LL_GPIO_MODE_OUTPUT) || (GPIO_InitStruct->Mode == LL_GPIO_MODE_ALTERNATE))
                    
202      {
                    
237    /* Output mode configuration*/
                    
238    LL_GPIO_SetPinOutputType(GPIOx, GPIO_InitStruct->Pin, GPIO_InitStruct->OutputType);
                    
239
                    
273
                    
274#endif /* defined (GPIOA) || defined (GPIOB) || defined (GPIOC) || defined (GPIOD) || defined (GPIOE) || defined (GPIOF) */
                    
275
                    
                
main-ex9.c https://bitbucket.org/teknohan/mastering-stm32-book-example.git | C | 118 lines
                    
1/* Includes ------------------------------------------------------------------*/
                    
2#include "stm32l4xx_hal.h"
                    
3#include <nucleo_hal_bsp.h>
                    
73void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_base) {
                    
74  GPIO_InitTypeDef GPIO_InitStruct;
                    
75  if (htim_base->Instance == TIM2) {
                    
80     */
                    
81    GPIO_InitStruct.Pin = GPIO_PIN_5;
                    
82    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
                    
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  }
                    
                
main-ex9.c https://bitbucket.org/teknohan/mastering-stm32-book-example.git | C | 116 lines
                    
1/* Includes ------------------------------------------------------------------*/
                    
2#include "stm32f4xx_hal.h"
                    
3#include <nucleo_hal_bsp.h>
                    
70void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_base) {
                    
71  GPIO_InitTypeDef GPIO_InitStruct;
                    
72  if (htim_base->Instance == TIM3) {
                    
78     */
                    
79    GPIO_InitStruct.Pin = GPIO_PIN_6 | GPIO_PIN_7;
                    
80    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
                    
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  }
                    
                
Makefile https://gitlab.com/gmbnomis/u-boot | Makefile | 55 lines
                    
21obj-$(CONFIG_FSL_IIM) += fsl_iim.o
                    
22obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o
                    
23obj-$(CONFIG_$(SPL_)I2C_EEPROM) += i2c_eeprom.o
                    
54obj-$(CONFIG_ROCKCHIP_EFUSE) += rockchip-efuse.o
                    
55obj-$(CONFIG_STM32_RCC) += stm32_rcc.o
                    
56
                    
                
Makefile https://gitlab.com/gmbnomis/u-boot | Makefile | 47 lines
                    
8obj-$(CONFIG_DM_I2C_COMPAT) += i2c-uclass-compat.o
                    
9obj-$(CONFIG_DM_I2C_GPIO) += i2c-gpio.o
                    
10obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o
                    
39obj-$(CONFIG_SYS_I2C_SOFT) += soft_i2c.o
                    
40obj-$(CONFIG_SYS_I2C_STM32F7) += stm32f7_i2c.o
                    
41obj-$(CONFIG_SYS_I2C_TEGRA) += tegra_i2c.o
                    
                
hw_led.h https://github.com/imby/STM32VLDiscovery_BeRTOS.git | C Header | 71 lines
                    
44
                    
45#include <drv/gpio_stm32.h>
                    
46#include <drv/clock_stm32.h>
                    
48#define LED_PIN			    BV(8)
                    
49#define LED_GPIO_BASE		((struct stm32_gpio *)GPIOC_BASE)
                    
50
                    
52		do {							\
                    
53			stm32_gpioPinWrite(LED_GPIO_BASE, LED_PIN, 1);	\
                    
54		} while (0)
                    
57		do {							\
                    
58			stm32_gpioPinWrite(LED_GPIO_BASE, LED_PIN, 0);	\
                    
59		} while (0)
                    
65			/* Configure the LED pin as GPIO */		\
                    
66			stm32_gpioPinConfig(LED_GPIO_BASE,		\
                    
67					LED_PIN, GPIO_MODE_OUT_PP,	\
                    
                
Config.h https://github.com/fredcooke/DSOQuad_SourceCode.git | C Header | 220 lines
                    
7
                    
8#include "stm32f10x_lib.h"
                    
9
                    
167
                    
168#define GPIOA_CRL   (*((vu32 *)(0x40010800+0x00)))
                    
169#define GPIOA_CRH   (*((vu32 *)(0x40010800+0x04)))
                    
169#define GPIOA_CRH   (*((vu32 *)(0x40010800+0x04)))
                    
170#define GPIOA_IDR   (*((vu32 *)(0x40010800+0x08)))
                    
171#define GPIOA_ODR   (*((vu32 *)(0x40010800+0x0C)))
                    
171#define GPIOA_ODR   (*((vu32 *)(0x40010800+0x0C)))
                    
172#define GPIOA_BSRR  (*((vu32 *)(0x40010800+0x10)))
                    
173#define GPIOA_BRR   (*((vu32 *)(0x40010800+0x14)))
                    
174
                    
175#define GPIOB_CRL   (*((vu32 *)(0x40010C00+0x00)))
                    
176#define GPIOB_CRH   (*((vu32 *)(0x40010C00+0x04)))
                    
                
stm32_eval_legacy.h https://gitlab.com/21mece13/FreeRTOS | C Header | 205 lines
                    
26#ifndef __STM32_EVAL_LEGACY_H
                    
27#define __STM32_EVAL_LEGACY_H
                    
28
                    
40#endif
                    
41#define STM3220F_LCD_Init       STM322xG_LCD_Init
                    
42
                    
51#define Button_SEL           BUTTON_SEL
                    
52#define Mode_GPIO            BUTTON_MODE_GPIO
                    
53#define Mode_EXTI            BUTTON_MODE_EXTI
                    
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
                    
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
                    
                
stm32f4xx_exti.h https://gitlab.com/paelzer/qemu | C Header | 59 lines
                    
1/*
                    
2 * STM32F4XX EXTI
                    
3 *
                    
37
                    
38#define TYPE_STM32F4XX_EXTI "stm32f4xx-exti"
                    
39OBJECT_DECLARE_SIMPLE_TYPE(STM32F4xxExtiState, STM32F4XX_EXTI)
                    
40
                    
41#define NUM_GPIO_EVENT_IN_LINES 16
                    
42#define NUM_INTERRUPT_OUT_LINES 16
                    
43
                    
44struct STM32F4xxExtiState {
                    
45    SysBusDevice parent_obj;
                    
                
rt_stm32f10x_spi.c https://bitbucket.org/darcyg/shenzhou-iv-stm32f107-rt-thread.git | C | 435 lines
                    
213    {
                    
214        GPIO_ResetBits(stm32_spi_cs->GPIOx, stm32_spi_cs->GPIO_Pin);
                    
215    }
                    
298    {
                    
299        GPIO_SetBits(stm32_spi_cs->GPIOx, stm32_spi_cs->GPIO_Pin);
                    
300    }
                    
322        /* Configure SPI1 pins: PA5-SCK, PA6-MISO and PA7-MOSI */
                    
323        GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7;
                    
324        GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
324        GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
325        GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
                    
326        GPIO_Init(GPIOA, &GPIO_InitStructure);
                    
359        GPIO_InitStructure.GPIO_Mode  = GPIO_Mode_AF_PP;
                    
360        GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
361
                    
                
gpio.h https://github.com/torfbolt/libmaple.git | C Header | 264 lines
                    
28 * @file libmaple/stm32f2/include/series/gpio.h
                    
29 * @brief STM32F2 GPIO support.
                    
30 */
                    
32#ifndef _LIBMAPLE_STM32F2_GPIO_H_
                    
33#define _LIBMAPLE_STM32F2_GPIO_H_
                    
34
                    
200    GPIO_MODEF_SPEED_FAST = GPIO_OSPEEDR_FAST << 1, /**< Fast speed: 50 MHz. */
                    
201    GPIO_MODEF_SPEED_HIGH = GPIO_OSPEEDR_HIGH << 1, /**< High speed:
                    
202                                                       100 MHz on 30 pF,
                    
205    /* Pull-up/pull-down in bits 4:3 */
                    
206    GPIO_MODEF_PUPD_NONE = GPIO_PUPDR_NOPUPD << 3, /**< No pull-up/pull-down
                    
207                                                      (default). */
                    
257
                    
258void gpio_set_af(struct gpio_dev *dev, uint8 bit, gpio_af af);
                    
259
                    
                
up_adc.c https://gitlab.com/BlueCabbage/NuttX | C | 168 lines
                    
67
                    
68#if STM32_NADC < 2
                    
69#  undef CONFIG_STM32_ADC2
                    
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 */
                    
134        {
                    
135          stm32_configgpio(g_pinlist[i]);
                    
136        }
                    
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
                    
67
                    
68#if STM32_NADC < 2
                    
69#  undef CONFIG_STM32_ADC2
                    
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 */
                    
134        {
                    
135          stm32_configgpio(g_pinlist[i]);
                    
136        }
                    
166
                    
167#endif /* CONFIG_STM32_ADC1 || CONFIG_STM32_ADC2 || CONFIG_STM32_ADC3 */
                    
168#endif /* CONFIG_ADC */
                    
                
stm32f469-disco.dts https://gitlab.com/oyvholm/linux | Device Tree | 134 lines
                    
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
                    
76		enable-active-high;
                    
77		gpio = <&gpiob 2 0>;
                    
78		regulator-name = "vcc5_host1";
                    
83&rcc {
                    
84	compatible = "st,stm32f469-rcc", "st,stm32f42xx-rcc", "st,stm32-rcc";
                    
85};
                    
                
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 \
                    
31
                    
32STM32F10x/CMSIS/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h:
                    
33
                    
63
                    
64STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_gpio.h:
                    
65
                    
77
                    
78STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_spi.h:
                    
79
                    
                
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 \
                    
8 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_bkp.h \
                    
9 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_can.h \
                    
10 STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_cec.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 \
                    
35
                    
36STM32F10x/CMSIS/CM3/DeviceSupport/ST/STM32F10x/stm32f10x.h:
                    
37
                    
65
                    
66STM32F10x/STM32F10x_StdPeriph_Driver/inc/stm32f10x_gpio.h:
                    
67
                    
                
stm32_autoleds.c https://bitbucket.org/hg42/nuttx.git | C | 96 lines
                    
1/****************************************************************************
                    
2 * configs/nucleo-l476rg/src/stm32l4_autoleds.c
                    
3 *
                    
51#include "up_internal.h"
                    
52#include "stm32l4.h"
                    
53#include "nucleo-l476rg.h"
                    
68
                    
69  stm32l4_configgpio(GPIO_LD2);
                    
70}
                    
79    {
                    
80      stm32l4_gpiowrite(GPIO_LD2, true);
                    
81    }
                    
91    {
                    
92      stm32l4_gpiowrite(GPIO_LD2, false);
                    
93    }
                    
                
stm32_autoleds.c https://bitbucket.org/hg42/nuttx.git | C | 96 lines
                    
1/****************************************************************************
                    
2 * configs/nucleo-l432kc/src/stm32l4_autoleds.c
                    
3 *
                    
51#include "up_internal.h"
                    
52#include "stm32l4.h"
                    
53#include "nucleo-l432kc.h"
                    
68
                    
69  stm32l4_configgpio(GPIO_LD2);
                    
70}
                    
79    {
                    
80      stm32l4_gpiowrite(GPIO_LD2, true);
                    
81    }
                    
91    {
                    
92      stm32l4_gpiowrite(GPIO_LD2, false);
                    
93    }
                    
                
stm32_autoleds.c https://bitbucket.org/hg42/nuttx.git | C | 96 lines
                    
1/****************************************************************************
                    
2 * configs/nucleo-f091rc/src/stm32_autoleds.c
                    
3 *
                    
51#include "up_internal.h"
                    
52#include "stm32f0_gpio.h"
                    
53#include "nucleo-f091rc.h"
                    
68
                    
69  stm32f0_configgpio(GPIO_LD2);
                    
70}
                    
79    {
                    
80      stm32f0_gpiowrite(GPIO_LD2, true);
                    
81    }
                    
91    {
                    
92      stm32f0_gpiowrite(GPIO_LD2, false);
                    
93    }
                    
                
stm32_autoleds.c https://bitbucket.org/hg42/nuttx.git | C | 96 lines
                    
1/****************************************************************************
                    
2 * configs/nucleo-f072rb/src/stm32_autoleds.c
                    
3 *
                    
51#include "up_internal.h"
                    
52#include "stm32f0_gpio.h"
                    
53#include "nucleo-f072rb.h"
                    
68
                    
69  stm32f0_configgpio(GPIO_LD2);
                    
70}
                    
79    {
                    
80      stm32f0_gpiowrite(GPIO_LD2, true);
                    
81    }
                    
91    {
                    
92      stm32f0_gpiowrite(GPIO_LD2, false);
                    
93    }
                    
                
stm32mp131.dtsi https://gitlab.com/dieselnutjob/linux-next | Device Tree | 283 lines
                    
185
                    
186			gpiob: gpio@50003000 {
                    
187				gpio-controller;
                    
233
                    
234			gpiof: gpio@50007000 {
                    
235				gpio-controller;
                    
245
                    
246			gpiog: gpio@50008000 {
                    
247				gpio-controller;
                    
257
                    
258			gpioh: gpio@50009000 {
                    
259				gpio-controller;
                    
269
                    
270			gpioi: gpio@5000a000 {
                    
271				gpio-controller;
                    
                
serial.c https://gitlab.com/victorl/PX4Firmware | C | 358 lines
                    
52#include <up_arch.h>
                    
53#include <stm32.h>
                    
54#include <systemlib/perf_counter.h>
                    
80#define REG(_x)		(*(volatile uint32_t *)(PX4FMU_SERIAL_BASE + _x))
                    
81#define rSR		REG(STM32_USART_SR_OFFSET)
                    
82#define rDR		REG(STM32_USART_DR_OFFSET)
                    
84#define rCR1		REG(STM32_USART_CR1_OFFSET)
                    
85#define rCR2		REG(STM32_USART_CR2_OFFSET)
                    
86#define rCR3		REG(STM32_USART_CR3_OFFSET)
                    
86#define rCR3		REG(STM32_USART_CR3_OFFSET)
                    
87#define rGTPR		REG(STM32_USART_GTPR_OFFSET)
                    
88
                    
106	/* configure pins for serial use */
                    
107	stm32_configgpio(PX4FMU_SERIAL_TX_GPIO);
                    
108	stm32_configgpio(PX4FMU_SERIAL_RX_GPIO);
                    
                
main.c https://github.com/ymqqqqdx/n2_taximeter.git | C | 186 lines
                    
145  /* TIM2_CH1 pin (PA.00) configuration */
                    
146  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
                    
147  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
                    
147  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
                    
148  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
                    
149
                    
149
                    
150  GPIO_Init(GPIOA, &GPIO_InitStructure);
                    
151
                    
153  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1;
                    
154  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
                    
155
                    
155
                    
156  GPIO_Init(GPIOA, &GPIO_InitStructure);
                    
157}
                    
                
stm32f10x_conf.h https://gitlab.com/mdeblin/stm32_lcd_i2c-master | C Header | 85 lines
                    
34/* Uncomment the line below to enable peripheral header file inclusion */
                    
35//#include "stm32f10x_adc.h"
                    
36//#include "stm32f10x_bkp.h"
                    
36//#include "stm32f10x_bkp.h"
                    
37//#include "stm32f10x_can.h"
                    
38//#include "stm32f10x_crc.h"
                    
38//#include "stm32f10x_crc.h"
                    
39//#include "stm32f10x_dac.h"
                    
40//#include "stm32f10x_dbgmcu.h"
                    
44//#include "stm32f10x_fsmc.h"
                    
45//#include "stm32f10x_gpio.h"
                    
46//#include "stm32f10x_i2c.h"
                    
53//#include "stm32f10x_tim.h"
                    
54//#include "stm32f10x_usart.h"
                    
55//#include "stm32f10x_wwdg.h"
                    
                
stm32f10x_it.c https://github.com/ymqqqqdx/n2_taximeter.git | C | 213 lines
                    
2  ******************************************************************************
                    
3  * @file TIM/TimeBase/stm32f10x_it.c 
                    
4  * @author  MCD Application Team
                    
155    /* Pin PC.06 toggling with frequency = 73.24 Hz */
                    
156    GPIO_WriteBit(GPIOC, GPIO_Pin_6, (BitAction)(1 - GPIO_ReadOutputDataBit(GPIOC, GPIO_Pin_6)));
                    
157    capture = TIM_GetCapture1(TIM2);
                    
164    /* Pin PC.07 toggling with frequency = 109.8 Hz */
                    
165    GPIO_WriteBit(GPIOC, GPIO_Pin_7, (BitAction)(1 - GPIO_ReadOutputDataBit(GPIOC, GPIO_Pin_7)));
                    
166    capture = TIM_GetCapture2(TIM2);
                    
173    /* Pin PC.08 toggling with frequency = 219.7 Hz */
                    
174    GPIO_WriteBit(GPIOC, GPIO_Pin_8, (BitAction)(1 - GPIO_ReadOutputDataBit(GPIOC, GPIO_Pin_8)));
                    
175    capture = TIM_GetCapture3(TIM2);
                    
182    /* Pin PC.09 toggling with frequency = 439.4 Hz */
                    
183    GPIO_WriteBit(GPIOC, GPIO_Pin_9, (BitAction)(1 - GPIO_ReadOutputDataBit(GPIOC, GPIO_Pin_9)));
                    
184    capture = TIM_GetCapture4(TIM2);
                    
                
stm32_spi.h https://bitbucket.org/hg42/nuttx.git | C Header | 215 lines
                    
1/************************************************************************************
                    
2 * arch/arm/src/stm32/stm32_spi.h
                    
3 *
                    
35
                    
36#ifndef __ARCH_ARM_STC_STM32_STM32_SPI_H
                    
37#define __ARCH_ARM_STC_STM32_STM32_SPI_H
                    
91/************************************************************************************
                    
92 * Name:  stm32_spi1/2/...select and stm32_spi1/2/...status
                    
93 *
                    
94 * Description:
                    
95 *   The external functions, stm32_spi1/2/...select, stm32_spi1/2/...status, and
                    
96 *   stm32_spi1/2/...cmddata must be provided by board-specific logic.  These are
                    
98 *   defined by struct spi_ops_s (see include/nuttx/spi/spi.h). All other methods
                    
99 *   (including stm32_spibus_initialize()) are provided by common STM32 logic.  To use this
                    
100 *   common SPI logic on your board:
                    
                
 

Source

Language