/* Function for write data to the swap state entry action. 
Function for write data to the swap state entry action, which includes writing the current data page to the swap flash page.  */
static void state_write_data_swap_entry_run(void)
/* Function for write data to the swap state entry action. 
Function for write data to the swap state entry action, which includes writing the current data page to the swap flash page.  */
static void state_write_data_swap_entry_run(void)
{
    flash_write((uint32_t *)(PSTORAGE_SWAP_ADDR), 
                (uint32_t *)(m_current_page_id * PSTORAGE_FLASH_PAGE_SIZE), 
                PSTORAGE_FLASH_PAGE_SIZE / sizeof(uint32_t));    
}