gpio.h 775 B

1234567891011121314151617181920
  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. #define LED_ACT_ON() PAREG->BSRR = 0b0000000000010001;
  13. #define LED_ACT_OFF() PAREG->BSRR = 0b0000000000010001 << 16;
  14. bool gpioInit();
  15. #endif // __BLACKSASI_GPIO_H__