/******************************************************************************* * Function Name : MAL_Write * Description : Write sectors * Input : None * Output : None * Return : None *******************************************************************************/ uint16_t MAL_Write (uint32_t SectorAddress, uint32_t DataLength) { switch (SectorAddress & MAL_MASK) { case INTERNAL_FLASH_BASE: pMAL_Write = FLASH_If_Write; break; #if defined(USE_STM3210B_EVAL) || defined(USE_STM3210E_EVAL) case SPI_FLASH_BASE: pMAL_Write = SPI_If_Write; break; #endif /* USE_STM3210B_EVAL || USE_STM3210E_EVAL */ #ifdef USE_STM3210E_EVAL case NOR_FLASH_BASE: pMAL_Write = NOR_If_Write; break; #endif /* USE_STM3210E_EVAL */ default: return MAL_FAIL; } return pMAL_Write(SectorAddress, DataLength); }
/******************************************************************************* * Function Name : MAL_Write * Description : Write sectors * Input : None * Output : None * Return : None *******************************************************************************/ uint16_t MAL_Write (uint32_t SectorAddress, uint32_t DataLength) { switch (SectorAddress & MAL_MASK) { case INTERNAL_FLASH_BASE: pMAL_Write = FLASH_If_Write; break; default: return MAL_FAIL; } return pMAL_Write(SectorAddress, DataLength); }