Skip to content

Commit 3d1acb3

Browse files
committed
Cleanup and fix pin name
1 parent 9ed2cc9 commit 3d1acb3

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

examples/stm32/f7/stm32f7-discovery/miniblink/miniblink.c

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,8 @@
2323

2424
static void gpio_setup(void)
2525
{
26-
/* Enable GPIOD clock. */
27-
/* Manually: */
28-
// RCC_AHB1ENR |= RCC_AHB1ENR_IOPDEN;
29-
/* Using API functions: */
3026
rcc_periph_clock_enable(RCC_GPIOI);
3127

32-
/* Set GPIO12 (in GPIO port D) to 'output push-pull'. */
33-
/* Manually: */
34-
// GPIOD_CRH = (GPIO_CNF_OUTPUT_PUSHPULL << (((8 - 8) * 4) + 2));
35-
// GPIOD_CRH |= (GPIO_MODE_OUTPUT_2_MHZ << ((8 - 8) * 4));
36-
/* Using API functions: */
3728
gpio_mode_setup(GPIOI, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO1);
3829
}
3930

@@ -43,25 +34,8 @@ int main(void)
4334

4435
gpio_setup();
4536

46-
/* Blink the LED (PC8) on the board. */
37+
/* Blink the LED (PI1) on the board. */
4738
while (1) {
48-
/* Manually: */
49-
// GPIOD_BSRR = GPIO12; /* LED off */
50-
// for (i = 0; i < 1000000; i++) /* Wait a bit. */
51-
// __asm__("nop");
52-
// GPIOD_BRR = GPIO12; /* LED on */
53-
// for (i = 0; i < 1000000; i++) /* Wait a bit. */
54-
// __asm__("nop");
55-
56-
/* Using API functions gpio_set()/gpio_clear(): */
57-
// gpio_set(GPIOD, GPIO12); /* LED off */
58-
// for (i = 0; i < 1000000; i++) /* Wait a bit. */
59-
// __asm__("nop");
60-
// gpio_clear(GPIOD, GPIO12); /* LED on */
61-
// for (i = 0; i < 1000000; i++) /* Wait a bit. */
62-
// __asm__("nop");
63-
64-
/* Using API function gpio_toggle(): */
6539
gpio_toggle(GPIOI, GPIO1); /* LED on/off */
6640
for (i = 0; i < 1000000; i++) { /* Wait a bit. */
6741
__asm__("nop");

0 commit comments

Comments
 (0)