HAL_HRNG.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /***********************************************************************
  2. * Copyright (c) 2008 - 2016, Shanghai AisinoChip Co.,Ltd .
  3. * All rights reserved.
  4. * Filename : HAL_HRNG.h
  5. * Description : hrng header file
  6. * Author(s) : Eric
  7. * version : V1.0
  8. * Modify date : 2021-03-24
  9. ***********************************************************************/
  10. #ifndef __HAL_HRNG_H__
  11. #define __HAL_HRNG_H__
  12. #include "ACM32Fxx_HAL.h"
  13. /*********************************************************************************
  14. * Function Name : HAL_HRNG_Initial
  15. * Description : intial hrng module
  16. * Input : None
  17. * Output : None
  18. * Return : None
  19. *********************************************************************************/
  20. void HAL_HRNG_Initial(void);
  21. /*********************************************************************************
  22. * Function Name : HAL_HRNG_Source_Disable
  23. * Description : disable hrng source
  24. * Input : None
  25. * Output : None
  26. * Return : None
  27. *********************************************************************************/
  28. void HAL_HRNG_Source_Disable(void);
  29. /*********************************************************************************
  30. * Function Name : HAL_HRNG_GetHrng
  31. * Description : get random number
  32. * Input : byte_len : the byte length of random number
  33. * Output : *hdata : the start address of random number the size must be 16bytes
  34. * Return : 0: hrng data is ok; 1: hrng data is bad
  35. *********************************************************************************/
  36. UINT8 HAL_HRNG_GetHrng(UINT8 *hdata, UINT32 byte_len);
  37. #endif