Skip to content

Commit

Permalink
Update cached firmware version properly
Browse files Browse the repository at this point in the history
  • Loading branch information
renzenicolai committed Jul 7, 2022
1 parent 6213d68 commit 073a70b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rp2040.c
Expand Up @@ -151,7 +151,11 @@ esp_err_t rp2040_init(RP2040* device) {
}

esp_err_t rp2040_get_firmware_version(RP2040* device, uint8_t* version) {
return rp2040_read_reg(device, RP2040_REG_FW_VER, version, 1);
esp_err_t res = rp2040_read_reg(device, RP2040_REG_FW_VER, version, 1);
if (res == ESP_OK) {
device->_fw_version = *version;
}
return res;
}

esp_err_t rp2040_get_bootloader_version(RP2040* device, uint8_t* version) {
Expand Down

0 comments on commit 073a70b

Please sign in to comment.