ax_dl_api.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef _AXDL20DL_API_8ACF31F8_0EEF_4988_B71D_DFFFD8F213F2_H_
  2. #define _AXDL20DL_API_8ACF31F8_0EEF_4988_B71D_DFFFD8F213F2_H_
  3. #include "ax_base_type.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef enum {
  8. AXDL_SUCC = 0x00, /* success */
  9. AXDL_ERR_INVALID_PARAM = 0x01, /* parameter is invalid, such as nil pointer */
  10. AXDL_ERR_NOT_SUPPORT = 0x02, /* feature is not support */
  11. AXDL_ERR_MEM_ALLOC_FAIL = 0x03, /* memory allocate failure */
  12. AXDL_ERR_TIMEOUT = 0x04, /* timeout */
  13. AXDL_ERR_OPEN_FILE_FAIL = 0x05, /* open file failure */
  14. AXDL_ERR_READ_FILE_FAIL = 0x06, /* read file failure */
  15. AXDL_ERR_EMPTY_FILE = 0x07, /* file size is 0 */
  16. AXDL_ERR_AUTH_PAC_FAIL = 0x08, /* authenticate pac file failure */
  17. AXDL_ERR_INVALID_PAC_FILE = 0x09, /* pac file is invalid */
  18. AXDL_ERR_DOWNLOAD_FAIL = 0x0A, /* download firmware failure */
  19. AXDL_ERR_DEVICE_NOT_OPEN = 0x0C, /* device is not open */
  20. AXDL_ERR_PULL_RESET_PIN_FAIL = 0x0D, /* pull reset pin failure */
  21. AXDL_ERR_SETUP_CLK_FAIL = 0x0E, /* setup clk failure */
  22. AXDL_ERR_POWER_ONOFF_FAIL = 0x0F, /* power on or off failure */
  23. AXDL_ERR_CHECK_DEVICE_FAIL = 0x10, /* check device plug or remove status failure */
  24. AXDL_ERR_SCAN_DEVICE_FAIL = 0x11, /* trigger to scan device failure */
  25. AXDL_ERR_BUTT,
  26. } AXDL_ERR_E;
  27. //////////////////////////////////////////////////////////////////////////////////////
  28. /// AX_DL20
  29. ///
  30. /// @brief Download slave firmware (.pac)
  31. ///
  32. /// @param pszPacPath: Specifies the slave firmware (.pac) path to download
  33. /// @param pszDevPath: Specifies the slave device path. If set NULL, "/dev/sdio_host" is replaced.
  34. /// @param bEnterLowPwrMode: AX_TRUE: Control slave to enter low power mode after download.
  35. ///
  36. /// @return 0 if success, otherwise failure
  37. //////////////////////////////////////////////////////////////////////////////////////
  38. AX_S32 AX_DL20(const AX_CHAR *pszPacPath, const AX_CHAR *pszDevPath, AX_BOOL bEnterLowPwrMode);
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif /* _AXDL20DL_API_8ACF31F8_0EEF_4988_B71D_DFFFD8F213F2_H_ */