nrf_ic_info.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
  2. *
  3. * The information contained herein is property of Nordic Semiconductor ASA.
  4. * Terms and conditions of usage are described in detail in NORDIC
  5. * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
  6. *
  7. * Licensees are granted free, non-transferable use of the information. NO
  8. * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
  9. * the file.
  10. *
  11. */
  12. /** @file
  13. *
  14. * @defgroup nrf_ic_info IC information
  15. * @{
  16. * @ingroup app_common
  17. *
  18. * @brief Library for checking IC information (IC revision, RAM size, FLASH size).
  19. *
  20. */
  21. #ifndef NRF51_IC_INFO_H__
  22. #define NRF51_IC_INFO_H__
  23. #include <stdint.h>
  24. /**@brief Enum identifying the IC revision as described in the Compatibility Matrix. */
  25. typedef enum
  26. {
  27. IC_PART_UNKNOWN = 0, /**< IC Revision unknown. */
  28. IC_REVISION_NRF51_REV1, /**< IC Revision 1. */
  29. IC_REVISION_NRF51_REV2, /**< IC Revision 2. */
  30. IC_REVISION_NRF51_REV3, /**< IC Revision 3. */
  31. IC_REVISION_NRF51_UNKNOWN /**< IC Revision unknown. */
  32. } nrf_ic_revision_t;
  33. /**@brief IC information struct containing the IC revision, RAM size, and FLASH size. */
  34. typedef struct
  35. {
  36. nrf_ic_revision_t ic_revision; /**< IC revision. */
  37. uint16_t ram_size; /**< RAM size in kB (16 = 16 kB RAM). */
  38. uint16_t flash_size; /**< FLASH size in kB (256 = 256 kB FLASH). */
  39. } nrf_ic_info_t;
  40. /**@brief Function for returning information about the IC revision, the RAM size, and the FLASH size.
  41. *
  42. * @param[out] p_ic_info Struct containing IC revision, RAM size, and FLASH size.
  43. *
  44. */
  45. void nrf_ic_info_get(nrf_ic_info_t* p_ic_info);
  46. #endif // NRF51_IC_INFO_H__
  47. /** @} */