branan / cntrlr Goto Github PK
View Code? Open in Web Editor NEWSimple, async embedded Rust
License: GNU Affero General Public License v3.0
Simple, async embedded Rust
License: GNU Affero General Public License v3.0
For clock rates above 120MHz the MK66FX1M0 has a special "high speed" mode. This mode has a bunch of additional restrictions compared to normal run mode, so supporting it will end up requiring modifications to several bits of logic.
From the datasheet:
Need to add basic CI to enable PR review. It should do more or less this:
rustup install nightly
cargo +nightly install --path cntrlr-build
for BOARD in $(cago +nightly cntrlr build --board=help); do
cargo +nightly cntrlr build --examples --release --board=$BOARD
done
On many boards (and definitely on the Teensies), some peripherals have multiple pins they can be routed to.
Roughly, I think this looks like the following:
type FooPin =
, instead create an enum FooPin...
, with variants for each supported pin.Unsafe impl
the appropriate peripheral pin marker trait for that enum.The current set of examples is pretty minimal. More complex ones that show some real-world usage would be nice to have.
Right now the GPIO/digital pin API is taken pretty much straight from Arduino. It suffices, and it optimizes as well as can be expected. The big issue is that every call needs to lock and then release the pin. this prevents the pin API from optimizing down to direct memory writes.
One option would be to have pin_XX()
functions, just like there is for Serial ports (or perhaps pin<XX>()
). These could return a struct which owns the pin for its entire lifetime, thus avoiding the need to re-lock every use.
Maybe there's space for both types of API? Or something else?
Right now, it's possible to get instances of periphreal access structs for a different MCU than an application was built for. This is a soundness hole, since the memory region the struct points to may be the same as some other memory that Rust is using.
Places where unsafe
is used should have documentation explaining why, and what preconditions they meet/require
Add a way to await for pin state changes (rising/falling edges)
The current hard-coded interrupt tables have two big deficiencies:
WakerSet
s) are always included in the binary. It would be nice to not include ISRs we're not usingBoth of these should be solvable by storing the interrupt table in RAM and having a simple API to specify ISR functions.
Since the allocator
and runtime
modules are both private, there is no access to a function which can set the initial brk value from a user reset vector.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.