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.

84 lines
1.8 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. /**
  8. * @file RF24_arch_config.h
  9. * General defines and includes for RF24/Linux
  10. */
  11. /**
  12. * Example of RF24_arch_config.h for RF24 portability
  13. *
  14. * @defgroup Porting_General Porting: General
  15. *
  16. *
  17. * @{
  18. */
  19. #ifndef __ARCH_CONFIG_H__
  20. #define __ARCH_CONFIG_H__
  21. #define RF24_LINUX
  22. #include <stddef.h>
  23. #include "spi.h"
  24. #include "gpio.h"
  25. #include "compatibility.h"
  26. #include <stdint.h>
  27. #include <stdio.h>
  28. #include <time.h>
  29. #include <string.h>
  30. #include <sys/time.h>
  31. #define _BV(x) (1<<(x))
  32. #define _SPI spi
  33. #undef SERIAL_DEBUG
  34. #ifdef SERIAL_DEBUG
  35. #define IF_SERIAL_DEBUG(x) ({x;})
  36. #else
  37. #define IF_SERIAL_DEBUG(x)
  38. #endif
  39. // Avoid spurious warnings
  40. #if 1
  41. #if ! defined( NATIVE ) && defined( ARDUINO )
  42. #undef PROGMEM
  43. #define PROGMEM __attribute__(( section(".progmem.data") ))
  44. #undef PSTR
  45. #define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
  46. #endif
  47. #endif
  48. typedef uint16_t prog_uint16_t;
  49. #define PSTR(x) (x)
  50. #define printf_P printf
  51. #define strlen_P strlen
  52. #define PROGMEM
  53. #define pgm_read_word(p) (*(p))
  54. #define PRIPSTR "%s"
  55. #define pgm_read_byte(p) (*(p))
  56. // Function, constant map as a result of migrating from Arduino
  57. #define LOW GPIO::OUTPUT_LOW
  58. #define HIGH GPIO::OUTPUT_HIGH
  59. #define INPUT GPIO::DIRECTION_IN
  60. #define OUTPUT GPIO::DIRECTION_OUT
  61. #define digitalWrite(pin, value) GPIO::write(pin, value)
  62. #define pinMode(pin, direction) GPIO::open(pin, direction)
  63. #define delay(milisec) __msleep(milisec)
  64. #define delayMicroseconds(usec) __usleep(usec)
  65. #define millis() __millis()
  66. #endif // __ARCH_CONFIG_H__
  67. /*@}*/