Comments (1)
Would it make sense to have some kind of target
module that collects all these details? This would make it easier to conditionally compile. In that target module, we could define constants. Then in the driver, we could do something like:
#[cfg(target = "nrf52832")]
mod target {
mod spi {
pub const MAX_BYTE_COUNT: usize = 255;
}
}
#[cfg(target = "nrf52840")]
mod target {
mod spi {
pub const MAX_BYTE_COUNT: usize = 65535; // made up number
}
}
// ...
use target::spi::MAX_BYTE_COUNT;
for _ in 0..MAX_BYTE_COUNT { }
from nrf-hal.
Related Issues (20)
- Multisample DMA for SAADC? HOT 2
- `[source]` buttons on docs.rs do not work
- Add PSELRESET abstraction
- Running an MOSI only SPI (setting `sck` to `None`) causes SPI to hang
- `transfer`ing a buffer of a single byte hits SPIM errata, causing 2 bytes to be clocked out
- Order of operations make IĀ²S tx() tricky to use HOT 2
- Add a feature to enable all data to be sent in a non-deferred fashion HOT 1
- LFRC fails to start
- I2C not working on P0_09 and P0_10 HOT 1
- Is there any support for large file?
- nrf52840: missing approtect config
- Support for embedded-hal v1.0 HOT 3
- nrf51 uart write blocks in qemu
- Building example outside of the example folder does not work
- NFC HAL Support HOT 2
- Error of documentation for pwm.rs
- Continued Maintenance of `nrf-rs` crates HOT 33
- Bluetooth plans? HOT 2
- The trait `embedded_hal::delay::DelayNs` is not implemented for `Timer<microbit::nrf52833_pac::TIMER0>` HOT 1
- Missing git tags HOT 1
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 nrf-hal.