boot_efuse.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_H_
  13. #define _DRV_EFUSE_H_
  14. #include "osi_compiler.h"
  15. #include "hal_efuse.h"
  16. #include <stdbool.h>
  17. OSI_EXTERN_C_BEGIN
  18. /**
  19. * \brief data type with drv prefix
  20. */
  21. typedef halEfuseReadWriteOp_t drvEfuseReadWriteOp_t;
  22. /**
  23. * \brief read one EFUSE block
  24. *
  25. * \param is_double whether to access with double bit
  26. * \param block_index block index
  27. * \param value read value
  28. * \return
  29. * - true on success
  30. * - false on fail, invalid parameter or not readable
  31. */
  32. bool bootEfuseRead(bool is_double, uint32_t block_index, uint32_t *value);
  33. /**
  34. * \brief multiple efuse block read or write
  35. *
  36. * It will call \p halEfuseReadWrite with multi-thread protection.
  37. *
  38. * \param params read or write parameters
  39. * \param count parameter count
  40. * \return
  41. * - true on success
  42. * - false on fail, invalid parameter, not readable or writable
  43. */
  44. bool bootEfuseReadWrite(drvEfuseReadWriteOp_t *params, uint32_t count);
  45. OSI_EXTERN_C_END
  46. #endif