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

fixes for STM32 #1011

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions RF24.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,11 @@ bool RF24::startWrite(const void* buf, uint8_t len, const bool multicast)
ce(HIGH);
#if !defined(F_CPU) || F_CPU > 20000000
delayMicroseconds(10);
#endif
#ifdef ARDUINO_ARCH_STM32
if (F_CPU > 20000000) {
delayMicroseconds(10);
}
#endif
ce(LOW);
return !(status & _BV(TX_FULL));
Expand Down
4 changes: 2 additions & 2 deletions examples/scanner/scanner.ino
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void loop(void) {
if (Serial.available()) {
int8_t c = Serial.parseInt();
if (c >= 0) {
c = min(125, max(0, c)); // clamp channel to supported range
c = min((int8_t)125, c); // clamp channel to supported range
constCarrierMode = 1;
radio.stopListening();
delay(2);
Expand Down Expand Up @@ -199,7 +199,7 @@ void loop(void) {
// Print out channel measurements, clamped to a single hex digit
for (int i = 0; i < num_channels; ++i) {
if (values[i])
Serial.print(min(0xf, values[i]), HEX);
Serial.print(min((uint8_t)0xf, values[i]), HEX);
else
Serial.print(F("-"));
}
Expand Down