-
Notifications
You must be signed in to change notification settings - Fork 274
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
Slight general cleanup, enable dma-macros test, allow using virtual mem2mem channel on c2 #2200
Conversation
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.
If this is just meant to be a clean up PR, LGTM!
embassy_time_driver::time_driver_impl!(static DRIVER: EmbassyTimer = EmbassyTimer { | ||
alarms: Mutex::new([ALARM_STATE_NONE; MAX_SUPPORTED_ALARM_COUNT]), | ||
alarms: Mutex::new([const { AlarmState::new() }; MAX_SUPPORTED_ALARM_COUNT]), |
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.
Ooo fancy
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.
New toys with the 1.79 msrv :)
#[allow(clippy::declare_interior_mutable_const)] | ||
const INIT: AtomicWaker = AtomicWaker::new(); | ||
static WAKERS: [AtomicWaker; NUM_I2C] = [INIT; NUM_I2C]; | ||
const NUM_I2C: usize = 1 + cfg!(i2c1) as usize; |
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 a nice trick, we should do this in more places.
}, | ||
_ => panic!("Only SPI2 and SPI3 supported"), | ||
} | ||
dport |
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 init_channel
function can be removed and this code can be moved to either configure
/configure_for_async
or set_peripheral
.
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 didn't want to modify this code too much lest your PR will probably conflict, but let's see :)
Failure looks like a network error if anything; rebased & retrying merge |
Yeah I've seen this happen a few times before, has always succeeded in a subsequent run in my experience at least. |
dma_macros
for ESP32 and S2