univa / rumcake Goto Github PK
View Code? Open in Web Editor NEWA rust-based keyboard firmware
Home Page: https://univa.github.io/rumcake/
License: MIT License
A rust-based keyboard firmware
Home Page: https://univa.github.io/rumcake/
License: MIT License
Hi,
I am trying to make an Analog macro pad using nice!nano clone board and while compiling i get this error message.
error: You must activate at least one of the following features: ble-central, ble-peripheral
--> /home/snappy/.cargo/git/checkouts/nrf-softdevice-03ef4aef10e777e4/487f98e/nrf-softdevice/src/lib.rs:9:1
|
9 | compile_error!("You must activate at least one of the following features: ble-central, ble-peripheral");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0599]: no variant or associated item named `Peripheral` found for enum `ble::types::Role` in the current scope
--> /home/snappy/.cargo/git/checkouts/nrf-softdevice-03ef4aef10e777e4/487f98e/nrf-softdevice/src/ble/connection.rs:151:25
|
151 | role: Role::Peripheral,
| ^^^^^^^^^^ variant or associated item not found in `Role`
|
::: /home/snappy/.cargo/git/checkouts/nrf-softdevice-03ef4aef10e777e4/487f98e/nrf-softdevice/src/ble/types.rs:68:1
|
68 | pub enum Role {
| ------------- variant or associated item `Peripheral` not found for this enum
|
note: if you're trying to build a new `ble::types::Role`, consider using `ble::types::Role::from_raw` which returns `ble::types::Role`
--> /home/snappy/.cargo/git/checkouts/nrf-softdevice-03ef4aef10e777e4/487f98e/nrf-softdevice/src/ble/types.rs:76:5
|
76 | pub fn from_raw(raw: u8) -> Self {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0282]: type annotations needed
--> /home/snappy/.cargo/git/checkouts/nrf-softdevice-03ef4aef10e777e4/487f98e/nrf-softdevice/src/ble/gap.rs:19:17
|
19 | let handled = match Role::from_raw(params.role) {
| ^^^^^^^
...
25 | if !handled {
| -------- type must be known at this point
|
help: consider giving `handled` an explicit type
|
19 | let handled: /* Type */ = match Role::from_raw(params.role) {
| ++++++++++++
Have a look at https://github.com/jtroo/kanata/tree/main/keyberon, another fork of keyberon that adds other actions like https://github.com/jtroo/kanata/blob/main/keyberon/src/action.rs#L376-L387
rumcake
featurerumcake
featuresrumcake
featuresFirst of all thanks for putting this project together. I've been looking for an option to get things working for my latest keyboard, and this looks like the closest I've got.
My current keyboard is a ferris/sweep with one half with an ELITE-pi (aka an RP2040), and the other half is a nice!nano board. Both of these boards are connected via a wired connection on a TRRS cable. The reason this project seems like a great option is;
This project seems to be the perfect fit, but after a few hours of reading through the source code I'm kind of stumped as to how all the pieces fit together. The documentation that is available it seems like it's very well written but there are some holes where docs could probably be better. I'm fully aware that writing docs can be quite dry and boring, so I'm just going to ask some questions and if you have time to respond I'll write them up into some docs as I go. Here are my questions;
What are the parameters that I should be using with rumcake::hw::mcu::setup_buffered_uarte
to implement the necessary settings for wired communication? Apart from the RX/TX pin args it's unclear what I should be using here. I've tried looking through the docs and source code in embassy
, nrf-hal
etc. But between all the macros and abstraction layer's I've kind of got a little lost. e.g. Here are one of the errors that I'm running into;
error: proc macro panicked
--> src/right.rs:82:5
|
82 | setup_buffered_uarte!{UART0, TIMER1, PPI_CH1, PPI_CH2, PPI_GROUP0, P0_08, P0_06}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: message: proc-macro-error API cannot be used outside of `entry_point` invocation, perhaps you forgot to annotate your #[proc_macro] function with `
TBH I'm not even sure if the arguments I've used here even make sense. So it could be that I'm just using the macro completely incorrectly.
In the case that there is 1-gpio-pin per key, what should I be doing with the layouts? It's not entirely clear how to adapt the layout for non-diode-matrix keyboards.
Early on in the history of this repo, I threw on the MIT license. Looking back in retrospect, and looking forward about the potential directions of this project, I realize that MIT may not be the most appropriate choice for all parts of this repository.
I plan on changing parts of this repository (if not all) over to GPLv3 for two main reasons:
That being said, I'm opening this issue for discussion on potential ways forward, as well as getting the appropriate permissions from other developers to handle code that might be affected by these changes. I will also be trying to get in contact with people I believe to be copyright holders for some relevant code.
Some possible solutions I thought of:
rumcake
crate under MIT
Other potential concerns:
When compiling for a split keyboard and not having any of the "simple-backlight", "simple-backlight-matrix", "rgb-backlight-matrix", "underglow" features enabled, I get a the following compile error:
error[E0084]: unsupported representation for zero-variant enum
--> rumcake/rumcake/src/split/mod.rs:49:1
|
49 | #[repr(u8)]
| ^^^^^^^^^^^
50 | pub enum MessageToPeripheral {
| ---------------------------- zero-variant enum
Two possible fixes I thought of, would be either wrapping the repr(u8)
on MessageToPeripheral
in a cfg_attr
:
#[cfg_attr(any(
feature = "simple-backlight",
feature = "simple-backlight-matrix",
feature = "rgb-backlight-matrix",
feature = "underglow"
), repr(u8))]
or by adding a dummy variant to the enum, so it always has at least one variant, regardless enabled of features.
Shouldn't work with other MCUs either, but in this case I tested it on an RP2040 and nRF52840 (split-template)
rumcake
used0.1.0 (a73d77b)
You can just use the split example and change the rev of rumcake to a73d77b
compile without errors when not specifying any additional features
Hi, i am getting an error message when i try to compile an analog matrix
$ cargo build --release
Compiling rumcake-macropad v0.1.0 (/mnt/d/Coding/PROJECTS/Macropad/macropad)
error: unknown field encountered.
--> src/main.rs:28:17
|
28 | (interrupt: ADC1_2, adc: ADC2) => {
| ^^^^^^
error[E0412]: cannot find type `AdcSamplerType` in this scope
--> src/main.rs:43:5
|
43 | / build_analog_matrix! {
44 | | channels: {
45 | | [(0, 0) (0, 1) (0, 2) (0, 3)]
46 | | [(1, 0) (1, 1) (1, 2) (1, 3)]
... |
55 | | }
56 | | }
| | ^
| | |
| |_____not found in this scope
| in this macro invocation
|
::: /home/snappy/.cargo/git/checkouts/rumcake-f831d65ecf4877c1/3ef4990/rumcake-macros/src/lib.rs:179:1
|
179 | #[proc_macro_error]
| ------------------- in this expansion of `build_analog_matrix!`
error[E0423]: expected function, found macro `setup_adc_sampler`
--> src/main.rs:13:1
|
13 | / #[keyboard(
14 | | usb,
15 | | bluetooth
16 | | )]
| | ^
| | |
| |__not a function
| in this procedural macro expansion
|
::: /home/snappy/.cargo/git/checkouts/rumcake-f831d65ecf4877c1/3ef4990/rumcake-macros/src/lib.rs:147:1
|
147 | #[proc_macro_error]
| ------------------- in this expansion of `#[keyboard]`
|
help: use `!` to invoke the macro
|
16 | )]!
| +
error[E0423]: expected function, found macro `setup_adc_sampler`
--> src/main.rs:43:5
|
43 | / build_analog_matrix! {
44 | | channels: {
45 | | [(0, 0) (0, 1) (0, 2) (0, 3)]
46 | | [(1, 0) (1, 1) (1, 2) (1, 3)]
... |
55 | | }
56 | | }
| | ^
| | |
| |_____not a function
| in this macro invocation
|
::: /home/snappy/.cargo/git/checkouts/rumcake-f831d65ecf4877c1/3ef4990/rumcake-macros/src/lib.rs:179:1
|
179 | #[proc_macro_error]
| ------------------- in this expansion of `build_analog_matrix!`
|
help: use `!` to invoke the macro
|
56 | }!
| +
I am not sure about the errors that are popping up.
edit: adding project repo https://github.com/SnappierSoap318/macropad
rumcake
featurerumcake
featuresrumcake
featuresMany split keyboards use a TRRS cable to communicate between split keyboards. It would be great if there where some method to communicate between peripheral and central via a wired connection rather than just bluetooth.
rumcake
featurerumcake
featuresrumcake
featuresHello, first of all, thank you for this amazing project. Now that there is RP2040 support, I really want to use this firmware for my Corne, instead of QMK.
In QMK there is an option to enter the UF2 Bootloader with a double-tap of the reset button. I use this feature, since my Corne PCB only exposes the reset button but not the boot button.
The feature is already implemented in my fork (here) and I could open a pull request if you are interested.
In my implementation, the feature is not exclusive to the RP2040 but can only really be used with it, since the other MCUs do not currently have an implemented jump_to_bootloader()
function. I also am not sure what the best way is, to configure the timeout time, currently it can be change via an environment variable at compile-time
rumcake
featurerumcake
featuresrumcake
featuresJust found this while trying to figure out why my nice!nano wouldn't work with USB/BLE (I did get it to blink the LED and respond to a short to ground on a pin). While looking at the docs I noticed that the only display listed was the SSD1306.
I'm fairly new to building keyboards (just got sucked into it 2 weeks ago), so I haven't dived into all the specs. Feel free to close this issue if the SSD1306 driver is compatible with the nice!view.
I do have a pair of nice!view's that I can test with, but I believe I saw that I can't use the uf2 flashing method with rumcake (I did manage it with my LED example, but not anything more complex). So I'll have to wait to test it until I get some jumper cables (should be arriving in the mail tomorrow EST) :)
Thanks for making this! โค๏ธ
I was also planning to add joystick support to my board. Specifically for this guy, so I might look into adding that here if there's interest (I'll make a new issue once I figure out the details involved).
rumcake
featurerumcake
featuresrumcake
featuresthe eskarp keyboard uses a rust based firmware with a touchpad driver that could be ported to rumcake with a little effort. i may try getting this working for a personal project but wanted to put this out there for others to try as well.
Hello, I have just found this amazing project and I would like to know how to contribute, as well as which tasks are being done and which ones are left, in order to organize my contribution a little bit ๐
rumcake
featurerumcake
featuresrumcake
featuresIt would be nice if we could have only a single source (and binary) for both sides, by recognizing which side is left or right and which one is central or peripheral via a provided function from the user. I come from KMK and there the side is usually gathered by
and for the central, the presence of USB connection makes it act as such, or else it falls back to being a peripheral.
If you use the Keybow2040
device, it fails on compilation with:
note: the following trait bounds were not satisfied:
`<I2C as embedded_hal_async::i2c::ErrorType>::Error = _`
`I2C: I2c`
I've submitted a PR to address this
I'm actually using Univa/is31fl3731
directly from an RP2040 board (Keybow 2040) - at the moment I'm just doing some messing around to get a basic keyboard running so I'm not using rumcake itself, but I'd like to try out using more of it as I go.
rumcake
usedI'm using the same is31fl3731 crate as current rumcake
main, with:
is31fl3731 = { git = "https://github.com/Univa/is31fl3731", features = ["async", "keybow_2040"] }
You just need to set up a matrix using Keybow2040
to see the error, my code on RP2040 is as follows:
let p = embassy_rp::init(Default::default());
let sda = p.PIN_4;
let scl = p.PIN_5;
info!("set up i2c ");
let i2c = i2c::I2c::new_async(p.I2C0, scl, sda, Irqs, i2c::Config::default());
// Create LED matrix driver
let mut matrix = Keybow2040::configure(i2c);
Keybow2040
cargo build
Code compiles.
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.