stm32-bluepill-invled.h 884 B

12345678910111213141516171819202122232425262728
  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 popular on Taobao, e.g. https://item.taobao.com/item.htm?id=630403001847 ,
  8. * very similar to bluepill, but with an LED connected to PC13 with inversed polarity (active low).
  9. */
  10. #define BOARD_USE_DEBUG_PINS_AS_GPIO false /* We don't have to disable SWD to access GPIO's on these boards */
  11. #define BOARD_RCC_LED RCC_GPIOC
  12. #define BOARD_PORT_LED GPIOC
  13. #define BOARD_PIN_LED GPIO13
  14. #define BOARD_LED_HIGH_IS_BUSY false
  15. #define BOARD_RCC_USB_PULLUP RCC_GPIOA
  16. #define BOARD_PORT_USB_PULLUP GPIOA
  17. #define BOARD_PIN_USB_PULLUP GPIO12
  18. #define BOARD_USB_HIGH_IS_PULLUP true
  19. /* Currently you can only use SPI1, since it has highest clock. */
  20. #endif /* __BOARD_H__ */