Skip to content

Commit 5b31f48

Browse files
ci(pre-commit): Apply automatic fixes
1 parent 6ab941d commit 5b31f48

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

‎cores/esp32/esp32-hal-hosted.c‎

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,18 @@ static sdio_pin_config_t sdio_pin_config ={
4747
#endif
4848
};
4949

50-
staticesp_hosted_coprocessor_fwver_tslave_version_struct={
51-
.major1=0,
52-
.minor1=0,
53-
.patch1=0
54-
};
50+
staticesp_hosted_coprocessor_fwver_tslave_version_struct={.major1=0, .minor1=0, .patch1=0};
5551
staticesp_hosted_coprocessor_fwver_thost_version_struct={
56-
.major1=ESP_HOSTED_VERSION_MAJOR_1,
57-
.minor1=ESP_HOSTED_VERSION_MINOR_1,
58-
.patch1=ESP_HOSTED_VERSION_PATCH_1
52+
.major1=ESP_HOSTED_VERSION_MAJOR_1, .minor1=ESP_HOSTED_VERSION_MINOR_1, .patch1=ESP_HOSTED_VERSION_PATCH_1
5953
};
6054

61-
voidhostedGetHostVersion(uint32_t*major, uint32_t*minor, uint32_t*patch){
55+
voidhostedGetHostVersion(uint32_t*major, uint32_t*minor, uint32_t*patch){
6256
*major=host_version_struct.major1;
6357
*minor=host_version_struct.minor1;
6458
*patch=host_version_struct.patch1;
6559
}
6660

67-
voidhostedGetSlaveVersion(uint32_t*major, uint32_t*minor, uint32_t*patch){
61+
voidhostedGetSlaveVersion(uint32_t*major, uint32_t*minor, uint32_t*patch){
6862
*major=slave_version_struct.major1;
6963
*minor=slave_version_struct.minor1;
7064
*patch=slave_version_struct.patch1;
@@ -73,14 +67,14 @@ void hostedGetSlaveVersion(uint32_t * major, uint32_t * minor, uint32_t * patch)
7367
boolhostedHasUpdate(){
7468
uint32_thost_version=ESP_HOSTED_VERSION_VAL(host_version_struct.major1, host_version_struct.minor1, host_version_struct.patch1);
7569
uint32_tslave_version=0;
76-
70+
7771
esp_err_tret=esp_hosted_get_coprocessor_fwversion(&slave_version_struct);
7872
if (ret!=ESP_OK){
7973
log_e("Could not get slave firmware version: %s", esp_err_to_name(ret));
8074
} else{
8175
slave_version=ESP_HOSTED_VERSION_VAL(slave_version_struct.major1, slave_version_struct.minor1, slave_version_struct.patch1);
8276
}
83-
77+
8478
log_i("Host firmware version: %"PRIu32".%"PRIu32".%"PRIu32, host_version_struct.major1, host_version_struct.minor1, host_version_struct.patch1);
8579
log_i("Slave firmware version: %"PRIu32".%"PRIu32".%"PRIu32, slave_version_struct.major1, slave_version_struct.minor1, slave_version_struct.patch1);
8680

@@ -100,11 +94,13 @@ bool hostedHasUpdate(){
10094
return false;
10195
}
10296

103-
char*hostedGetUpdateURL(){
97+
char*hostedGetUpdateURL(){
10498
// https://espressif.github.io/arduino-esp32/hosted/esp32c6-v1.2.3.bin
10599
staticcharurl[92] ={0};
106-
snprintf(url, 92, "https://espressif.github.io/arduino-esp32/hosted/%s-v%"PRIu32".%"PRIu32".%"PRIu32".bin",
107-
CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET, host_version_struct.major1, host_version_struct.minor1, host_version_struct.patch1);
100+
snprintf(
101+
url, 92, "https://espressif.github.io/arduino-esp32/hosted/%s-v%"PRIu32".%"PRIu32".%"PRIu32".bin", CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET,
102+
host_version_struct.major1, host_version_struct.minor1, host_version_struct.patch1
103+
);
108104
returnurl;
109105
}
110106

@@ -116,7 +112,7 @@ bool hostedBeginUpdate(){
116112
returnerr==ESP_OK;
117113
}
118114

119-
boolhostedWriteUpdate(uint8_t*buf, uint32_tlen){
115+
boolhostedWriteUpdate(uint8_t*buf, uint32_tlen){
120116
esp_err_terr=esp_hosted_slave_ota_write(buf, len);
121117
if (err!=ESP_OK){
122118
log_e("Failed to write Update: %s", esp_err_to_name(err));

‎cores/esp32/esp32-hal-hosted.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ bool hostedIsBLEActive();
4444
boolhostedIsWiFiActive();
4545
boolhostedSetPins(int8_tclk, int8_tcmd, int8_td0, int8_td1, int8_td2, int8_td3, int8_trst);
4646
voidhostedGetPins(int8_t*clk, int8_t*cmd, int8_t*d0, int8_t*d1, int8_t*d2, int8_t*d3, int8_t*rst);
47-
voidhostedGetHostVersion(uint32_t*major, uint32_t*minor, uint32_t*patch);
48-
voidhostedGetSlaveVersion(uint32_t*major, uint32_t*minor, uint32_t*patch);
47+
voidhostedGetHostVersion(uint32_t*major, uint32_t*minor, uint32_t*patch);
48+
voidhostedGetSlaveVersion(uint32_t*major, uint32_t*minor, uint32_t*patch);
4949
boolhostedHasUpdate();
50-
char*hostedGetUpdateURL();
50+
char*hostedGetUpdateURL();
5151
boolhostedBeginUpdate();
52-
boolhostedWriteUpdate(uint8_t*buf, uint32_tlen);
52+
boolhostedWriteUpdate(uint8_t*buf, uint32_tlen);
5353
boolhostedEndUpdate();
5454
boolhostedActivateUpdate();
5555

0 commit comments

Comments
(0)