Kiibohd Controller
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

trigger.h 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* Copyright (C) 2014-2016 by Jacob Alexander
  2. *
  3. * This file is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This file is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this file. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #pragma once
  17. // ----- Includes -----
  18. // Compiler Includes
  19. #include <stdint.h>
  20. // ----- Functions -----
  21. // Updates trigger state, but does not add event to processing queue
  22. void Trigger_state( uint8_t type, uint8_t state, uint8_t index );
  23. // Updates trigger state, adds event to processing queue
  24. // If event was already added this cycle, it will be discarded, state is not updated, and returns 0
  25. // Returns 1 otherwise
  26. uint8_t Trigger_update( uint8_t type, uint8_t state, uint8_t index );
  27. void Trigger_process();
  28. void Trigger_setup();