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.

58 lines
911 B

  1. /**
  2. * @file gpio.h
  3. * Class declaration for SPI helper files
  4. */
  5. /**
  6. * Example of gpio.h class declaration for GPIO portability
  7. *
  8. * @defgroup Porting_GPIO Porting: GPIO
  9. *
  10. *
  11. * @{
  12. */
  13. #ifndef H
  14. #define H
  15. #include <cstdio>
  16. //class GPIO {
  17. public:
  18. /* Constants */
  19. static const int DIRECTION_OUT = 1;
  20. static const int DIRECTION_IN = 0;
  21. static const int OUTPUT_HIGH = 1;
  22. static const int OUTPUT_LOW = 0;
  23. GPIO();
  24. /**
  25. * Similar to Arduino pinMode(pin,mode);
  26. * @param port
  27. * @param DDR
  28. */
  29. static void open(int port, int DDR);
  30. /**
  31. *
  32. * @param port
  33. */
  34. static void close(int port);
  35. /**
  36. * Similar to Arduino digitalRead(pin);
  37. * @param port
  38. * @param value
  39. */
  40. static int read(int port);
  41. /**
  42. * Similar to Arduino digitalWrite(pin,state);
  43. * @param port
  44. * @param value
  45. */
  46. static void write(int port,int value);
  47. virtual ~GPIO();
  48. };
  49. /*@}*/