Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c2f83f4

Browse filesBrowse files
committed
Revert "Fix enable Update partition"
This reverts commit 63e1daa5ea67ce0f9b89b789e4bb26672f64d32e.
1 parent 2e5743e commit c2f83f4
Copy full SHA for c2f83f4

File tree

Expand file treeCollapse file tree

2 files changed

+10
-32
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-32
lines changed

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

Copy file name to clipboardExpand all lines: cores/esp32/esp32-hal-uart.c
+9-31Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ static uart_t _uart_bus_array[3] = {
5656
{(volatile uart_dev_t *)(DR_REG_UART2_BASE), 2, NULL}
5757
};
5858
#else
59-
static BaseType_t _pxHigherPriorityTaskWoken_ = pdFALSE;
60-
#define UART_MUTEX_LOCK() do {} while (xSemaphoreTakeFromISR(uart->lock, &_pxHigherPriorityTaskWoken_) != pdPASS)
61-
#define UART_MUTEX_UNLOCK() xSemaphoreGiveFromISR(uart->lock, &_pxHigherPriorityTaskWoken_)
59+
#define UART_MUTEX_LOCK() do {} while (xSemaphoreTake(uart->lock, portMAX_DELAY) != pdPASS)
60+
#define UART_MUTEX_UNLOCK() xSemaphoreGive(uart->lock)
6261

6362
static uart_t _uart_bus_array[3] = {
6463
{(volatile uart_dev_t *)(DR_REG_UART_BASE), NULL, 0, NULL},
@@ -378,10 +377,9 @@ int log_printf(const char *format, ...)
378377
if(s_uart_debug_nr < 0){
379378
return 0;
380379
}
381-
char loc_buf[64];
380+
static char loc_buf[64];
382381
char * temp = loc_buf;
383-
int len, i;
384-
void (* put_char)(char) = NULL;
382+
int len;
385383
va_list arg;
386384
va_list copy;
387385
va_start(arg, format);
@@ -394,37 +392,17 @@ int log_printf(const char *format, ...)
394392
return 0;
395393
}
396394
}
397-
398-
switch(s_uart_debug_nr) {
399-
case 0:
400-
put_char = &uart0_write_char;
401-
break;
402-
case 1:
403-
put_char = &uart1_write_char;
404-
break;
405-
case 2:
406-
put_char = &uart2_write_char;
407-
break;
408-
default:
409-
return 0;
410-
}
411395
vsnprintf(temp, len+1, format, arg);
412396
#if !CONFIG_DISABLE_HAL_LOCKS
413397
if(_uart_bus_array[s_uart_debug_nr].lock){
414-
while (xSemaphoreTakeFromISR(_uart_bus_array[s_uart_debug_nr].lock, &_pxHigherPriorityTaskWoken_) != pdPASS);
415-
for(i=0;i<len;i++){
416-
put_char(temp[i]);
417-
}
418-
xSemaphoreGiveFromISR(_uart_bus_array[s_uart_debug_nr].lock, &_pxHigherPriorityTaskWoken_);
398+
while (xSemaphoreTake(_uart_bus_array[s_uart_debug_nr].lock, portMAX_DELAY) != pdPASS);
399+
ets_printf("%s", temp);
400+
xSemaphoreGive(_uart_bus_array[s_uart_debug_nr].lock);
419401
} else {
420-
for(i=0;i<len;i++){
421-
put_char(temp[i]);
422-
}
402+
ets_printf("%s", temp);
423403
}
424404
#else
425-
for(i=0;i<len;i++){
426-
put_char(temp[i]);
427-
}
405+
ets_printf("%s", temp);
428406
#endif
429407
va_end(arg);
430408
if(len > 64){

‎libraries/Update/src/Updater.cpp

Copy file name to clipboardExpand all lines: libraries/Update/src/Updater.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ bool UpdateClass::_verifyHeader(uint8_t data) {
209209

210210
bool UpdateClass::_verifyEnd() {
211211
if(_command == U_FLASH) {
212-
if(!_enablePartition(_partition) || !_partitionIsBootable(_partition)) {
212+
if(!_enablePartition || !_partitionIsBootable(_partition)) {
213213
_abort(UPDATE_ERROR_READ);
214214
return false;
215215
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.