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

Complete SPI API, added display ILI9341, added spi bme280, updated i2c bme280 #116

Merged
merged 83 commits into from
Nov 30, 2019
Merged

Conversation

enelson1001
Copy link
Contributor

Also added an spi test and an i2c test in test folder but did not update CMakeLists,txt

Copy link
Owner

@PerMalmberg PerMalmberg left a comment

Choose a reason for hiding this comment

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

Nicely done! I've left a few comments for your enoyment :)

I'll try to make some time to look at this in an actual code editor during the weekend and also make sure the the SPI version still works. Any reason you didn't update the top level CMakeList.txt with these added tests?

Updated tag to char*, updated res in read_configuration, read_trimming_parametersand read_measurements to put && on next line.
added additional comments pertaining to heap corruption and dummy byte
Not sure what the best approach for alignas replacement
@enelson1001
Copy link
Contributor Author

enelson1001 commented Nov 9, 2019 via email

@PerMalmberg
Copy link
Owner

I does sound like a good idea. Re. free(), there should be a heap_caps_free or similar for you to use.

I suggest you do it RAII-style, i.e. allocate the buffer in the constructor and deallocate in the destructor so that the user doesn't have to think about memory allocations.

I do wonder how to ensure that the buffer is aligned on a 32-bit boundary since alignas() isn't yet supported. This should be done in the SPI master code (the temporary buffers the text mentions), but I can't see it.

@enelson1001
Copy link
Contributor Author

Not sure why it can't find the file? error: esp32/rom/lldesc.h: No such file or directory

@enelson1001
Copy link
Contributor Author

Not sure why mock-idf can't find the file? error: esp32/rom/lldesc.h: No such file or directory

@PerMalmberg
Copy link
Owner

I think you've misunderstood the purpose of mock-idf. Instead of copying the entire file from esp-idf, only add (mostly)empty implementations of the functions actually being used, with return values that won't cause an application calling them to crash.

The idea is that you should be able to compile your application on Linux and debug parts that are not depending on hardware etc. So I think you can remove 90% of the file as well as the lldesc.h file.

@PerMalmberg
Copy link
Owner

You know that you can run the CI-chain locally, right? No need to push to GitHub for each try.

From the root-folder of Smooth: ./CI/build_test.sh

Requires a Linux environment with docker installed.

Copy link
Contributor Author

@enelson1001 enelson1001 left a comment

Choose a reason for hiding this comment

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

I believe all your questions has been addressed

@PerMalmberg
Copy link
Owner

There's one last small thing - add yourself to the contributors.md file :)

I'll be running a few tests on the I2C parts for the BME280 before merging, unless you already have done that?

@enelson1001
Copy link
Contributor Author

Added my name to contributors but assumed you add the PR # and the rest.

@PerMalmberg PerMalmberg merged commit 279e992 into PerMalmberg:master Nov 30, 2019
PerMalmberg added a commit that referenced this pull request Nov 30, 2019
- Renamed hello_world to starter_example since it clashes with IDF's component name.
- Changed NULL to nullptr.
- Use operator[] instead of at() since there should be no need to do index-checking.
- Use std::for_each instead of indexed loops.
- Updated README.md.
PerMalmberg added a commit that referenced this pull request Dec 18, 2019
* Minor adjustment after merging PR #116.
- Renamed hello_world to starter_example since it clashes with IDF's component name.
- Changed NULL to nullptr.
- Use operator[] instead of at() since there should be no need to do index-checking.
- Use std::for_each instead of indexed loops.
- Updated README.md.

* Size of variable instead of type.

* Use constant to ensure same length of arrays.
Use operator[] instead of at().

* Removed comment that does not apply.
Use constant.
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.

2 participants