sparse.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef SPARSE_H_
  2. #define SPARSE_H_
  3. #ifdef __CHECKER__
  4. /* Dummy declarations for sparse checker. */
  5. #define __flash1 __attribute__((address_space(1)))
  6. #define __flash2 __attribute__((address_space(2)))
  7. #define __flash3 __attribute__((address_space(3)))
  8. #define __flash4 __attribute__((address_space(4)))
  9. #define __flash5 __attribute__((address_space(5)))
  10. #define __flash __attribute__((address_space(6)))
  11. #define __memx __attribute__((address_space(7)))
  12. #define __ATTR_PROGMEM__ __flash
  13. #define __OS_main__ dllexport
  14. #define __builtin_avr_delay_cycles(x)
  15. #include <stddef.h>
  16. #include <stdint.h>
  17. #include <stdio.h>
  18. #include <avr/pgmspace.h>
  19. #define __force __attribute__((force))
  20. #undef PSTR
  21. #define PSTR(x) ((typeof(*x) __flash * __force)(x))
  22. #define to_memx(x) ((typeof(*x) __memx * __force)(x))
  23. #undef FDEV_SETUP_STREAM
  24. #define FDEV_SETUP_STREAM(p, g, f) {}
  25. typedef int32_t __int24;
  26. typedef uint32_t __uint24;
  27. extern void _delay_us(double x);
  28. extern void _delay_ms(double x);
  29. extern void _delay_loop_1(uint8_t x);
  30. extern void _delay_loop_2(uint16_t x);
  31. #else /* __CHECKER__ */
  32. #define to_memx(x) (x)
  33. #endif /* __CHECKER__ */
  34. #endif /* SPARSE_H_ */