platform.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _Platform_H
  2. #define _Platform_H
  3. /*
  4. * Copyright STREAMIT BV, 2010.
  5. *
  6. * Project : SIR
  7. * Module : Platform
  8. * File name $Workfile: Platform.h $
  9. * Last Save $Date: 2003/08/18 10:09:48 $
  10. * $Revision: 0.1 $
  11. * Creation Date : 2003/08/18 10:09:48
  12. *
  13. * Description : Definitions which are dependent on the compiler and
  14. * or processor.
  15. */
  16. /*--------------------------------------------------------------------------*/
  17. /* Include files */
  18. /*--------------------------------------------------------------------------*/
  19. /*--------------------------------------------------------------------------*/
  20. /* Constant definitions */
  21. /*--------------------------------------------------------------------------*/
  22. #define LOBYTE(w) ((u_char) ((w) & 0xFF))
  23. #define HIBYTE(w) ((u_char) (((u_short) (w) >> 8) & 0xFF))
  24. #define LOWORD(l) ((u_short) ((l) & 0xFFFF))
  25. #define HIWORD(l) ((u_short) (((u_long) (l) >> 16) & 0xFFFF))
  26. #define MAKEWORD(bLow, bHigh) \
  27. ((u_short) (((u_char) (bLow)) | ((u_short) ((u_char) (bHigh))) << 8))
  28. #define MAKEULONG(wLow, wHigh) \
  29. ((u_long) (((u_short) (wLow)) | ((u_long) ((u_short) (wHigh))) << 16))
  30. /*--------------------------------------------------------------------------*/
  31. /* Type declarations */
  32. /*--------------------------------------------------------------------------*/
  33. #ifndef prog_int
  34. #define prog_int prog_int16_t
  35. #endif /* #ifndef prog_int */
  36. /*--------------------------------------------------------------------------*/
  37. /* Global variables */
  38. /*--------------------------------------------------------------------------*/
  39. /*--------------------------------------------------------------------------*/
  40. /* Global functions */
  41. /*--------------------------------------------------------------------------*/
  42. #define PRG_RDW(addr) pgm_read_word(addr)
  43. #endif /* _Platform_H */