-
Notifications
You must be signed in to change notification settings - Fork 55
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
RA8875::_initializeFT5206(void) Loop problems? #127
Comments
What happens if you try something like this?
for (i=0;i<=9;i++)
_sendRegFT5206(0x80+i,_FT5206REgisters[i]);
Tom
From: GremlinsInGame [mailto:[email protected]]
Sent: Wednesday, October 04, 2017 9:39 PM
To: sumotoy/RA8875
Cc: Subscribed
Subject: [sumotoy/RA8875] RA8875::_initializeFT5206(void) Loop problems? (#127)
void RA8875::_initializeFT5206(void)
{
uint8_t i;
for (i=0x80;i<=0x89;i++){
_sendRegFT5206(i,_FT5206REgisters[i-0x80]);
}
_sendRegFT5206(0x00,0x00);//Device Mode
}
Gives Warnings:
RA8875.cpp: In member function void RA8875::_initializeFT5206()
RA8875.cpp: 5265:43: warning: iteration 9u invokes undefined behavior [-Waggressive-loop-optimizations]
_sendRegFT5206(i,_FT5206REgisters[i-0x80])
RA8875.cpp:5264: note containing loop
for (i=0x80;i<=0x89;i++){
Could this be a problem? And how to solve?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#127> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AQZWzKbkfr8EjPnwcTTKP55adMwKyryaks5spF1JgaJpZM4PujTS> .Image removed by sender.
|
Thank you for the input. I adjusted my code based on your suggestion and then Also, |
Hi GremlinsInGame, what are the new values that you are using? I did look in the datasheet but wasn't sure what to replace these values with. |
The Values I am using now are:
You can find the Default Values and descriptions of the Registers starting on Page 34 of this datasheet. I think the Defaults for the FT5206 are (In Decimal) |
Thank you! |
Gives Warnings:
RA8875.cpp: In member function void RA8875::_initializeFT5206()
RA8875.cpp: 5265:43: warning: iteration 9u invokes undefined behavior [-Waggressive-loop-optimizations]
_sendRegFT5206(i,_FT5206REgisters[i-0x80])
RA8875.cpp:5264: note containing loop
for (i=0x80;i<=0x89;i++){
Could this be a problem? And how to solve?
The text was updated successfully, but these errors were encountered: