-
Notifications
You must be signed in to change notification settings - Fork 134
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
[board] Add basic support for STM32_F32VE board and [driver] ILI9341 via #464 #437
[board] Add basic support for STM32_F32VE board and [driver] ILI9341 via #464 #437
Conversation
// E��((X0��X2) (YD1��YD2)��(YD0��YD2) (X1��X2))��K */ | ||
En = ((sample[0].x - sample[2].x) * (display[1].y - display[2].y)) - | ||
((display[0].y - display[2].y) * (sample[1].x - sample[2].x)); | ||
// F��(Y0(X2YD1��X1YD2)+Y1(X0YD2��X2YD0)+Y2(X1YD0��X0YD1))��K */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Encoding issues…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very strange. I've copied it from another example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welp. Encoding is broken in examples/stm32f4_discovery/open407v-d/gui/touchscreen_calibrator.hpp
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file should be part of the :ui:display
module, so it can be reused by everyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. We just need to fix the encoding somehow.
Nice! Are you sure you want to port all this functionality at once? I would recommend breaking it down into multiple PRs. Things like SD-Card support probably need a little more work since our FatFS implementation needs to be replaced, etc. |
Since I want to experiment with all possible things, maybe I should convert this PR into an issue, and work it from there? |
It's fine, the difference between issue and PR is superficial. I just thought it might be easier to do it bit by bit, but it doesn't really matter that much. |
I have IlI9341 implemented and working. Could submit it when returned from vacation. |
Any updates on this? |
d7f471b
to
f538842
Compare
@mikewolfram I've added ILI9341 support here. Maybe your code could improve my rather crude version? |
78607cd
to
1a22120
Compare
Sorry, had no time to finish it. I opened a draft PR so you can compare: #464. Wanted to improve it to support other interfaces than SPI too. |
1a22120
to
638d3f3
Compare
I've merged #464 here and improved by adding parallel interface to it. |
638d3f3
to
3306ef7
Compare
@salkinium Can you please point me to docs on how to properly add a new board to modm? |
Yes: https://modm.io/reference/module/modm-board/
No, a board is just an lbuild config + module, and gets auto-discovered inside the modm/board folder. |
Ah, you probably mean to the modm CI? Just add the example folder name to the right list here: https://github.com/modm-io/modm/blob/develop/.circleci/config.yml#L131 |
I'll test SD card, NRF24 and CAN support examples later. |
(I misconfigured the CircleCI reporters, but it's fixed on the next push) |
If you are adding all the .pbm files to the repository, it would make sense to make them part of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do the images come from and what licence do they have? If they're compatible I'd like to see them moved into the library for reuse.
I'm going to adapt the ILI9341 driver just a little bit to our coding style. It's easier this way than to review it.
// tft.drawImage(pixPos, pix); | ||
} | ||
|
||
return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is
there
so much
space in this
function?
😜
// E��((X0��X2) (YD1��YD2)��(YD0��YD2) (X1��X2))��K */ | ||
En = ((sample[0].x - sample[2].x) * (display[1].y - display[2].y)) - | ||
((display[0].y - display[2].y) * (sample[1].x - sample[2].x)); | ||
// F��(Y0(X2YD1��X1YD2)+Y1(X0YD2��X2YD0)+Y2(X1YD0��X0YD1))��K */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file should be part of the :ui:display
module, so it can be reused by everyone.
|
@salkinium What is my next step on this PR? Please advise. |
If you are motivated, you could move all But since I'm not super aware of the |
If you're not motivated, that's fine too (your contributions are more important than this optimization), then I'll squash the branch and fix commit structure to match our style. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
I ordered the Board & Display, looking forward to play with it (when it arrives in a few weeks).
Ok, I'll rebase/squash/restructure and adapt for @rleh's review. |
Nice! |
f1e3d42
to
4e59aa3
Compare
Co-authored-by: delphi <cpp.create@gmail.com>
Just restructured logically, and added shared author-ship on IL9341 driver. |
4e59aa3
to
a6f1186
Compare
if (i.releaseMaster()) | ||
Cs::set(); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it really make sense to pass the SPI interface every time? Wouldn't it be better to do like:
struct BatchHandle
{
BatchHandle()
{
SPI::acquireMaster();
Cs::reset();
}
~BatchHandle()
{
if (SPI::releaseMaster())
Cs::set();
}
};
And maybe the name AcquireInterface
is more intuitive to BatchHandle
?
My few cents...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes probably. However the compiler will inline all of this anyways. Feel free to change this if you feel strongly about it.
This PR add support for this board.
board.hpp
actually works (ported fromdisco_f407vg
board)ParallelDisplay
module).