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.

85 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 __RF24_ARCH_CONFIG_H__
  20. #define __RF24_ARCH_CONFIG_H__
  21. #include <stddef.h>
  22. #include <avr/pgmspace.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. // Use the avr pgmspace commands
  40. //// Avoid spurious warnings
  41. //#if 1
  42. //#if ! defined( NATIVE ) && defined( ARDUINO )
  43. //#undef PROGMEM
  44. //#define PROGMEM __attribute__(( section(".progmem.data") ))
  45. //#undef PSTR
  46. //#define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s); &__c[0];}))
  47. //#endif
  48. //#endif
  49. typedef uint16_t prog_uint16_t;
  50. //#define PSTR(x) (x)
  51. //#define printf_P printf
  52. //#define strlen_P strlen
  53. //#define PROGMEM
  54. //#define pgm_read_word(p) (*(p))
  55. #define PRIPSTR "%s"
  56. //#define pgm_read_byte(p) (*(p))
  57. // Function, constant map as a result of migrating from Arduino
  58. #define LOW GPIO::OUTPUT_LOW
  59. #define HIGH GPIO::OUTPUT_HIGH
  60. #define INPUT GPIO::DIRECTION_IN
  61. #define OUTPUT GPIO::DIRECTION_OUT
  62. #define digitalWrite(pin, value) GPIO::write(pin, value)
  63. #define pinMode(pin, direction) GPIO::open(pin, direction)
  64. #define delay(milisec) __msleep(milisec)
  65. #define delayMicroseconds(usec) __usleep(usec)
  66. #define millis() __millis()
  67. #endif // __RF24_ARCH_CONFIG_H__
  68. /*@}*/