mirror of https://github.com/ARMmbed/mbed-os.git
commit
7eb97be5a3
|
|
@ -225,23 +225,6 @@ static uint8_t reset_cmd[] = {
|
||||||
0 // parameter length
|
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
|
#define EXPECTED_CONSECUTIVE_RESET 10
|
||||||
|
|
||||||
void test_multiple_reset_command()
|
void test_multiple_reset_command()
|
||||||
|
|
@ -266,7 +249,6 @@ void test_multiple_reset_command()
|
||||||
}
|
}
|
||||||
|
|
||||||
Case cases[] = {
|
Case cases[] = {
|
||||||
Case("Test reset command", test_reset_command),
|
|
||||||
Case("Test multiple reset commands", test_multiple_reset_command)
|
Case("Test multiple reset commands", test_multiple_reset_command)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -206,9 +206,8 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p
|
||||||
pbuf_free(pcur);
|
pbuf_free(pcur);
|
||||||
}
|
}
|
||||||
/* Then, unchain the struct ip_reassdata from the list and free it. */
|
/* Then, unchain the struct ip_reassdata from the list and free it. */
|
||||||
if (prev != NULL) {
|
/* coverity [FORWARD_NULL]*/
|
||||||
ip_reass_dequeue_datagram(ipr, prev);
|
ip_reass_dequeue_datagram(ipr, prev);
|
||||||
}
|
|
||||||
LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
|
LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed);
|
||||||
ip_reass_pbufcount = (u16_t)(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 */
|
/* release the sources allocate for the fragment queue entry */
|
||||||
if (ipr_prev != NULL) {
|
/* coverity [FORWARD_NULL]*/
|
||||||
ip_reass_dequeue_datagram(ipr, ipr_prev);
|
ip_reass_dequeue_datagram(ipr, ipr_prev);
|
||||||
}
|
|
||||||
/* and adjust the number of pbufs currently queued for reassembly. */
|
/* and adjust the number of pbufs currently queued for reassembly. */
|
||||||
clen = pbuf_clen(p);
|
clen = pbuf_clen(p);
|
||||||
LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
|
LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen);
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ public:
|
||||||
* By default, interfaces are in synchronous mode which means that
|
* By default, interfaces are in synchronous mode which means that
|
||||||
* connect() or disconnect() blocks until it reach the target state or requested operation fails.
|
* 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_OK on success
|
||||||
* @return NSAPI_ERROR_UNSUPPORTED if driver does not support asynchronous mode.
|
* @return NSAPI_ERROR_UNSUPPORTED if driver does not support asynchronous mode.
|
||||||
* @return negative error code on failure.
|
* @return negative error code on failure.
|
||||||
|
|
|
||||||
|
|
@ -388,7 +388,7 @@ BlockDevice *_get_blockdevice_FLASHIAP(bd_addr_t start_address, bd_size_t size)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (size == 0) {
|
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);
|
size = (flash_end_address - start_address);
|
||||||
|
|
||||||
static FlashIAPBlockDevice bd(start_address, size);
|
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;
|
bd_addr_t aligned_start_address;
|
||||||
|
|
||||||
static QSPIFBlockDevice bd(
|
static QSPIFBlockDevice bd(
|
||||||
QSPI_FLASH1_IO0,
|
MBED_CONF_QSPIF_QSPI_IO0,
|
||||||
QSPI_FLASH1_IO1,
|
MBED_CONF_QSPIF_QSPI_IO1,
|
||||||
QSPI_FLASH1_IO2,
|
MBED_CONF_QSPIF_QSPI_IO2,
|
||||||
QSPI_FLASH1_IO3,
|
MBED_CONF_QSPIF_QSPI_IO3,
|
||||||
QSPI_FLASH1_SCK,
|
MBED_CONF_QSPIF_QSPI_SCK,
|
||||||
QSPI_FLASH1_CSN,
|
MBED_CONF_QSPIF_QSPI_CSN,
|
||||||
QSPIF_POLARITY_MODE_0,
|
QSPIF_POLARITY_MODE_0,
|
||||||
MBED_CONF_QSPIF_QSPI_FREQ
|
MBED_CONF_QSPIF_QSPI_FREQ
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -614,7 +614,7 @@ int TDBStore::set_finalize(set_handle_t handle)
|
||||||
goto end;
|
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).
|
// 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,
|
ret = read_record(_active_area, ih->bd_base_offset, 0, 0, (uint32_t) -1,
|
||||||
actual_data_size, 0, false, false, false, false,
|
actual_data_size, 0, false, false, false, false,
|
||||||
|
|
@ -1061,7 +1061,7 @@ int TDBStore::init()
|
||||||
// (this will do nothing if already erased)
|
// (this will do nothing if already erased)
|
||||||
if (ret == MBED_ERROR_INVALID_DATA_DETECTED) {
|
if (ret == MBED_ERROR_INVALID_DATA_DETECTED) {
|
||||||
if (check_erase_before_write(area, _master_record_offset, _master_record_size, true)) {
|
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;
|
area_state[area] = TDBSTORE_AREA_STATE_EMPTY;
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -139,8 +139,8 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
|
||||||
|
|
||||||
//Error status should always be < 0
|
//Error status should always be < 0
|
||||||
if (error_status >= 0) {
|
if (error_status >= 0) {
|
||||||
//This is a weird situation, someone called mbed_error with invalid error code.
|
//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, atleast the context will have info on who called it
|
//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;
|
error_status = MBED_ERROR_INVALID_ARGUMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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_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_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_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
|
{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
|
{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
|
{PC_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 1, 0)}, // IN1
|
||||||
|
|
|
||||||
|
|
@ -1314,6 +1314,7 @@
|
||||||
"SPI",
|
"SPI",
|
||||||
"SPISLAVE",
|
"SPISLAVE",
|
||||||
"STDIO_MESSAGES",
|
"STDIO_MESSAGES",
|
||||||
|
"USBDEVICE",
|
||||||
"FLASH"
|
"FLASH"
|
||||||
],
|
],
|
||||||
"release_versions": ["2", "5"],
|
"release_versions": ["2", "5"],
|
||||||
|
|
@ -2824,7 +2825,7 @@
|
||||||
"default_toolchain": "uARM",
|
"default_toolchain": "uARM",
|
||||||
"extra_labels_add": ["STM32F4", "STM32F411xE", "STM32F411RE"],
|
"extra_labels_add": ["STM32F4", "STM32F411xE", "STM32F411RE"],
|
||||||
"supported_toolchains": ["ARM", "uARM", "GCC_ARM"],
|
"supported_toolchains": ["ARM", "uARM", "GCC_ARM"],
|
||||||
"detect_code": ["----"],
|
"detect_code": ["0410"],
|
||||||
"device_has_add": ["MPU"],
|
"device_has_add": ["MPU"],
|
||||||
"device_has_remove": ["SERIAL_FC"],
|
"device_has_remove": ["SERIAL_FC"],
|
||||||
"default_lib": "small",
|
"default_lib": "small",
|
||||||
|
|
@ -8860,15 +8861,11 @@
|
||||||
"PORTINOUT",
|
"PORTINOUT",
|
||||||
"PORTOUT",
|
"PORTOUT",
|
||||||
"PWMOUT",
|
"PWMOUT",
|
||||||
"RTC",
|
|
||||||
"SERIAL",
|
"SERIAL",
|
||||||
"SLEEP",
|
"SLEEP",
|
||||||
"SPI",
|
"SPI",
|
||||||
"SPISLAVE",
|
|
||||||
"SPI_ASYNCH",
|
|
||||||
"I2C",
|
"I2C",
|
||||||
"I2CSLAVE",
|
"I2CSLAVE",
|
||||||
"I2C_ASYNCH",
|
|
||||||
"STDIO_MESSAGES",
|
"STDIO_MESSAGES",
|
||||||
"MPU"
|
"MPU"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue