Skip to content

Commit f40ebdb

Browse files
committed
crate: Increase MAX_NAMESPACES for testing purposes
Allow creation of one attached, static, namespace, one unattached, static, namespace, and some dynamically created/attached namespaces. Further, heapless::Vec appears to require its capacity is a power of 2. Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
1 parent 8e91523 commit f40ebdb

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ mod wire;
2020
extern crate deku;
2121

2222
const MAX_CONTROLLERS: usize = 2;
23-
const MAX_NAMESPACES: usize = 2;
23+
const MAX_NAMESPACES: usize = 4;
2424
const MAX_PORTS: usize = 2;
2525
const MAX_NIDTS: usize = 2;
2626

@@ -510,6 +510,7 @@ impl Subsystem {
510510
self.ports.push(p).map(|_p| self.ports.last().unwrap().id)
511511
}
512512

513+
#[expect(clippy::result_large_err)]
513514
pub fn add_controller(&mut self, port: PortId) -> Result<ControllerId, Controller> {
514515
debug_assert!(self.ctlrs.len() <= u16::MAX.into());
515516
let c = Controller::new(ControllerId(self.ctlrs.len() as u16), port);

tests/admin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ mod identify {
502502
(274, &[0x03]), // MEC
503503
(285, &[0x57, 0x01]), // WCTEMP
504504
(287, &[0x57, 0x01]), // CCTEMP
505-
(535, &[0x02]), // NN
505+
(535, &[0x04]), // NN
506506
];
507507

508508
let resp = RelaxedRespChannel::new(resp_fields);

0 commit comments

Comments
 (0)