Comments (5)
@Dominaezzz I'm (ab)using it to drive a 64x64 HUB75 LED matrix. This uses 14 pins and I waste 2 pins because they are not optional. See the example I have in this draft PR.
from esp-hal.
I think we had something similar regarding I2S on Matrix and this worked there:
i2s_tx: esp_hal::i2s::I2sTx<'a, esp_hal::peripherals::I2S0, esp_hal::dma::Channel0,esp_hal::Async >,
from esp-hal.
The generics on that type could really use some simplifying, like what was done for PARL_IO.
A little unrelated to this issue @liebman, can I ask what hardware your talking to with the I8080 driver? (I've been trying to find 16 bit screens to test the driver)
from esp-hal.
@bjoernQ that works! Thanks. Now what I really want is this to be static so I can start the next transaction from the send done interrupt:
static MY_I8080: Mutex<
RefCell<
Option<
I8080<
ChannelTx<ChannelTxImpl<0>, Channel0>,
TxSixteenBits<
GpioPin<14>,
GpioPin<46>,
GpioPin<13>,
GpioPin<9>,
GpioPin<3>,
GpioPin<10>,
GpioPin<12>,
GpioPin<11>,
GpioPin<6>,
GpioPin<7>,
GpioPin<38>,
GpioPin<42>,
GpioPin<48>,
GpioPin<47>,
GpioPin<2>,
GpioPin<21>,
>,
>,
>,
>,
> = Mutex::new(RefCell::new(None));
But this yields:
error[E0277]: `*mut DmaDescriptor` cannot be sent between threads safely
--> board-tests/src/bin/i8080-static.rs:44:18
|
44 | static MY_I8080: Mutex<
| __________________^
45 | | RefCell<
46 | | Option<
47 | | I8080<
... |
69 | | >,
70 | | > = Mutex::new(RefCell::new(None));
| |_^ `*mut DmaDescriptor` cannot be sent between threads safely
and
error[E0277]: `*const u8` cannot be sent between threads safely
--> board-tests/src/bin/i8080-static.rs:44:18
|
44 | static MY_I8080: Mutex<
| __________________^
45 | | RefCell<
46 | | Option<
47 | | I8080<
... |
69 | | >,
70 | | > = Mutex::new(RefCell::new(None));
| |_^ `*const u8` cannot be sent between threads safely
from esp-hal.
Might need a PR to mark the channel type as Send
.
Short term hack could be to wrap the I8080 type in a struct before putting it in the mutex, then you can mark this struct as Send
. This will let you store it in the mutex I think.
from esp-hal.
Related Issues (20)
- Are there any plans to implement a ZigBee stack on top of the esp-ieee802154 crate? HOT 2
- Verify packages build with both `stable` and `nightly` toolchains
- Add an example and/or other CI check to verify `defmt` features
- How to override the default post_init function? HOT 5
- UART AT character detection not working. HOT 2
- wifi example esp32 linkage error HOT 3
- H2: Enabling the IEEE802.15.4 peripheral causes the builtin JTAG peripheral to stop working HOT 1
- esp-wifi 0.6.0: cannot find type `va_list` in this scope
- SmartLedsAdapter::new does not have async impl for Rmt::new_async? HOT 5
- TIMG interrupt setup confusion HOT 5
- HIL tests sometimes experience transient failures HOT 1
- esp-storage hangs entire device on write HOT 2
- ESP-NOW / ESP-WIFI: `set_mode` is broken
- Add documentation checks back to our CI workflow (or, create a new workflow for this) HOT 2
- Crash on ESP32-S3 when configuring the clocks after a certain commit HOT 1
- Async Traits not Public HOT 1
- `Input` does not implement `RtcPin` HOT 3
- Add the `links` field to the Cargo manifest of `esp-println` and potentially other packages
- Wrong `regi2c_*` functions in `esp32h2` clocks.
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 esp-hal.