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.

64 lines
1.5 KiB

  1. #ifndef __ARCH_CONFIG_H__
  2. #define __ARCH_CONFIG_H__
  3. #include "mraa.h"
  4. #include "spi.h"
  5. #include "gpio.h"
  6. #include "compatibility.h"
  7. #include <stdint.h>
  8. #include <stdio.h>
  9. #include <time.h>
  10. #include <string.h>
  11. #include <sys/time.h>
  12. #include <stddef.h>
  13. #include <iostream>
  14. #include <unistd.h>
  15. #include <stdlib.h>
  16. //#include <UtilTime.h> // Precompiled arduino x86 based utiltime for timing functions
  17. // GCC a Arduino Missing
  18. #define HIGH 1
  19. #define LOW 0
  20. #define _BV(x) (1<<(x))
  21. #define pgm_read_word(p) (*(p))
  22. #define pgm_read_byte(p) (*(p))
  23. #define pgm_read_ptr(p) (*(p))
  24. #define _SPI spi
  25. #define RF24_LINUX
  26. //typedef uint16_t prog_uint16_t;
  27. #define PSTR(x) (x)
  28. #define printf_P printf
  29. #define sprintf_P sprintf
  30. #define strlen_P strlen
  31. #define PROGMEM
  32. #define PRIPSTR "%s"
  33. #ifdef SERIAL_DEBUG
  34. #define IF_SERIAL_DEBUG(x) ({x;})
  35. #else
  36. #define IF_SERIAL_DEBUG(x)
  37. #endif
  38. #define digitalWrite(pin, value) gpio.write(pin, value)
  39. #define digitalRead(pin) GPIO::read(pin)
  40. #define pinMode(pin, direction) gpio.open(pin, direction)
  41. #ifndef __TIME_H__
  42. // Prophet: Redefine time functions only if precompiled arduino time is not included
  43. #define delay(milisec) __msleep(milisec)
  44. #define delayMicroseconds(usec) __usleep(usec)
  45. #define millis() __millis()
  46. #endif
  47. #define INPUT mraa::DIR_IN
  48. #define OUTPUT mraa::DIR_OUT
  49. // SPI defines for ARDUINO API
  50. #define MSBFIRST 1
  51. #define SPI_MODE0 mraa::SPI_MODE0
  52. #define SPI_CLOCK_DIV2 8000000
  53. #endif