Control drones with a proper joystick
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.

cppm.h 622B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Combined-PPM signal generator
  3. * Copyright 2016 by Thomas Buck <xythobuz@xythobuz.de>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation, version 2.
  8. */
  9. #ifndef _CPPM_H
  10. #define _CPPM_H
  11. #include <stdint.h>
  12. #ifdef DEBUG
  13. // Arduino D10
  14. #define CPPM_PORT PORTB
  15. #define CPPM_DDR DDRB
  16. #define CPPM_PIN PB2
  17. #else
  18. #define CPPM_PORT PORTB
  19. #define CPPM_DDR DDRB
  20. #define CPPM_PIN PB5
  21. #endif
  22. extern volatile uint16_t cppmData[8];
  23. void cppmInit(void);
  24. void cppmCopy(uint16_t *data);
  25. #endif