nicer (?) parameter names

This commit is contained in:
rusefillc 2022-10-19 10:25:02 -04:00
parent 156d6b37f1
commit 630f943a17
4 changed files with 12 additions and 12 deletions

View File

@ -146,14 +146,14 @@ bool intFlashIsErased(flashaddr_t address, size_t size);
bool intFlashCompare(flashaddr_t address, const char* buffer, size_t size);
/**
* @brief Copy data from the flash memory to a @p buffer.
* @warning The @p buffer must be at least @p size bytes long.
* @param address First address of the flash memory to be copied.
* @param buffer Buffer to copy to.
* @brief Copy data from the flash memory to a @p destination.
* @warning The @p destination must be at least @p size bytes long.
* @param source First address of the flash memory to be copied.
* @param destination Buffer to copy to.
* @param size Size of the data to be copied in bytes.
* @return FLASH_RETURN_SUCCESS if successfully copied.
*/
int intFlashRead(flashaddr_t address, char* buffer, size_t size);
int intFlashRead(flashaddr_t source, char* destination, size_t size);
/**
* @brief Copy data from a @p buffer to the flash memory.

View File

@ -127,8 +127,8 @@ bool intFlashCompare(flashaddr_t address, const char* buffer, size_t size) {
return TRUE;
}
int intFlashRead(flashaddr_t address, char* buffer, size_t size) {
memcpy(buffer, (char*) address, size);
int intFlashRead(flashaddr_t source, char* destination, size_t size) {
memcpy(destination, (char*) source, size);
return FLASH_RETURN_SUCCESS;
}

View File

@ -197,8 +197,8 @@ bool intFlashCompare(flashaddr_t address, const char* buffer, size_t size) {
return TRUE;
}
int intFlashRead(flashaddr_t address, char* buffer, size_t size) {
memcpy(buffer, (char*) address, size);
int intFlashRead(flashaddr_t source, char* destination, size_t size) {
memcpy(destination, (char*) source, size);
return FLASH_RETURN_SUCCESS;
}

View File

@ -263,14 +263,14 @@ bool intFlashCompare(flashaddr_t address, const char* buffer, size_t size) {
return TRUE;
}
int intFlashRead(flashaddr_t address, char* buffer, size_t size) {
int intFlashRead(flashaddr_t source, char* destination, size_t size) {
#if CORTEX_MODEL == 7
// If we have a cache, invalidate the relevant cache lines.
// They may still contain old data, leading us to read invalid data.
SCB_InvalidateDCache_by_Addr((uint32_t*)address, size);
SCB_InvalidateDCache_by_Addr((uint32_t*)source, size);
#endif
memcpy(buffer, (char*) address, size);
memcpy(destination, (char*) source, size);
return FLASH_RETURN_SUCCESS;
}