Revert "Fix enable Update partition"
This reverts commit 63e1daa5ea67ce0f9b89b789e4bb26672f64d32e.
This commit is contained in:
parent
2e5743eaa1
commit
c2f83f48e0
@ -56,9 +56,8 @@ static uart_t _uart_bus_array[3] = {
|
|||||||
{(volatile uart_dev_t *)(DR_REG_UART2_BASE), 2, NULL}
|
{(volatile uart_dev_t *)(DR_REG_UART2_BASE), 2, NULL}
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
static BaseType_t _pxHigherPriorityTaskWoken_ = pdFALSE;
|
#define UART_MUTEX_LOCK() do {} while (xSemaphoreTake(uart->lock, portMAX_DELAY) != pdPASS)
|
||||||
#define UART_MUTEX_LOCK() do {} while (xSemaphoreTakeFromISR(uart->lock, &_pxHigherPriorityTaskWoken_) != pdPASS)
|
#define UART_MUTEX_UNLOCK() xSemaphoreGive(uart->lock)
|
||||||
#define UART_MUTEX_UNLOCK() xSemaphoreGiveFromISR(uart->lock, &_pxHigherPriorityTaskWoken_)
|
|
||||||
|
|
||||||
static uart_t _uart_bus_array[3] = {
|
static uart_t _uart_bus_array[3] = {
|
||||||
{(volatile uart_dev_t *)(DR_REG_UART_BASE), NULL, 0, NULL},
|
{(volatile uart_dev_t *)(DR_REG_UART_BASE), NULL, 0, NULL},
|
||||||
@ -378,10 +377,9 @@ int log_printf(const char *format, ...)
|
|||||||
if(s_uart_debug_nr < 0){
|
if(s_uart_debug_nr < 0){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
char loc_buf[64];
|
static char loc_buf[64];
|
||||||
char * temp = loc_buf;
|
char * temp = loc_buf;
|
||||||
int len, i;
|
int len;
|
||||||
void (* put_char)(char) = NULL;
|
|
||||||
va_list arg;
|
va_list arg;
|
||||||
va_list copy;
|
va_list copy;
|
||||||
va_start(arg, format);
|
va_start(arg, format);
|
||||||
@ -394,37 +392,17 @@ int log_printf(const char *format, ...)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(s_uart_debug_nr) {
|
|
||||||
case 0:
|
|
||||||
put_char = &uart0_write_char;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
put_char = &uart1_write_char;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
put_char = &uart2_write_char;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
vsnprintf(temp, len+1, format, arg);
|
vsnprintf(temp, len+1, format, arg);
|
||||||
#if !CONFIG_DISABLE_HAL_LOCKS
|
#if !CONFIG_DISABLE_HAL_LOCKS
|
||||||
if(_uart_bus_array[s_uart_debug_nr].lock){
|
if(_uart_bus_array[s_uart_debug_nr].lock){
|
||||||
while (xSemaphoreTakeFromISR(_uart_bus_array[s_uart_debug_nr].lock, &_pxHigherPriorityTaskWoken_) != pdPASS);
|
while (xSemaphoreTake(_uart_bus_array[s_uart_debug_nr].lock, portMAX_DELAY) != pdPASS);
|
||||||
for(i=0;i<len;i++){
|
ets_printf("%s", temp);
|
||||||
put_char(temp[i]);
|
xSemaphoreGive(_uart_bus_array[s_uart_debug_nr].lock);
|
||||||
}
|
|
||||||
xSemaphoreGiveFromISR(_uart_bus_array[s_uart_debug_nr].lock, &_pxHigherPriorityTaskWoken_);
|
|
||||||
} else {
|
} else {
|
||||||
for(i=0;i<len;i++){
|
ets_printf("%s", temp);
|
||||||
put_char(temp[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
for(i=0;i<len;i++){
|
ets_printf("%s", temp);
|
||||||
put_char(temp[i]);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
if(len > 64){
|
if(len > 64){
|
||||||
|
@ -209,7 +209,7 @@ bool UpdateClass::_verifyHeader(uint8_t data) {
|
|||||||
|
|
||||||
bool UpdateClass::_verifyEnd() {
|
bool UpdateClass::_verifyEnd() {
|
||||||
if(_command == U_FLASH) {
|
if(_command == U_FLASH) {
|
||||||
if(!_enablePartition(_partition) || !_partitionIsBootable(_partition)) {
|
if(!_enablePartition || !_partitionIsBootable(_partition)) {
|
||||||
_abort(UPDATE_ERROR_READ);
|
_abort(UPDATE_ERROR_READ);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user