Ein Roboter mit bürstenlosem Antrieb, differenzial und NRF24L01 Funk. Großflächig gebaut um ein großes Solarpanel aufzunehmen. https://gitlab.informatik.hs-fulda.de/fdai5253/roboter
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.

68 lines
2.1 KiB

  1. /*
  2. Interrupts functions extruded from wiringPi library by Oitzu.
  3. wiringPi Copyright (c) 2012 Gordon Henderson
  4. https://projects.drogon.net/raspberry-pi/wiringpi
  5. wiringPi is free software: GNU Lesser General Public License
  6. see <http://www.gnu.org/licenses/>
  7. */
  8. #include "RF24_arch_config.h"
  9. #define INT_EDGE_SETUP 0
  10. #define INT_EDGE_FALLING 1
  11. #define INT_EDGE_RISING 2
  12. #define INT_EDGE_BOTH 3
  13. /*
  14. * interruptHandler:
  15. * This is a thread and gets started to wait for the interrupt we're
  16. * hoping to catch. It will call the user-function when the interrupt
  17. * fires.
  18. *********************************************************************************
  19. */
  20. void *interruptHandler (void *arg);
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /*
  25. * waitForInterrupt:
  26. * Pi Specific.
  27. * Wait for Interrupt on a GPIO pin.
  28. * This is actually done via the /sys/class/gpio interface regardless of
  29. * the wiringPi access mode in-use. Maybe sometime it might get a better
  30. * way for a bit more efficiency.
  31. *********************************************************************************
  32. */
  33. extern int waitForInterrupt (int pin, int mS);
  34. /*
  35. * piHiPri:
  36. * Attempt to set a high priority schedulling for the running program
  37. *********************************************************************************
  38. */
  39. extern int piHiPri (const int pri);
  40. /*
  41. * attachInterrupt (Original: wiringPiISR):
  42. * Pi Specific.
  43. * Take the details and create an interrupt handler that will do a call-
  44. * back to the user supplied function.
  45. *********************************************************************************
  46. */
  47. extern int attachInterrupt (int pin, int mode, void (*function)(void));
  48. /*
  49. * detachInterrupt:
  50. * Pi Specific detachInterrupt.
  51. * Will cancel the interrupt thread, close the filehandle and
  52. * setting wiringPi back to 'none' mode.
  53. *********************************************************************************
  54. */
  55. extern int detachInterrupt (int pin);
  56. extern void rfNoInterrupts();
  57. extern void rfInterrupts();
  58. #ifdef __cplusplus
  59. }
  60. #endif