diff --git a/src/bsps/stm32f429zi_con_rig/interfaces-impl/hwmapping.h b/src/bsps/stm32f429zi_con_rig/interfaces-impl/hwmapping.h index 36935b6af6a4d3345a919f46fd38faf4cc49de50..9db2610b436027a4fcc0e5fcb6cff2b3ad9e6fbd 100644 --- a/src/bsps/stm32f429zi_con_rig/interfaces-impl/hwmapping.h +++ b/src/bsps/stm32f429zi_con_rig/interfaces-impl/hwmapping.h @@ -56,11 +56,6 @@ using arm = Gpio<GPIOE_BASE, 2>; namespace radio { -namespace spi -{ -using namespace miosix::interfaces::spi1; -} - using cs = Gpio<GPIOF_BASE, 6>; using dio0 = Gpio<GPIOB_BASE, 1>; using dio1 = Gpio<GPIOD_BASE, 12>; diff --git a/src/bsps/stm32f767zi_rig_v2/interfaces-impl/hwmapping.h b/src/bsps/stm32f767zi_rig_v2/interfaces-impl/hwmapping.h index 2289f7c446e2cc39e1eab5a122a313b08056de0f..eec700e5ea390da5605a68a491047428ce78d03e 100644 --- a/src/bsps/stm32f767zi_rig_v2/interfaces-impl/hwmapping.h +++ b/src/bsps/stm32f767zi_rig_v2/interfaces-impl/hwmapping.h @@ -161,84 +161,44 @@ namespace sensors // Flavio, why? namespace H3LIS { -namespace spi -{ -using namespace miosix::interfaces::spi4; -} - using cs = Gpio<GPIOB_BASE, 2>; } // namespace H3LIS // Flavio, why? namespace LPS22 { -namespace spi -{ -using namespace miosix::interfaces::spi4; -} - using cs = Gpio<GPIOB_BASE, 11>; } // namespace LPS22 // Flavio, why? namespace LSM6 { -namespace spi -{ -using namespace miosix::interfaces::spi4; -} - using cs = Gpio<GPIOD_BASE, 13>; } // namespace LSM6 // Flavio, why? namespace LIS2MDL { -namespace spi -{ -using namespace miosix::interfaces::spi4; -} - using cs = Gpio<GPIOA_BASE, 4>; } // namespace LIS2MDL namespace ADS131_1 { -namespace spi -{ -using namespace miosix::interfaces::spi1; -} - using cs = Gpio<GPIOC_BASE, 5>; } // namespace ADS131_1 namespace ADS131_2 { -namespace spi -{ -using namespace miosix::interfaces::spi3; -} - using cs = Gpio<GPIOD_BASE, 4>; } // namespace ADS131_2 namespace MAX31856_1 { -namespace spi -{ -using namespace miosix::interfaces::spi3; -} - using cs = Gpio<GPIOG_BASE, 10>; } // namespace MAX31856_1 namespace MAX31856_2 { -namespace spi -{ -using namespace miosix::interfaces::spi1; -} - using cs = Gpio<GPIOD_BASE, 7>; } // namespace MAX31856_2 @@ -246,11 +206,6 @@ using cs = Gpio<GPIOD_BASE, 7>; namespace radio { -namespace spi -{ -using namespace miosix::interfaces::spi6; -} - using cs = Gpio<GPIOB_BASE, 7>; using txEn = Gpio<GPIOG_BASE, 11>; using rxEn = Gpio<GPIOD_BASE, 5>; diff --git a/src/entrypoints/compute-unit-v2-testsuite.cpp b/src/entrypoints/compute-unit-v2-testsuite.cpp index 424240b46e0dc55bd0be96fc1f747fa3b20d78e5..6e2a57b5461504b98a7555de8c12d2d0cfeed70d 100644 --- a/src/entrypoints/compute-unit-v2-testsuite.cpp +++ b/src/entrypoints/compute-unit-v2-testsuite.cpp @@ -286,7 +286,7 @@ void sd_test() size_t result = fwrite(&value, sizeof(value), 1, f); if (result != 1) { - printf("Failed to write word %d\n", i); + printf("Failed to write word %zu\n", i); // We had a problem ok = false; @@ -296,7 +296,10 @@ void sd_test() // Update value with xorshift value = (value << 8) ^ (value >> 8); } + } + if (f != NULL) + { fclose(f); } @@ -320,7 +323,7 @@ void sd_test() size_t result = fread(&actual, sizeof(actual), 1, f); if (result != 1) { - printf("Failed to write word %d\n", i); + printf("Failed to write word %zu\n", i); ok = false; break; } @@ -328,7 +331,7 @@ void sd_test() if (actual != value) { printf( - "Failed to validate word %d, expected: %lu, actual: %lu\n", + "Failed to validate word %zu, expected: %u, actual: %u\n", i, value, actual); ok = false; break; @@ -337,7 +340,10 @@ void sd_test() // Update value with xorshift value = (value << 8) ^ (value >> 8); } + } + if (f != NULL) + { fclose(f); } @@ -516,7 +522,7 @@ void pin_semi_test() for (size_t i = 0; i < PIN_DEFS.size(); i++) { - auto &a = PIN_DEFS[i]; + PinDef &a = PIN_DEFS[i]; // Pause waiting for keys while (getchar() != '\n')