diff options
author | Joey Castillo <joeycastillo@utexas.edu> | 2022-05-10 09:50:44 -0400 |
---|---|---|
committer | Joey Castillo <joeycastillo@utexas.edu> | 2022-05-10 09:50:44 -0400 |
commit | ed526355f69a931d51a6ebff1b45c70988e7b255 (patch) | |
tree | 44f33f8ab860b48f826cae0f99e4f59c8d8fc550 | |
parent | 3a9dd0df085292871ff9b124475ac1cfa3846301 (diff) | |
download | Sensor-Watch-ed526355f69a931d51a6ebff1b45c70988e7b255.tar.gz Sensor-Watch-ed526355f69a931d51a6ebff1b45c70988e7b255.tar.bz2 Sensor-Watch-ed526355f69a931d51a6ebff1b45c70988e7b255.zip |
fix spaces / tabs
-rw-r--r-- | watch-library/hardware/watch/watch_storage.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/watch-library/hardware/watch/watch_storage.c b/watch-library/hardware/watch/watch_storage.c index 0cd04483..6c87be53 100644 --- a/watch-library/hardware/watch/watch_storage.c +++ b/watch-library/hardware/watch/watch_storage.c @@ -53,21 +53,21 @@ bool watch_storage_write(uint32_t row, uint32_t offset, const uint8_t *buffer, u watch_storage_sync(); - uint32_t nvm_address = address / 2; - uint16_t i, data; + uint32_t nvm_address = address / 2; + uint16_t i, data; - hri_nvmctrl_write_CTRLA_reg(NVMCTRL, NVMCTRL_CTRLA_CMD_PBC | NVMCTRL_CTRLA_CMDEX_KEY); + hri_nvmctrl_write_CTRLA_reg(NVMCTRL, NVMCTRL_CTRLA_CMD_PBC | NVMCTRL_CTRLA_CMDEX_KEY); watch_storage_sync(); - for (i = 0; i < size; i += 2) { - data = buffer[i]; - if (i < NVMCTRL_PAGE_SIZE - 1) { - data |= (buffer[i + 1] << 8); - } - NVM_MEMORY[nvm_address++] = data; - } - hri_nvmctrl_write_ADDR_reg(NVMCTRL, address / 2); - hri_nvmctrl_write_CTRLA_reg(NVMCTRL, NVMCTRL_CTRLA_CMD_RWWEEWP | NVMCTRL_CTRLA_CMDEX_KEY); + for (i = 0; i < size; i += 2) { + data = buffer[i]; + if (i < NVMCTRL_PAGE_SIZE - 1) { + data |= (buffer[i + 1] << 8); + } + NVM_MEMORY[nvm_address++] = data; + } + hri_nvmctrl_write_ADDR_reg(NVMCTRL, address / 2); + hri_nvmctrl_write_CTRLA_reg(NVMCTRL, NVMCTRL_CTRLA_CMD_RWWEEWP | NVMCTRL_CTRLA_CMDEX_KEY); return true; } |