Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ (drivers): Add CoreSPI #423

Merged
merged 4 commits into from
Jan 24, 2022
Merged

✨ (drivers): Add CoreSPI #423

merged 4 commits into from
Jan 24, 2022

Conversation

HPezz
Copy link
Contributor

@HPezz HPezz commented Jan 19, 2022

No description provided.

@ladislas ladislas linked an issue Jan 19, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jan 19, 2022

Codecov Report

Merging #423 (c72f604) into develop (64a05cc) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop      #423   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           67        70    +3     
  Lines         1211      1215    +4     
=========================================
+ Hits          1211      1215    +4     
Impacted Files Coverage Δ
drivers/CoreSPI/include/CoreSPI.h 100.00% <100.00%> (ø)
drivers/CoreSPI/source/CoreSPI.cpp 100.00% <100.00%> (ø)
include/interface/drivers/SPI.h 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 64a05cc...c72f604. Read the comment docs.

@github-actions
Copy link

github-actions bot commented Jan 19, 2022

File comparision analysis report

🔖 Info

  • Flash: 2 097 152 Bytes (2048 KiB) / SRAM: 524 288 Bytes (512 KiB)
  • base: develop / 64a05cc + mbed-os-6.15.1 + -std=c++20
  • head: hugo/feature/add-core-spi / c72f604 + mbed-os-6.15.1 + -std=c++20
  • toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 - 10.3.1 20210824
  • enable_log_debug: OFF

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 58328 (2%) ø 11400 (2%) ø
bootloader ✔️ 95008 (4%) ø 26792 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 234668 (11%) ø 30056 (5%) ø
certs_emc_ble_led_motors ✔️ 174568 (8%) ø 24952 (4%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 148840 (7%) ø 22528 (4%) ø
certs_emc_lcd_led_motors ✔️ 91928 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 177960 (8%) ø 24360 (4%) ø
spike_lk_ble ✔️ 162616 (7%) ø 22792 (4%) ø
spike_lk_bluetooth ✔️ 73256 (3%) ø 11448 (2%) ø
spike_lk_cg_animations ✔️ 141064 (6%) ø 24464 (4%) ø
spike_lk_file_manager ✔️ 102036 (4%) ø 13672 (2%) ø
spike_lk_file_reception ✔️ 328916 (15%) ø 19312 (3%) ø
spike_lk_flash_memory ✔️ 63880 (3%) ø 11448 (2%) ø
spike_lk_lcd ✔️ 136928 (6%) ø 24016 (4%) ø
spike_lk_led ✔️ 65744 (3%) ø 13392 (2%) ø
spike_lk_log_kit ✔️ 68528 (3%) ø 11912 (2%) ø
spike_lk_motors ✔️ 62528 (2%) ø 11488 (2%) ø
spike_lk_rfid ✔️ 73072 (3%) ø 11448 (2%) ø
spike_lk_sensors_battery ✔️ 63064 (3%) ø 11984 (2%) ø
spike_lk_sensors_light ✔️ 60056 (2%) ø 11440 (2%) ø
spike_lk_sensors_microphone ✔️ 72496 (3%) ø 11504 (2%) ø
spike_lk_sensors_temperature_humidity ✔️ 66968 (3%) ø 11424 (2%) ø
spike_lk_sensors_touch ✔️ 68600 (3%) ø 11432 (2%) ø
spike_lk_update_process_app_base ✔️ 121348 (5%) ø 15288 (2%) ø
spike_lk_update_process_app_update ✔️ 77632 (3%) ø 12352 (2%) ø
spike_lk_wifi ✔️ 116392 (5%) ø 14808 (2%) ø
spike_mbed_blinky ✔️ 57968 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 63208 (3%) ø 12448 (2%) ø
spike_stl_cxxsupport ✔️ 58456 (2%) ø 11400 (2%) ø

🗺️ Map files diff output

Click to show diff list

No differenes where found in map files.

@github-actions
Copy link

github-actions bot commented Jan 19, 2022

File comparision analysis report

🔖 Info

  • Flash: 2 097 152 Bytes (2048 KiB) / SRAM: 524 288 Bytes (512 KiB)
  • base: develop / 64a05cc + mbed-os-6.15.1 + -std=c++20
  • head: hugo/feature/add-core-spi / c72f604 + mbed-os-6.15.1 + -std=c++20
  • toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 - 10.3.1 20210824
  • enable_log_debug: ON

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 82200 (3%) ø 17472 (3%) ø
bootloader ✔️ 95008 (4%) ø 26792 (5%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 251644 (11%) ø 36144 (6%) ø
certs_emc_ble_led_motors ✔️ 191600 (9%) ø 30976 (5%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 165248 (7%) ø 28680 (5%) ø
certs_emc_lcd_led_motors ✔️ 91928 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 194032 (9%) ø 30384 (5%) ø
spike_lk_ble ✔️ 183688 (8%) ø 28856 (5%) ø
spike_lk_bluetooth ✔️ 91192 (4%) ø 17472 (3%) ø
spike_lk_cg_animations ✔️ 149336 (7%) ø 30464 (5%) ø
spike_lk_file_manager ✔️ 125884 (6%) ø 19984 (3%) ø
spike_lk_file_reception ✔️ 333692 (15%) ø 25272 (4%) ø
spike_lk_flash_memory ✔️ 87352 (4%) ø 17512 (3%) ø
spike_lk_lcd ✔️ 149808 (7%) ø 30088 (5%) ø
spike_lk_led ✔️ 88808 (4%) ø 19400 (3%) ø
spike_lk_log_kit ✔️ 92000 (4%) ø 18168 (3%) ø
spike_lk_motors ✔️ 86576 (4%) ø 17552 (3%) ø
spike_lk_rfid ✔️ 91008 (4%) ø 17472 (3%) ø
spike_lk_sensors_battery ✔️ 86736 (4%) ø 18056 (3%) ø
spike_lk_sensors_light ✔️ 84584 (4%) ø 17512 (3%) ø
spike_lk_sensors_microphone ✔️ 85336 (4%) ø 17512 (3%) ø
spike_lk_sensors_temperature_humidity ✔️ 90896 (4%) ø 17496 (3%) ø
spike_lk_sensors_touch ✔️ 92248 (4%) ø 17632 (3%) ø
spike_lk_update_process_app_base ✔️ 143764 (6%) ø 21352 (4%) ø
spike_lk_update_process_app_update ✔️ 100968 (4%) ø 18472 (3%) ø
spike_lk_wifi ✔️ 131280 (6%) ø 20832 (3%) ø
spike_mbed_blinky ✔️ 57968 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 84688 (4%) ø 18448 (3%) ø
spike_stl_cxxsupport ✔️ 84000 (4%) ø 17536 (3%) ø

🗺️ Map files diff output

Click to show diff list

No differenes where found in map files.

@github-actions
Copy link

File comparision analysis report

🔖 Info

  • Flash: 2 097 152 Bytes (2048 KiB) / SRAM: 524 288 Bytes (512 KiB)
  • base: develop / 14b9d50 + mbed-os-6.15.1 + -std=c++20
  • head: hugo/feature/add-core-spi / e3e3d2b + mbed-os-6.15.1 + -std=c++20
  • toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 - 10.3.1 20210824
  • enable_log_debug: ON

📝 Summary

Click to show summary
  • ✔️ - existing target
  • ✨ - new target
  • ⚰️ - deleted target
  • ✅ - files are the same
  • ❌ - files are different
Target Status .bin .map Total Flash (base/head) Total Flash Δ Static RAM (base/head) Static RAM Δ
LekaOS ✔️ 82200 (3%) ø 17472 (3%) ø
bootloader ✔️ 95024 (4%) ø 26200 (4%) ø
certs_emc_ble_bt_lcd_led_motors ✔️ 251132 (11%) ø 36144 (6%) ø
certs_emc_ble_led_motors ✔️ 191600 (9%) ø 30976 (5%) ø
certs_emc_bt_lcd_qspi_rfid_touch_wifi ✔️ 165248 (7%) ø 28680 (5%) ø
certs_emc_lcd_led_motors ✔️ 91928 (4%) ø 16168 (3%) ø
hardware_motors_test_reduction_and_wheels ✔️ 194032 (9%) ø 30384 (5%) ø
spike_lk_ble ✔️ 183688 (8%) ø 28856 (5%) ø
spike_lk_bluetooth ✔️ 91192 (4%) ø 17472 (3%) ø
spike_lk_cg_animations ✔️ 149336 (7%) ø 30464 (5%) ø
spike_lk_file_manager ✔️ 132396 (6%) ø 19912 (3%) ø
spike_lk_file_reception ✔️ 333692 (15%) ø 25272 (4%) ø
spike_lk_flash_memory ✔️ 87352 (4%) ø 17512 (3%) ø
spike_lk_lcd ✔️ 149808 (7%) ø 30088 (5%) ø
spike_lk_led ✔️ 88808 (4%) ø 19400 (3%) ø
spike_lk_log_kit ✔️ 92000 (4%) ø 18168 (3%) ø
spike_lk_motors ✔️ 86576 (4%) ø 17552 (3%) ø
spike_lk_rfid ✔️ 91008 (4%) ø 17472 (3%) ø
spike_lk_sensors_battery ✔️ 85088 (4%) ø 17512 (3%) ø
spike_lk_sensors_light ✔️ 84584 (4%) ø 17512 (3%) ø
spike_lk_sensors_microphone ✔️ 85516 (4%) ø 17512 (3%) ø
spike_lk_sensors_temperature_humidity ✔️ 90896 (4%) ø 17496 (3%) ø
spike_lk_sensors_touch ✔️ 92248 (4%) ø 17632 (3%) ø
spike_lk_update_process_app_base ✔️ 144052 (6%) ø 21352 (4%) ø
spike_lk_update_process_app_update ✔️ 101120 (4%) ø 18472 (3%) ø
spike_lk_wifi ✔️ 131280 (6%) ø 20832 (3%) ø
spike_mbed_blinky ✔️ 57968 (2%) ø 11400 (2%) ø
spike_mbed_watchdog_ticker_vs_thread ✔️ 84688 (4%) ø 18448 (3%) ø
spike_stl_cxxsupport ✔️ 84000 (4%) ø 17536 (3%) ø

🗺️ Map files diff output

Click to show diff list

No differenes where found in map files.

Copy link
Member

@ladislas ladislas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good first PR! 👍

quelques trucs à faire:

  • revoir les suggestions et les intérgrer
  • supprimer le dossier CoreLED et toutes les références
  • il y a un mocks/leka/SPI.h vide qui traine
  • changer tous les 2021 en 2022

drivers/CoreLED/CMakeLists.txt Outdated Show resolved Hide resolved
drivers/CoreLED/CMakeLists.txt Outdated Show resolved Hide resolved
drivers/CoreSPI/CMakeLists.txt Outdated Show resolved Hide resolved
drivers/CoreSPI/include/CoreSPI.h Outdated Show resolved Hide resolved
drivers/CoreSPI/include/CoreSPI.h Show resolved Hide resolved
tests/unit/stubs/stubs/mbed/SPI.h Outdated Show resolved Hide resolved
tests/unit/stubs/stubs/mbed/source/SPI.cpp Outdated Show resolved Hide resolved
drivers/CoreSPI/CMakeLists.txt Outdated Show resolved Hide resolved
drivers/CoreSPI/source/CoreSPI.cpp Outdated Show resolved Hide resolved
drivers/CoreSPI/tests/CoreSPI_test.cpp Outdated Show resolved Hide resolved
@HPezz HPezz force-pushed the hugo/feature/add-core-spi branch 2 times, most recently from 783f5c8 to 8c8ce8e Compare January 21, 2022 10:13
@ladislas ladislas force-pushed the hugo/feature/add-core-spi branch 2 times, most recently from f8e301c to dbb97df Compare January 22, 2022 22:41
@ladislas ladislas self-requested a review January 23, 2022 14:06
Copy link
Member

@ladislas ladislas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Member

@YannLocatelli YannLocatelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modulo la question à propos de override et la suggestion d'initialisation dans les tests, c'est tout bon pour moi 👍

drivers/CoreSPI/include/CoreSPI.h Outdated Show resolved Hide resolved

TEST_F(CoreSPITests, writeOneByte)
{
expected_written_values = {0x01};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je recommande plutôt de le créer ici plutôt que dans la classe un peu plus haut

Suggested change
expected_written_values = {0x01};
auto expected_written_values = std::vector<uint8_t> {0x01};

Ca prend pas plus de place et c'est plus lisible d'une part quand on lit l'entête des classe et pour identifier rapidement quel type on envoie en test

drivers/CoreSPI/tests/CoreSPI_test.cpp Outdated Show resolved Hide resolved
HPezz and others added 4 commits January 24, 2022 11:57
Co-authored-by: Ladislas de Toldi <ladislas@detoldi.me>
Co-authored-by: Ladislas de Toldi <ladislas@detoldi.me>
Co-authored-by: Ladislas de Toldi <ladislas@detoldi.me>
Co-authored-by: Ladislas de Toldi <ladislas@detoldi.me>
@sonarcloud
Copy link

sonarcloud bot commented Jan 24, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@ladislas ladislas merged commit c2fb781 into develop Jan 24, 2022
@ladislas ladislas deleted the hugo/feature/add-core-spi branch January 24, 2022 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create CoreSPI driver
3 participants