defines.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. This software is subject to the license described in the license.txt file included with this software distribution.
  3. You may not use this file except in compliance with this license.
  4. Copyright © Dynastream Innovations Inc. 2012
  5. All rights reserved.
  6. */
  7. /**@file
  8. * @brief Definitions.
  9. * This file is based on implementation originally made by Dynastream Innovations Inc. - August 2012
  10. * @defgroup ant_fs_client_main ANT-FS client device simulator
  11. * @{
  12. * @ingroup nrf_ant_fs_client
  13. *
  14. * @brief The ANT-FS client device simulator.
  15. *
  16. */
  17. #ifndef DEFINES_H__
  18. #define DEFINES_H__
  19. #include <stdint.h>
  20. #define MAX_ULONG 0xFFFFFFFFu /**< The Max value for the type. */
  21. /**@brief uint16_t type presentation as an union. */
  22. typedef union
  23. {
  24. uint16_t data; /**< The data content. */
  25. struct
  26. {
  27. uint8_t low; /**< The low byte of the data content. */
  28. uint8_t high; /**< The high byte of the data content. */
  29. } bytes;
  30. } ushort_union_t;
  31. /**@brief uint32_t type presentation as an union. */
  32. typedef union
  33. {
  34. uint32_t data; /**< The data content as a single variable. */
  35. uint8_t data_bytes[sizeof(uint32_t)]; /**< The data content as a byte array. */
  36. struct
  37. {
  38. // The least significant byte of the uint32_t in this structure is referenced by byte0.
  39. uint8_t byte0; /**< Byte 0 of the data content. */
  40. uint8_t byte1; /**< Byte 1 of the data content. */
  41. uint8_t byte2; /**< Byte 2 of the data content. */
  42. uint8_t byte3; /**< Byte 3 of the data content. */
  43. } bytes;
  44. } ulong_union_t;
  45. #define APP_TIMER_PRESCALER 0 /**< Value of the RTC1 PRESCALER register. */
  46. #endif // DEFINES_H__
  47. /**
  48. *@}
  49. **/