Comments (3)
Thanks for the quick response. I implemented the changes to make the registers configurable in #3722.
I hope this is what you had in mind.
from tock.
Indeed your proposed approach would work. Most peripheral drivers in Tock take a reference to their respective register file (StaticRef
), which would all multiple instantiations of the same driver over different hardware instances. This does not seem to be the case for the nRF52 UART driver right now, but we should definitely be open to changing that. Here's an example of what that may look like:
tock/chips/qemu_rv32_virt_chip/src/uart.rs
Lines 222 to 225 in 69f5bf8
Note that the DefaultPeripherals
infrastructure has been explicitly designed such that you can instantiate a custom set of peripherals in your own board definition. Once the UART peripheral has been modified to take a register reference in its constructor, you can instantiate your own such peripheral set in a custom board module, by defining a custom peripherals struct similar to the Nrf52840DefaultPeripherals
. The upstream Nrf52840DefaultPeripherals
is supposed to cover most commonly used peripherals, and peripherals exposed on development boards. Thus we may not want to instantiate multiple UARTs in that particular peripheral set.
from tock.
Since #3722 has been merged I close this issue.
from tock.
Related Issues (20)
- Derive Debug on tock_registers Value HOT 2
- Proposal changes to the ClockInterface trait HOT 9
- Improving Error enum in the Flash HIL HOT 2
- Tracking / RFC: Multiple `Client` traits in HILs HOT 2
- Proposal for improving Scheduler trait
- Add support for ESP32-C6 HOT 2
- [missing-feature] capsule: i2c_master_slave: return xfer length to userspace HOT 2
- Typo in comment in switch_to_user_arm_v7m? HOT 1
- `yield-wait` is setting `*r1` to `1` when it should not be touching app memory HOT 1
- Add `WriteableProcessBuffer::mut_ptr` HOT 1
- `ReadableProcessBuffer` should be sealed or `unsafe trait` HOT 3
- TicKV Fragmentation HOT 4
- kernel: uart: configurable rx buffer sizes at compile time (?) HOT 3
- AppID: Separate checking credentials from assigning identifiers HOT 1
- Add an Asynchronous Process Loader HOT 3
- Tracking: OpenThread Support HOT 13
- Hard code require kernel version in process loading HOT 8
- Shared references of mutable static warnings HOT 8
- Move implementations of kernel configuration tools to capsules
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 tock.