Leds and buttons for discovery, nucleo and eval boards - http://stm32f4-discovery.com/2015/07/hal-library-2-leds-and-button-for-stm32-boards/.
More...
|
|
#define | LED_GREEN 0 |
| |
|
#define | LED_RED 0 |
| |
|
#define | LED_ORANGE 0 |
| |
|
#define | LED_BLUE 0 |
| |
|
#define | LED_ALL 0 |
| |
|
#define | DISCO_LED_PORT GPIOA |
| |
|
#define | DISCO_LED_PINS LED_ALL |
| |
|
#define | DISCO_BUTTON_PORT GPIOA |
| |
|
#define | DISCO_BUTTON_PIN 0 |
| |
|
#define | DISCO_BUTTON_PRESSED 0 |
| |
|
#define | DISCO_BUTTON_PULL TM_GPIO_PuPd_NOPULL |
| |
Leds and buttons for discovery, nucleo and eval boards - http://stm32f4-discovery.com/2015/07/hal-library-2-leds-and-button-for-stm32-boards/.
- Supported boards
- STM32F429 Discovery: (STM32F429ZI) -
STM32F429_DISCOVERY
- Leds:
- LED_GREEN on PG13
- LED_RED on PG14
- Button: (HIGH when pressed)
- STM32F401-Discovery: (STM32F401VC) -
STM32F401_DISCOVERY
- STM32F411-Discovery: (STM32F411VE) -
STM32F411_DISCOVERY
- STM32F4-Discovery: (STM32F407VG) -
STM32F4_DISCOVERY
- Leds:
- LED_GREEN on PD12
- LED_ORANGE on PD13
- LED_RED on PD14
- LED_BLUE on PD15
- Button: (HIGH when pressed)
- NUCLEO-F401: (STM32F401RE) -
NUCLEO_F401
- NUCLEO-F411: (STM32F411RE) -
NUCLEO_F411
- NUCLEO-F446: (STM32F446RE) -
NUCLEO_F446
- NUCLEO-F091: (STM32F091RC) -
NUCLEO_F091
- Led:
- Button: (LOW when pressed)
- STM32439-Eval (STM32F439NI) -
STM32F439_EVAL
- Leds:
- LED_GREEN on PG6
- LED_ORANGE on PG7
- LED_RED on PG10
- LED_BLUE on PG12
- Button: (HIGH when pressed)
- STM32F469-Discovery: (STM32F469NI) -
STM32F469_DISCOVERY
- Leds:
- LED1 on PG6
- LED2 on PD4
- LED3 on PD5
- LED4 on PK3
- Button: (HIGH when pressed)
- STM32F7-Discovery: (STM32F746NI) -
STM32F7_DISCOVERY
- Leds:
- Button: (LOW when pressed)
- Select your board
To select your board, you have several options:
- Add define for your board in defines.h file or
- Add define for your board in compiler's global settings
- For Keil uVision you have "Options for Target" and "C/C++" tab where you can set this.
- Note
- If you are using my other libs, for example SDRAM or LCD where pins and settings depend on board used, then I recommend you select your board using this library. If you use, for example STM32F429-Discovery board, then add global define "STM32F429_DISCOVERY" in defines.h file and all other libraries which will detect this define will know you are using this board and default settings (if exists) will be automatically detected. For example, SDRAM/LCD/USB are 3 of many libraries which needs special defines according to board used in your project. Using global define for your board, libs will detect settings needed for work.
Imagine, we want to work with STM324x9-Eval board. Then, you can open defines.h file and add define:
Or if you want STM32F429-Discovery, do this:
#define STM32F429_DISCOVERY
- All boards and its defines
#define STM32F429_DISCOVERY
#define STM32F401_DISCOVERY
#define STM32F411_DISCOVERY
#define STM32F4_DISCOVERY
#define NUCLEO_F401
#define NUCLEO_F411
#define NUCLEO_F446
#define NUCLEO_F091
#define STM32F439_EVAL
#define STM32F469_DISCOVERY
#define STM32F7_DISCOVERY
- Changelog
Version 1.0
- First release
Version 1.1
- October 10, 2015
- Added support for STM32F469-Discovery
- Dependencies
- STM32Fxxx HAL
- defines.h
- TM GPIO