drv_efuse_pmic.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _DRV_EFUSE_PMIC_H_
  13. #define _DRV_EFUSE_PMIC_H_
  14. #include <stdint.h>
  15. #include <stdbool.h>
  16. #include <stddef.h>
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. /**
  21. * @breif EFuse open operation
  22. * Power on effuse; Open efuse clk;
  23. */
  24. void drvEfusePmicOpen(void);
  25. /**
  26. * @breif EFuse close operation
  27. * Power off effuse; Disbale efuse clk;
  28. */
  29. void drvEfusePmicClose(void);
  30. /**
  31. * breif Read data from the selected efuse block
  32. * @block_id id number of the selected bllock
  33. * @des_data_ptr : the pointer of data reading from the selected block
  34. * @return
  35. * - non-zero fail to read data
  36. * - 0 successful to read data
  37. */
  38. uint32_t drvEfusePmicRead(uint32_t block_id, uint32_t *des_data_ptr);
  39. /**
  40. * breif Write data to the selected efuse block
  41. * @block_id Id number of the selected bllock
  42. * @write_data The pointer of data that is to be written
  43. * @return
  44. * - non-zero fail to write data
  45. * - 0 successful to write data
  46. */
  47. uint32_t drvEfusePmicWrite(uint32_t block_id, uint32_t write_data);
  48. /**
  49. * breif Read IMEI from the uix2720 efuse blocks.
  50. * @des_data_ptr the pointer of data reading from the selected block
  51. * @bit_num number of bit
  52. * @return
  53. * - non-zero fail to read imei
  54. * - 0 successful to read imei
  55. */
  56. uint32_t drvEfuseReadImei(uint8_t *des_data_ptr, uint32_t bit_num);
  57. /**
  58. * breif Write IMEI to the uix2720 efuse blocks.
  59. * @src_dat_ptr the pointer of data that is to be written
  60. * @bit_num number of bit
  61. * @return
  62. * - non-zero fail to write imei
  63. * - 0 successful to write imei
  64. */
  65. uint32_t drvEfuseWriteImei(uint8_t *src_dat_ptr, uint32_t bit_num);
  66. #ifdef __cplusplus
  67. }
  68. #endif
  69. #endif /*_DRV_EFUSE_PMIC_H_ */