Control drones with a proper joystick
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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