Comments (3)
How to claim resources without a token?
That's how Mutex.lock
works in v0.4.0; you don't need a token -- the Threshold
token is gone in v0.4.0.
I think I need a way to access a uart resource in the init function
This is not possible. Resource proxies (the struct
s that implement the Mutex
trait) are tied to the stack frame of the task that owns them; they are not Send
, either, so even if you could create one in init
you would not be able to move into any task.
If you need fine-grained locks, i.e. a struct that contains a resource proxy, you'll have to write a generic struct (e.g. struct Foo<R> where R: Mutex<Data = u32> { resource: R, state: State }
and re-instantiate it in every task where you need it.
from rtic.
Thanks, I'll take a look at mutexes. It'll be hard to do initialisation different, though.
from rtic.
I think the original question has been answer. If you have additional questions please open a new issue.
from rtic.
Related Issues (20)
- Higher resolution monotonic timer (on stm32) HOT 9
- rtic migration strategy for eh-1.0 HOT 3
- Local variable coruption in software tasks (async functions) HOT 1
- Monotonics: non-hardcoded tick rate HOT 2
- Clean application shutdown HOT 2
- embedded-hal-bus with rtic v2 in embedded-hal 1.0.0 HOT 14
- timeout_after memory usage HOT 1
- nested lock() can allow access to unlocked resources HOT 5
- `docs.rs` page for `rtic` v2.1.1 is not available
- broken usage example for i2c sharing HOT 2
- Software/Hardware Task interfaction with RTIC v2 HOT 2
- How to invoke code before RTIC main part. HOT 1
- Docs: Examples are broken and not showing HOT 3
- `atomic-polyfill` is deprecated
- rtic_monotonics 2.0 not in crates.io??? HOT 5
- Consider adding a hook to run code at the beginning of the entry point HOT 3
- SPI devices on shared bus (embedded-hal-bus) HOT 3
- Locked Status with Multiple Shared Resources HOT 2
- Software tasks and the stack HOT 2
- Support for embedded_alloc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtic.