esp32c3 support

This commit is contained in:
onsdagens 2023-09-27 21:39:35 +02:00 committed by Emil Fresk
parent 3b8d787a91
commit 2b2208e217
27 changed files with 525 additions and 60 deletions

View file

@ -3,7 +3,7 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
For each category, _Added_, _Changed_, _Fixed_ add new entries at the top!
## [Unreleased]
@ -13,6 +13,10 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
### Fixed
## [v1.0.3]
- `portable-atomic` used as a drop in replacement for `core::sync::atomic` in code and macros. `portable-atomic` imported with `default-features = false`, as we do not require CAS.
## [v1.0.2] - 2023-08-29
### Fixed
@ -25,6 +29,6 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
- `make_channel` could be UB
## [v1.0.0] - 2023-05-31 - yanked
## [v1.0.0] - 2023-05-31 - yanked
- Initial release

View file

@ -1,6 +1,6 @@
[package]
name = "rtic-sync"
version = "1.0.2"
version = "1.0.3"
edition = "2021"
authors = [
@ -20,6 +20,7 @@ license = "MIT OR Apache-2.0"
heapless = "0.7"
critical-section = "1"
rtic-common = { version = "1.0.0", path = "../rtic-common" }
portable-atomic = { version = "1", default-features = false }
[dev-dependencies]
tokio = { version = "1", features = ["rt", "macros", "time"] }

View file

@ -27,8 +27,8 @@ use core::cell::UnsafeCell;
use core::future::poll_fn;
use core::ops::{Deref, DerefMut};
use core::pin::Pin;
use core::sync::atomic::{fence, AtomicBool, Ordering};
use core::task::{Poll, Waker};
use portable_atomic::{fence, AtomicBool, Ordering};
use rtic_common::dropper::OnDrop;
use rtic_common::wait_queue::{Link, WaitQueue};

View file

@ -108,7 +108,7 @@ macro_rules! make_channel {
static mut CHANNEL: $crate::channel::Channel<$type, $size> =
$crate::channel::Channel::new();
static CHECK: ::core::sync::atomic::AtomicU8 = ::core::sync::atomic::AtomicU8::new(0);
static CHECK: $crate::portable_atomic::AtomicU8 = $crate::portable_atomic::AtomicU8::new(0);
$crate::channel::critical_section::with(|_| {
if CHECK.load(::core::sync::atomic::Ordering::Relaxed) != 0 {

View file

@ -5,6 +5,7 @@
pub mod arbiter;
pub mod channel;
pub use portable_atomic;
#[cfg(test)]
#[macro_use]