Skip to content

Commit 9db273a

Browse files
committed
Split up into workspaces
Makes it easier to control the individual projects. Signed-off-by: Daniel Schaefer <[email protected]>
1 parent cab7a71 commit 9db273a

26 files changed

+1003
-89
lines changed

Cargo.lock

Lines changed: 76 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 21 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,24 @@
1-
[package]
2-
edition = "2021"
3-
name = "lotus_inputmodules"
4-
version = "0.1.2-pre"
5-
6-
[dependencies]
7-
cortex-m = "0.7"
8-
cortex-m-rt = "0.7.3"
9-
embedded-hal = { version = "0.2.7", features = ["unproven"] }
10-
11-
defmt = "0.3"
12-
defmt-rtt = "0.4"
13-
14-
#panic-probe = { version = "0.3", features = ["print-defmt"] }
15-
rp2040-panic-usb-boot = { git = "https://github.com/rwalkr/rp2040-panic-usb-boot" }
16-
17-
# Not using a BSP, we've got a Lotus BSP's locally in this crate
18-
rp2040-hal = { version="0.7", features=["rt", "critical-section-impl"] }
19-
rp2040-boot2 = "0.2"
20-
21-
# USB Serial
22-
usb-device= "0.2.9"
23-
24-
heapless = "0.7.9"
25-
usbd-serial = "0.1.1"
26-
usbd-hid = "0.5.1"
27-
fugit = "0.3.6"
28-
29-
# LED Matrix
30-
is31fl3741 = { git = "https://github.com/JohnAZoidberg/is31fl3741", branch = "all-at-once", optional = true }
31-
32-
33-
# B1 Display
34-
display-interface-spi = { version = "0.4.1", optional = true }
35-
mipidsi = { version = "0.6.0", optional = true }
36-
embedded-graphics = { version = "0.7", optional = true }
37-
tinybmp = { version = "0.4.0", optional = true }
38-
39-
# C1 Minimal
40-
smart-leds = { version = "0.3.0", optional = true }
41-
ws2812-pio = { version = "0.5.0", optional = true }
42-
43-
[lib]
44-
name = "lotus_input"
45-
path = "src/lib.rs"
46-
47-
[[bin]]
48-
name = "ledmatrix"
49-
required-features = ["ledmatrix"]
50-
51-
[[bin]]
52-
name = "b1display"
53-
required-features = ["b1display"]
54-
55-
[[bin]]
56-
name = "c1minimal"
57-
required-features = ["c1minimal"]
58-
59-
[features]
60-
ledmatrix = [ "is31fl3741" ]
61-
b1display = [ "display-interface-spi", "mipidsi", "embedded-graphics", "tinybmp" ]
62-
c1minimal = [ "smart-leds", "ws2812-pio" ]
1+
[workspace]
2+
resolver = "2"
3+
members = [
4+
"b1display",
5+
"c1minimal",
6+
"ledmatrix",
7+
"lotus-inputmodules",
8+
]
9+
# Don't build all of them by default.
10+
# Because that'll lead to all features enabled in `lotus-inputmodules` and it
11+
# doesn't currently support building with all features enabled at the same
12+
# time.
13+
default-members = [
14+
"lotus-inputmodules"
15+
]
16+
17+
#[patch.'https://github.com/rp-rs/rp-hal.git']
18+
#rp2040-hal = { path = "./rp2040-hal" }
19+
#
20+
#[patch.crates-io]
21+
#rp2040-hal = { path = "./rp2040-hal" }
6322

6423
# cargo build/run
6524
[profile.dev]

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ cargo install elf2uf2-rs --locked
101101
Build:
102102

103103
```sh
104-
cargo build --bin ledmatrix --features=ledmatrix
105-
cargo build --bin b1display --features=b1display
106-
cargo build --bin c1minimal --features=c1minimal
104+
cargo build -p ledmatrix
105+
cargo build -p b1display
106+
cargo build -p c1minimal
107107
```
108108

109109
Generate UF2 file:
@@ -121,7 +121,9 @@ First, put the module into bootloader mode, which will expose a filesystem
121121
This can be done by pressing the bootsel button while plugging it in.
122122

123123
```sh
124-
cargo run
124+
cargo run -p ledmatrix
125+
cargo run -p b1display
126+
cargo run -p c1minimal
125127
```
126128

127129
Or by copying the above generated UF2 file to the partition mounted when the

b1display/Cargo.toml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[package]
2+
edition = "2021"
3+
name = "b1display"
4+
version = "0.1.2-pre"
5+
6+
[dependencies]
7+
cortex-m = "0.7"
8+
cortex-m-rt = "0.7.3"
9+
embedded-hal = { version = "0.2.7", features = ["unproven"] }
10+
11+
defmt = "0.3"
12+
defmt-rtt = "0.4"
13+
14+
#panic-probe = { version = "0.3", features = ["print-defmt"] }
15+
rp2040-panic-usb-boot = { git = "https://github.com/rwalkr/rp2040-panic-usb-boot" }
16+
17+
# Not using a BSP, we've got a Lotus BSP's locally in this crate
18+
rp2040-hal = { version="0.7", features=["rt", "critical-section-impl"] }
19+
rp2040-boot2 = "0.2"
20+
21+
# USB Serial
22+
usb-device= "0.2.9"
23+
24+
heapless = "0.7.9"
25+
usbd-serial = "0.1.1"
26+
usbd-hid = "0.5.1"
27+
fugit = "0.3.6"
28+
29+
display-interface-spi = "0.4.1"
30+
mipidsi = "0.6.0"
31+
embedded-graphics = "0.7"
32+
tinybmp = "0.4.0"
33+
34+
[dependencies.lotus-inputmodules]
35+
path = "../lotus-inputmodules"
36+
features = [ "b1display" ]

src/bin/b1display.rs renamed to b1display/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use embedded_graphics::prelude::*;
2121

2222
// Provide an alias for our BSP so we can switch targets quickly.
2323
// Uncomment the BSP you included in Cargo.toml, the rest of the code does not need to change.
24-
use lotus_input::lotus_lcd_hal as bsp;
24+
use lotus_inputmodules::lotus_lcd_hal as bsp;
2525
//use rp_pico as bsp;
2626
// use sparkfun_pro_micro_rp2040 as bsp;
2727

@@ -45,9 +45,9 @@ use usbd_serial::{SerialPort, USB_CLASS_CDC};
4545
use core::fmt::Write;
4646
use heapless::String;
4747

48-
use lotus_input::control::*;
49-
use lotus_input::graphics::*;
50-
use lotus_input::serialnum::{device_release, get_serialnum};
48+
use lotus_inputmodules::control::*;
49+
use lotus_inputmodules::graphics::*;
50+
use lotus_inputmodules::serialnum::{device_release, get_serialnum};
5151

5252
// FRA - Framwork
5353
// KDE - Lotus C2 LED Matrix

c1minimal/Cargo.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[package]
2+
edition = "2021"
3+
name = "c1minimal"
4+
version = "0.1.2-pre"
5+
6+
[dependencies]
7+
cortex-m = "0.7"
8+
cortex-m-rt = "0.7.3"
9+
embedded-hal = { version = "0.2.7", features = ["unproven"] }
10+
11+
defmt = "0.3"
12+
defmt-rtt = "0.4"
13+
14+
#panic-probe = { version = "0.3", features = ["print-defmt"] }
15+
rp2040-panic-usb-boot = { git = "https://github.com/rwalkr/rp2040-panic-usb-boot" }
16+
17+
# Not using a BSP, we've got a Lotus BSP's locally in this crate
18+
rp2040-hal = { version="0.7", features=["rt", "critical-section-impl"] }
19+
rp2040-boot2 = "0.2"
20+
21+
# USB Serial
22+
usb-device= "0.2.9"
23+
24+
heapless = "0.7.9"
25+
usbd-serial = "0.1.1"
26+
usbd-hid = "0.5.1"
27+
fugit = "0.3.6"
28+
29+
smart-leds = "0.3.0"
30+
ws2812-pio = "0.5.0"
31+
32+
[dependencies.lotus-inputmodules]
33+
path = "../lotus-inputmodules"
34+
features = [ "c1minimal" ]

src/bin/c1minimal.rs renamed to c1minimal/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use rp2040_panic_usb_boot as _;
2121

2222
// Provide an alias for our BSP so we can switch targets quickly.
2323
// Uncomment the BSP you included in Cargo.toml, the rest of the code does not need to change.
24-
use lotus_input::lotus_minimal_hal as bsp;
24+
use lotus_inputmodules::lotus_minimal_hal as bsp;
2525
//use rp_pico as bsp;
2626

2727
use bsp::hal::{
@@ -52,8 +52,8 @@ pub type Ws2812<'a> = ws2812_pio::Ws2812<
5252
Gpio16,
5353
>;
5454

55-
use lotus_input::control::*;
56-
use lotus_input::serialnum::{device_release, get_serialnum};
55+
use lotus_inputmodules::control::*;
56+
use lotus_inputmodules::serialnum::{device_release, get_serialnum};
5757

5858
// FRA - Framwork
5959
// 000 - Lotus C1 Minimal Input Module (No assigned value)

0 commit comments

Comments
 (0)