/******************************************************************************* * Function Name : MAL_Read * Description : Read sectors * Input : None * Output : None * Return : Buffer pointer *******************************************************************************/ uint8_t *MAL_Read (uint32_t SectorAddress, uint32_t DataLength) { switch (SectorAddress & MAL_MASK) { case INTERNAL_FLASH_BASE: pMAL_Read = FLASH_If_Read; break; #if defined(USE_STM3210B_EVAL) || defined(USE_STM3210E_EVAL) case SPI_FLASH_BASE: pMAL_Read = SPI_If_Read; break; #endif /* USE_STM3210B_EVAL or USE_STM3210E_EVAL */ #ifdef USE_STM3210E_EVAL case NOR_FLASH_BASE: pMAL_Read = NOR_If_Read; break; #endif /* USE_STM3210E_EVAL */ default: return 0; } return pMAL_Read (SectorAddress, DataLength); }
/******************************************************************************* * Function Name : MAL_Read * Description : Read sectors * Input : None * Output : None * Return : Buffer pointer *******************************************************************************/ uint8_t *MAL_Read (uint32_t SectorAddress, uint32_t DataLength) { switch (SectorAddress & MAL_MASK) { case INTERNAL_FLASH_BASE: pMAL_Read = FLASH_If_Read; break; default: return 0; } return pMAL_Read (SectorAddress, DataLength); }