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.

88 lines
1.9 KiB

  1. /*
  2. * gpio_helper.h
  3. *
  4. * Created: 22/1/2016 15:29:12
  5. * Author: akatran
  6. */
  7. #ifndef GPIO_HELPER_H_
  8. #define GPIO_HELPER_H_
  9. #include <avr/io.h>
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. /* Defines */
  14. #define XMEGA_PORTA_PIN0 0
  15. #define XMEGA_PORTA_PIN1 1
  16. #define XMEGA_PORTA_PIN2 2
  17. #define XMEGA_PORTA_PIN3 3
  18. #define XMEGA_PORTA_PIN4 4
  19. #define XMEGA_PORTA_PIN5 5
  20. #define XMEGA_PORTA_PIN6 6
  21. #define XMEGA_PORTA_PIN7 7
  22. #define XMEGA_PORTB_PIN0 8
  23. #define XMEGA_PORTB_PIN1 9
  24. #define XMEGA_PORTB_PIN2 10
  25. #define XMEGA_PORTB_PIN3 11
  26. #define XMEGA_PORTB_PIN4 12
  27. #define XMEGA_PORTB_PIN5 13
  28. #define XMEGA_PORTB_PIN6 14
  29. #define XMEGA_PORTB_PIN7 15
  30. #define XMEGA_PORTC_PIN0 16
  31. #define XMEGA_PORTC_PIN1 17
  32. #define XMEGA_PORTC_PIN2 18
  33. #define XMEGA_PORTC_PIN3 19
  34. #define XMEGA_PORTC_PIN4 20
  35. #define XMEGA_PORTC_PIN5 21
  36. #define XMEGA_PORTC_PIN6 22
  37. #define XMEGA_PORTC_PIN7 23
  38. #define XMEGA_PORTD_PIN0 24
  39. #define XMEGA_PORTD_PIN1 25
  40. #define XMEGA_PORTD_PIN2 26
  41. #define XMEGA_PORTD_PIN3 27
  42. #define XMEGA_PORTD_PIN4 28
  43. #define XMEGA_PORTD_PIN5 29
  44. #define XMEGA_PORTD_PIN6 30
  45. #define XMEGA_PORTD_PIN7 31
  46. #define XMEGA_PORTE_PIN0 32
  47. #define XMEGA_PORTE_PIN1 33
  48. #define XMEGA_PORTE_PIN2 34
  49. #define XMEGA_PORTE_PIN3 35
  50. #define XMEGA_PORTE_PIN4 36
  51. #define XMEGA_PORTE_PIN5 37
  52. #define XMEGA_PORTE_PIN6 38
  53. #define XMEGA_PORTE_PIN7 39
  54. #define XMEGA_PORTF_PIN0 40
  55. #define XMEGA_PORTF_PIN1 41
  56. #define XMEGA_PORTF_PIN2 42
  57. #define XMEGA_PORTF_PIN3 43
  58. #define XMEGA_PORTF_PIN4 44
  59. #define XMEGA_PORTF_PIN5 45
  60. #define XMEGA_PORTF_PIN6 46
  61. #define XMEGA_PORTF_PIN7 47
  62. #define XMEGA_SPI_PORT_C 20
  63. #define XMEGA_SPI_PORT_D 28
  64. //void GPIO_getPort(int pinnum, PORT_t * port, uint8_t pin);
  65. //void GPIO_getPort(int pinnum, PORT_t * port, uint8_t * pin_bm);
  66. PORT_t * GPIO_getPort(int pinnum, uint8_t * pin_bm);
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70. #endif /* GPIO_HELPER_H_ */