gpio.h 645 B

123456789101112131415161718
  1. #ifndef __BLACKSASI_GPIO_H__
  2. #define __BLACKSASI_GPIO_H__
  3. // LED control
  4. #define LED1_ON() PAREG->BSRR = 0b0000000000010000;
  5. #define LED1_OFF() PAREG->BSRR = 0b0000000000010000 << 16;
  6. #define LED2_ON() PAREG->BSRR = 0b0000000000100000;
  7. #define LED2_OFF() PAREG->BSRR = 0b0000000000100000 << 16;
  8. #define LED3_ON() PAREG->BSRR = 0b0000000001000000;
  9. #define LED3_OFF() PAREG->BSRR = 0b0000000001000000 << 16;
  10. #define LED_EXT_ON() PAREG->BSRR = 0b0000000000000001;
  11. #define LED_EXT_OFF() PAREG->BSRR = 0b0000000000000001 << 16;
  12. bool gpioInit();
  13. #endif // __BLACKSASI_GPIO_H__