Suspend, resume, and hardware services
Informative
How to suspend and resume a long-running job and reach device-specific services. Binding rules: CHI-MEM-MUST-11 and CHI-MEM-MUST-12 in Mem — Requirements.
Suspend and resume
A long erase or write can be paused so a more urgent access can proceed, then resumed:
Mem_SuspendJob(0u); /* pause the active job on instance 0 (hardware-based) */
/* ... a higher-priority read on another instance, etc. ... */
Mem_ResumeJob(0u); /* continue the paused job */
Both return E_OK / E_NOT_OK. Suspend/resume is hardware-based: where the device does not
support it the service returns E_MEM_SERVICE_NOT_AVAIL (an extension of Std_ReturnType).
Suspending when nothing is suspendable, or resuming when nothing is suspended, is rejected as a
development error (see Errors).
Hardware-specific services
Device features outside the standard read/write/erase set are reached through one dispatcher:
Mem_HwSpecificService(0u, hwServiceId, dataPtr, lengthPtr);
The hwServiceId selects the routine; dataPtr / lengthPtr carry its in/out data. An
unsupported id returns E_MEM_SERVICE_NOT_AVAIL. Use this rather than adding module-specific APIs.