nucleo-f042k6.h 945 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef __BOARD_H__
  2. #define __BOARD_H__
  3. #include <stdbool.h>
  4. #include <libopencm3/stm32/rcc.h>
  5. #include <libopencm3/stm32/gpio.h>
  6. /*
  7. * Board definitions for ST's Nucleo-32 reference board with STM32F042K6
  8. * https://www.st.com/en/evaluation-tools/nucleo-f042k6.html
  9. *
  10. * The USB port on the board is connected to an onboard ST-LINK.
  11. * F042's actual USB port is exposed on the pin headers:
  12. *
  13. * USB | Nucleo-F042
  14. * -----|--------------
  15. * D- | CN3-13 (D10)
  16. * D+ | CN3-5 (D2)
  17. * 5V | CN4-4, (5V)
  18. * GND | CN4-2, (GND)
  19. *
  20. */
  21. #define BOARD_USE_DEBUG_PINS_AS_GPIO false
  22. #define BOARD_RCC_LED RCC_GPIOB
  23. #define BOARD_PORT_LED GPIOB
  24. #define BOARD_PIN_LED GPIO3
  25. /* Only LED, high active, use as idle. */
  26. #define BOARD_LED_HIGH_IS_BUSY false
  27. /* STM32F0x2 has internal USB pullup. */
  28. /* Currently you can only use SPI1, since it has highest clock. */
  29. #endif /* __BOARD_H__ */