/* param base CMC peripheral base address. param wake true - Flash will exit low power state during the flash memory accesses. false - No effect. param doze true - Flash is disabled while core is sleeping false - No effect. param disable true - Flash memory is placed in low power state. false - No effect.  */
void CMC_ConfigFlashMode(CMC_Type *base, bool wake, bool doze, bool disable)
/* param base CMC peripheral base address. param wake true - Flash will exit low power state during the flash memory accesses. false - No effect. param doze true - Flash is disabled while core is sleeping false - No effect. param disable true - Flash memory is placed in low power state. false - No effect.  */
void CMC_ConfigFlashMode(CMC_Type *base, bool wake, bool doze, bool disable)
{
    uint32_t reg = 0UL;
    reg |= (disable ? CMC_FLASHCR_FLASHDIS(1U) : CMC_FLASHCR_FLASHDIS(0U)) |
           (doze ? CMC_FLASHCR_FLASHDOZE(1U) : CMC_FLASHCR_FLASHDOZE(0U)) |
           (wake ? CMC_FLASHCR_FLASHWAKE(1U) : CMC_FLASHCR_FLASHWAKE(0U));
    base->FLASHCR = reg;
}