FlashDevice4.c 954 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. *====================================================================*/
  8. /*====================================================================*
  9. *
  10. * signed FlashDevice4 (struct plc * plc, uint32_t options);
  11. *
  12. * plc.h
  13. *
  14. * flash a QCA720 device in PTS mode; force a reset because reset
  15. * is not automatic;
  16. *
  17. * Contributor(s):
  18. * Charles Maier <cmaier@qca.qualcomm.com>
  19. *
  20. *--------------------------------------------------------------------*/
  21. #ifndef FLASHDEVICE4_SOURCE
  22. #define FLASHDEVICE4_SOURCE
  23. #include <string.h>
  24. #include "../plc/plc.h"
  25. #include "../nda/nda.h"
  26. signed FlashDevice4 (struct plc * plc, uint32_t options)
  27. {
  28. if (AccessLevelPTS (plc))
  29. {
  30. return (-1);
  31. }
  32. if (FlashDevice2 (plc, options))
  33. {
  34. return (-1);
  35. }
  36. sleep (PLC_PAUSE);
  37. return (0);
  38. }
  39. #endif