ppm.h 938 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Copyright (C) Siddharth Bharat Purohit 2017
  3. * This file is free software: you can redistribute it and/or modify it
  4. * under the terms of the GNU General Public License as published by the
  5. * 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, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. * See the GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License along
  14. * with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "hal.h"
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. bool ppm_init(uint32_t freq, bool active_high);
  21. uint16_t ppm_read(uint8_t chan);
  22. uint8_t ppm_read_bulk(uint16_t periods[], uint8_t len);
  23. bool ppm_available();
  24. #ifdef __cplusplus
  25. }
  26. #endif