cpu/sam0_common: flashpage: rename to sam0_flashpage_aux_write()

`flashpage_write_raw()` got renamed to `flashpage_write()`.
Now `sam0_flashpage_aux_write_raw()` is the only remaining 'raw'
function, even though it behaves just like `flashpage_write()`.

So let's also rename that for consistency.
This commit is contained in:
Benjamin Valentin 2020-11-17 00:34:31 +01:00
parent dbfbe2a9e8
commit 2845554b4e
3 changed files with 4 additions and 4 deletions

View File

@ -1145,7 +1145,7 @@ void sam0_flashpage_aux_reset(const nvm_user_page_t *cfg);
* @param data The data to write
* @param len Size of the data
*/
void sam0_flashpage_aux_write_raw(uint32_t offset, const void *data, size_t len);
void sam0_flashpage_aux_write(uint32_t offset, const void *data, size_t len);
/**
* @brief Get pointer to data in the user configuration area.

View File

@ -299,7 +299,7 @@ void flashpage_write(void *target_addr, const void *data, size_t len)
_write_row(target_addr, data, len, NVMCTRL_PAGE_SIZE, _cmd_write_page);
}
void sam0_flashpage_aux_write_raw(uint32_t offset, const void *data, size_t len)
void sam0_flashpage_aux_write(uint32_t offset, const void *data, size_t len)
{
uintptr_t dst = NVMCTRL_USER + sizeof(nvm_user_page_t) + offset;

View File

@ -572,10 +572,10 @@ static int cmd_test_config(int argc, char **argv)
}
/* write test data */
sam0_flashpage_aux_write_raw(dst, test_data, sizeof(test_data));
sam0_flashpage_aux_write(dst, test_data, sizeof(test_data));
/* write single half-word */
sam0_flashpage_aux_write_raw(dst + sizeof(test_data), &single_data, sizeof(single_data));
sam0_flashpage_aux_write(dst + sizeof(test_data), &single_data, sizeof(single_data));
/* check if half-word was written correctly */
uint16_t data_in = *(uint16_t*)sam0_flashpage_aux_get(dst + sizeof(test_data));