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.

69 lines
1.6 KiB

  1. /*
  2. Copyright (C) 2011 J. Coliz <maniacbug@ymail.com>
  3. This program is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU General Public License
  5. version 2 as published by the Free Software Foundation.
  6. */
  7. #ifndef __ARCH_CONFIG_H__
  8. #define __ARCH_CONFIG_H__
  9. #define RF24_LINUX
  10. #include <stddef.h>
  11. #include "spi.h"
  12. #include "gpio.h"
  13. #include "compatibility.h"
  14. #include <stdint.h>
  15. #include <stdio.h>
  16. #include <time.h>
  17. #include <string.h>
  18. #include <sys/time.h>
  19. #define RF24_SPI_SPEED RF24_SPIDEV_SPEED
  20. #define _BV(x) (1<<(x))
  21. #define _SPI spi
  22. //#undef SERIAL_DEBUG
  23. #ifdef SERIAL_DEBUG
  24. #define IF_SERIAL_DEBUG(x) ({x;})
  25. #else
  26. #define IF_SERIAL_DEBUG(x)
  27. #endif
  28. // Avoid spurious warnings
  29. #if 1
  30. #if ! defined( NATIVE ) && defined( ARDUINO )
  31. #undef PROGMEM
  32. #define PROGMEM __attribute__(( section(".progmem.data") ))
  33. #undef PSTR
  34. #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
  35. #endif
  36. #endif
  37. typedef uint16_t prog_uint16_t;
  38. #define PSTR(x) (x)
  39. #define printf_P printf
  40. #define strlen_P strlen
  41. #define PROGMEM
  42. #define pgm_read_word(p) (*(p))
  43. #define PRIPSTR "%s"
  44. #define pgm_read_byte(p) (*(p))
  45. #define pgm_read_ptr(p) (*(p))
  46. // Function, constant map as a result of migrating from Arduino
  47. #define LOW GPIO::OUTPUT_LOW
  48. #define HIGH GPIO::OUTPUT_HIGH
  49. #define INPUT GPIO::DIRECTION_IN
  50. #define OUTPUT GPIO::DIRECTION_OUT
  51. #define digitalWrite(pin, value) GPIO::write(pin, value)
  52. #define pinMode(pin, direction) GPIO::open(pin, direction)
  53. #define delay(milisec) __msleep(milisec)
  54. #define delayMicroseconds(usec) __usleep(usec)
  55. #define millis() __millis()
  56. #endif // __ARCH_CONFIG_H__
  57. // vim:ai:cin:sts=2 sw=2 ft=cpp