diff --git a/eeprom_min.c b/eeprom_min.c --- a/eeprom_min.c +++ b/eeprom_min.c @@ -1,9 +1,11 @@ +#include +/* void Minimal_EEPROM_Unlock(void) { if((FLASH->PECR & FLASH_PECR_PELOCK) != RESET) { - /* Unlocking the Data memory and FLASH_PECR register access*/ + // Unlocking the Data memory and FLASH_PECR register access FLASH->PEKEYR = FLASH_PEKEY1; FLASH->PEKEYR = FLASH_PEKEY2; } @@ -11,7 +13,8 @@ void Minimal_EEPROM_Unlock(void) void Minimal_EEPROM_Lock(void) { - /* Set the PELOCK Bit to lock the data memory and FLASH_PECR register access */ + + // Set the PELOCK Bit to lock the data memory and FLASH_PECR register access FLASH->PECR |= FLASH_PECR_PELOCK; } @@ -41,7 +44,7 @@ FLASH_Status Minimal_FLASH_GetStatus(voi } } } - /* Return the FLASH Status */ + // Return the FLASH Status return FLASHstatus; } @@ -49,10 +52,10 @@ FLASH_Status Minimal_FLASH_WaitForLastOp { __IO FLASH_Status status = FLASH_COMPLETE; - /* Check for the FLASH Status */ + // Check for the FLASH Status status = Minimal_FLASH_GetStatus(); - /* Wait for a FLASH operation to complete or a TIMEOUT to occur */ + // Wait for a FLASH operation to complete or a TIMEOUT to occur while((status == FLASH_BUSY) && (Timeout != 0x00)) { status = Minimal_FLASH_GetStatus(); @@ -63,7 +66,7 @@ FLASH_Status Minimal_FLASH_WaitForLastOp { status = FLASH_TIMEOUT; } - /* Return the operation status */ + // Return the operation status return status; } @@ -84,4 +87,4 @@ void Minimal_EEPROM_ProgramWord(uint32_t // Return the Write Status return status; } - +*/