board.h 597 B

1234567891011121314151617181920212223
  1. #ifndef __BOARD_H
  2. #define __BOARD_H
  3. /* MACROs for SET, RESET or TOGGLE Output port */
  4. #define GPIO_HIGH(a,b) a->ODR |= b
  5. #define GPIO_LOW(a,b) a->ODR &= ~b
  6. #define GPIO_TOGGLE(a,b) a->ODR ^= b
  7. #define BUTTON1_PORT GPIOD
  8. #define BUTTON1_PIN GPIO_Pin_4
  9. #define BUTTON2_PORT GPIOA
  10. #define BUTTON2_PIN GPIO_Pin_3
  11. #define SPI_PORT GPIOC
  12. #define SPI_SCK GPIO_PIN_5
  13. #define SPI_MOSI GPIO_PIN_6
  14. #define SPI_PINS (SPI_SCK | SPI_MOSI)
  15. #define SPI_LOAD_PORT GPIOD
  16. #define SPI_LOAD GPIO_PIN_3
  17. #endif /* __BOARD_H */