Revert "Fix enable Update partition"

This reverts commit 63e1daa5ea67ce0f9b89b789e4bb26672f64d32e.
This commit is contained in:
me-no-dev 2017-06-03 20:10:15 +03:00
parent 2e5743eaa1
commit c2f83f48e0
2 changed files with 10 additions and 32 deletions

View File

@ -56,9 +56,8 @@ static uart_t _uart_bus_array[3] = {
{(volatile uart_dev_t *)(DR_REG_UART2_BASE), 2, NULL}
};
#else
static BaseType_t _pxHigherPriorityTaskWoken_ = pdFALSE;
#define UART_MUTEX_LOCK() do {} while (xSemaphoreTakeFromISR(uart->lock, &_pxHigherPriorityTaskWoken_) != pdPASS)
#define UART_MUTEX_UNLOCK() xSemaphoreGiveFromISR(uart->lock, &_pxHigherPriorityTaskWoken_)
#define UART_MUTEX_LOCK() do {} while (xSemaphoreTake(uart->lock, portMAX_DELAY) != pdPASS)
#define UART_MUTEX_UNLOCK() xSemaphoreGive(uart->lock)
static uart_t _uart_bus_array[3] = {
{(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){
return 0;
}
char loc_buf[64];
static char loc_buf[64];
char * temp = loc_buf;
int len, i;
void (* put_char)(char) = NULL;
int len;
va_list arg;
va_list copy;
va_start(arg, format);
@ -394,37 +392,17 @@ int log_printf(const char *format, ...)
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);
#if !CONFIG_DISABLE_HAL_LOCKS
if(_uart_bus_array[s_uart_debug_nr].lock){
while (xSemaphoreTakeFromISR(_uart_bus_array[s_uart_debug_nr].lock, &_pxHigherPriorityTaskWoken_) != pdPASS);
for(i=0;i<len;i++){
put_char(temp[i]);
}
xSemaphoreGiveFromISR(_uart_bus_array[s_uart_debug_nr].lock, &_pxHigherPriorityTaskWoken_);
while (xSemaphoreTake(_uart_bus_array[s_uart_debug_nr].lock, portMAX_DELAY) != pdPASS);
ets_printf("%s", temp);
xSemaphoreGive(_uart_bus_array[s_uart_debug_nr].lock);
} else {
for(i=0;i<len;i++){
put_char(temp[i]);
}
ets_printf("%s", temp);
}
#else
for(i=0;i<len;i++){
put_char(temp[i]);
}
ets_printf("%s", temp);
#endif
va_end(arg);
if(len > 64){

View File

@ -209,7 +209,7 @@ bool UpdateClass::_verifyHeader(uint8_t data) {
bool UpdateClass::_verifyEnd() {
if(_command == U_FLASH) {
if(!_enablePartition(_partition) || !_partitionIsBootable(_partition)) {
if(!_enablePartition || !_partitionIsBootable(_partition)) {
_abort(UPDATE_ERROR_READ);
return false;
}