Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Search next method
byte TEA5767N::searchNext() {
byte bandLimitReached;
if (isSearchUp()) {
selectFrequency(readFrequencyInMHz() + 0.1);
} else {
selectFrequency(readFrequencyInMHz() - 0.1);
}
//Turns the search on
transmission_data[FIRST_DATA] |= 0b01000000;
transmitData();
while(!isReady()) { }
//Read Band Limit flag
bandLimitReached = isBandLimitReached();
//Loads the new selected frequency
loadFrequency();
//Turns de search off
transmission_data[FIRST_DATA] &= 0b10111111;
transmitData();
return bandLimitReached;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment