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.

62 lines
968 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 GPIO_H
  14. #define GPIO_H
  15. #include <avr/io.h>
  16. #include "gpio_helper.h"
  17. class GPIO {
  18. public:
  19. /* Constants */
  20. static const int DIRECTION_OUT = 1;
  21. static const int DIRECTION_IN = 0;
  22. static const int OUTPUT_HIGH = 1;
  23. static const int OUTPUT_LOW = 0;
  24. GPIO();
  25. /**
  26. * Similar to Arduino pinMode(pin,mode);
  27. * @param port
  28. * @param DDR
  29. */
  30. static void open(int port, int DDR);
  31. /**
  32. *
  33. * @param port
  34. */
  35. static void close(int port);
  36. /**
  37. * Similar to Arduino digitalRead(pin);
  38. * @param port
  39. * @param value
  40. */
  41. static int read(int port);
  42. /**
  43. * Similar to Arduino digitalWrite(pin,state);
  44. * @param port
  45. * @param value
  46. */
  47. static void write(int port,int value);
  48. virtual ~GPIO();
  49. };
  50. #endif /* GPIO_H */
  51. /*@}*/