hal_flash.dox 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. /**
  14. * @defgroup HAL_FLASH Generic NOR Flash Interface
  15. * @brief HAL Generic NOR Flash Driver Interface.
  16. *
  17. * @section flash_1 Driver State Machine
  18. * The flash driver implements a state machine internally, not all the driver
  19. * functionalities can be used in any moment, any transition not explicitly
  20. * shown in the following diagram has to be considered an error and shall
  21. * be captured by an assertion (if enabled).
  22. * @dot
  23. digraph example {
  24. rankdir="LR";
  25. node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.9", height="0.9"];
  26. edge [fontname=Helvetica, fontsize=8];
  27. stop [label="FLS_STOP\nLow Power"];
  28. uninit [label="FLS_UNINIT", style="bold"];
  29. ready [label="FLS_READY\nClock Enabled"];
  30. read [label="FLS_READ\nReading"];
  31. pgm [label="FLS_PGM\nProgramming"];
  32. erase [label="FLS_ERASE\nErasing"];
  33. uninit -> stop [label=" xxxInit()", constraint=false];
  34. stop -> stop [label=" xxxStop()"];
  35. stop -> ready [label=" xxxStart()"];
  36. ready -> stop [label=" xStop()"];
  37. ready -> read [label=" flashRead()\nflashVerifyErase()"];
  38. read -> ready [label=" return"];
  39. ready -> pgm [label=" flashProgram()"];
  40. pgm -> ready [label=" return"];
  41. ready -> erase [label=" \n\nflashEraseAll()\nflashEraseSector()"];
  42. erase -> ready [label=" flashQueryErase()\nFLASH_NO_ERROR\nFLASH_ERROR_*"];
  43. erase -> erase [label=" flashQueryErase()\nflashProgram()\nflashRead()\nFLASH_BUSY_ERASING"];
  44. }
  45. * @enddot
  46. *
  47. * @ingroup HAL_ABSTRACT_PERIPHERALS
  48. */