Merge pull request #11358 from 0xc0170/dev_rollup

Rollup PRs for 5.14
pull/11369/head
Martin Kojtal 2019-08-28 16:39:36 +02:00 committed by GitHub
commit 7eb97be5a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 19 additions and 41 deletions

View File

@ -225,23 +225,6 @@ static uint8_t reset_cmd[] = {
0 // parameter length
};
void test_reset_command()
{
CordioHCIDriver &driver = CordioHCIHook::get_driver();
CordioHCITransportDriver &transport_driver = CordioHCIHook::get_transport_driver();
driver.initialize();
CordioHCIHook::set_data_received_handler(hci_driver_rx_reset_handler);
transport_driver.write(HCI_CMD_TYPE, sizeof(reset_cmd), reset_cmd);
uint32_t events = wait_for_event();
TEST_ASSERT_EQUAL(RESET_RECEIVED_FLAG, events);
driver.terminate();
}
#define EXPECTED_CONSECUTIVE_RESET 10
void test_multiple_reset_command()
@ -266,7 +249,6 @@ void test_multiple_reset_command()
}
Case cases[] = {
Case("Test reset command", test_reset_command),
Case("Test multiple reset commands", test_multiple_reset_command)
};

View File

@ -206,9 +206,8 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p
pbuf_free(pcur);
}
/* Then, unchain the struct ip_reassdata from the list and free it. */
if (prev != NULL) {
ip_reass_dequeue_datagram(ipr, prev);
}
/* coverity [FORWARD_NULL]*/
ip_reass_dequeue_datagram(ipr, prev);
LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed);
@ -662,9 +661,8 @@ ip4_reass(struct pbuf *p)
}
/* release the sources allocate for the fragment queue entry */
if (ipr_prev != NULL) {
ip_reass_dequeue_datagram(ipr, ipr_prev);
}
/* coverity [FORWARD_NULL]*/
ip_reass_dequeue_datagram(ipr, ipr_prev);
/* and adjust the number of pbufs currently queued for reassembly. */
clen = pbuf_clen(p);
LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);

View File

@ -308,7 +308,7 @@ public:
* By default, interfaces are in synchronous mode which means that
* connect() or disconnect() blocks until it reach the target state or requested operation fails.
*
* @param blocking Use true to set NetworkInterface in asynchronous mode.
* @param blocking Use false to set NetworkInterface in asynchronous mode.
* @return NSAPI_ERROR_OK on success
* @return NSAPI_ERROR_UNSUPPORTED if driver does not support asynchronous mode.
* @return negative error code on failure.

View File

@ -388,7 +388,7 @@ BlockDevice *_get_blockdevice_FLASHIAP(bd_addr_t start_address, bd_size_t size)
}
if (size == 0) {
//The block device will have all space form start address to the end of the flash
//The block device will have all space from start address to the end of the flash
size = (flash_end_address - start_address);
static FlashIAPBlockDevice bd(start_address, size);
@ -486,12 +486,12 @@ BlockDevice *_get_blockdevice_QSPIF(bd_addr_t start_address, bd_size_t size)
bd_addr_t aligned_start_address;
static QSPIFBlockDevice bd(
QSPI_FLASH1_IO0,
QSPI_FLASH1_IO1,
QSPI_FLASH1_IO2,
QSPI_FLASH1_IO3,
QSPI_FLASH1_SCK,
QSPI_FLASH1_CSN,
MBED_CONF_QSPIF_QSPI_IO0,
MBED_CONF_QSPIF_QSPI_IO1,
MBED_CONF_QSPIF_QSPI_IO2,
MBED_CONF_QSPIF_QSPI_IO3,
MBED_CONF_QSPIF_QSPI_SCK,
MBED_CONF_QSPIF_QSPI_CSN,
QSPIF_POLARITY_MODE_0,
MBED_CONF_QSPIF_QSPI_FREQ
);

View File

@ -614,7 +614,7 @@ int TDBStore::set_finalize(set_handle_t handle)
goto end;
}
// Writes may fail without returning a failure (specially in flash components). Reread the record
// Writes may fail without returning a failure (especially in flash components). Reread the record
// to ensure write success (this won't read the data anywhere - just use the CRC calculation).
ret = read_record(_active_area, ih->bd_base_offset, 0, 0, (uint32_t) -1,
actual_data_size, 0, false, false, false, false,
@ -1061,7 +1061,7 @@ int TDBStore::init()
// (this will do nothing if already erased)
if (ret == MBED_ERROR_INVALID_DATA_DETECTED) {
if (check_erase_before_write(area, _master_record_offset, _master_record_size, true)) {
MBED_ERROR(MBED_ERROR_READ_FAILED, "TDBSTORE: Unable reset area at init");
MBED_ERROR(MBED_ERROR_READ_FAILED, "TDBSTORE: Unable to reset area at init");
}
area_state[area] = TDBSTORE_AREA_STATE_EMPTY;
continue;

View File

@ -139,8 +139,8 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
//Error status should always be < 0
if (error_status >= 0) {
//This is a weird situation, someone called mbed_error with invalid error code.
//We will still handle the situation but change the error code to ERROR_INVALID_ARGUMENT, atleast the context will have info on who called it
//This is a weird situation, someone called mbed_error with an invalid error code.
//We will still handle the situation but change the error code to ERROR_INVALID_ARGUMENT, at least the context will have info on who called it
error_status = MBED_ERROR_INVALID_ARGUMENT;
}

View File

@ -44,6 +44,7 @@ MBED_WEAK const PinMap PinMap_ADC[] = {
{PA_1, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 6, 0)}, // IN6 - ARDUINO D6
{PA_2, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 7, 0)}, // IN7 // PA_2 is used as SERIAL_TX
{PA_3, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 8, 0)}, // IN8 // PA_3 is used as SERIAL_RX
{PA_6, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 11, 0)}, // IN11
{PA_7, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 12, 0)}, // IN12
{PB_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 15, 0)}, // IN15 - ARDUINO D8
{PC_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 1, 0)}, // IN1

View File

@ -1314,6 +1314,7 @@
"SPI",
"SPISLAVE",
"STDIO_MESSAGES",
"USBDEVICE",
"FLASH"
],
"release_versions": ["2", "5"],
@ -2824,7 +2825,7 @@
"default_toolchain": "uARM",
"extra_labels_add": ["STM32F4", "STM32F411xE", "STM32F411RE"],
"supported_toolchains": ["ARM", "uARM", "GCC_ARM"],
"detect_code": ["----"],
"detect_code": ["0410"],
"device_has_add": ["MPU"],
"device_has_remove": ["SERIAL_FC"],
"default_lib": "small",
@ -8860,15 +8861,11 @@
"PORTINOUT",
"PORTOUT",
"PWMOUT",
"RTC",
"SERIAL",
"SLEEP",
"SPI",
"SPISLAVE",
"SPI_ASYNCH",
"I2C",
"I2CSLAVE",
"I2C_ASYNCH",
"STDIO_MESSAGES",
"MPU"
],