mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-21 09:14:34 +00:00
fix CI issues in github actions due to namespace collision of feature & package
This commit is contained in:
parent
4698a98d40
commit
f4f6106b48
2 changed files with 8 additions and 8 deletions
|
|
@ -41,6 +41,6 @@ rand_chacha = "0.3.1"
|
||||||
utralib = { path = "../../utralib"}
|
utralib = { path = "../../utralib"}
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
keyboard = [] # handy for debugging composite device issues
|
emukbd = [] # handy for debugging composite device issues
|
||||||
mjolnir = [] # the big hammer for debugging Spinal USB issues. A raw memory dump of config and descriptor space. Use with care.
|
mjolnir = [] # the big hammer for debugging Spinal USB issues. A raw memory dump of config and descriptor space. Use with care.
|
||||||
default = ["keyboard"]
|
default = ["emukbd"]
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ fn main() -> ! {
|
||||||
let usb_alloc = UsbBusAllocator::new(usbdev);
|
let usb_alloc = UsbBusAllocator::new(usbdev);
|
||||||
#[cfg(any(target_os = "none", target_os = "xous"))]
|
#[cfg(any(target_os = "none", target_os = "xous"))]
|
||||||
let clock = EmbeddedClock::new();
|
let clock = EmbeddedClock::new();
|
||||||
#[cfg(all(any(target_os = "none", target_os = "xous"), feature="keyboard"))]
|
#[cfg(all(any(target_os = "none", target_os = "xous"), feature="emukbd"))]
|
||||||
let mut composite = UsbHidClassBuilder::new()
|
let mut composite = UsbHidClassBuilder::new()
|
||||||
.add_interface(
|
.add_interface(
|
||||||
NKROBootKeyboardInterface::default_config(&clock),
|
NKROBootKeyboardInterface::default_config(&clock),
|
||||||
|
|
@ -151,7 +151,7 @@ fn main() -> ! {
|
||||||
FidoInterface::default_config()
|
FidoInterface::default_config()
|
||||||
)
|
)
|
||||||
.build(&usb_alloc);
|
.build(&usb_alloc);
|
||||||
#[cfg(all(any(target_os = "none", target_os = "xous"), not(feature="keyboard")))]
|
#[cfg(all(any(target_os = "none", target_os = "xous"), not(feature="emukbd")))]
|
||||||
let mut composite = UsbHidClassBuilder::new()
|
let mut composite = UsbHidClassBuilder::new()
|
||||||
.add_interface(
|
.add_interface(
|
||||||
FidoInterface::default_config()
|
FidoInterface::default_config()
|
||||||
|
|
@ -164,7 +164,7 @@ fn main() -> ! {
|
||||||
.product("Precursor")
|
.product("Precursor")
|
||||||
.serial_number(&serial_number)
|
.serial_number(&serial_number)
|
||||||
.build();
|
.build();
|
||||||
#[cfg(all(any(target_os = "none", target_os = "xous"), feature="keyboard"))]
|
#[cfg(all(any(target_os = "none", target_os = "xous"), feature="emukbd"))]
|
||||||
{
|
{
|
||||||
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
|
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
|
||||||
keyboard.write_report(&Vec::<Keyboard>::new()).ok();
|
keyboard.write_report(&Vec::<Keyboard>::new()).ok();
|
||||||
|
|
@ -246,7 +246,7 @@ fn main() -> ! {
|
||||||
Some(Opcode::UsbIrqHandler) => {
|
Some(Opcode::UsbIrqHandler) => {
|
||||||
#[cfg(any(target_os = "none", target_os = "xous"))]
|
#[cfg(any(target_os = "none", target_os = "xous"))]
|
||||||
if usb_dev.poll(&mut [&mut composite]) {
|
if usb_dev.poll(&mut [&mut composite]) {
|
||||||
#[cfg(feature="keyboard")]
|
#[cfg(feature="emukbd")]
|
||||||
{
|
{
|
||||||
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
|
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
|
||||||
match keyboard.read_report() {
|
match keyboard.read_report() {
|
||||||
|
|
@ -361,7 +361,7 @@ fn main() -> ! {
|
||||||
codes.push(Keyboard::from_primitive(code2 as u8));
|
codes.push(Keyboard::from_primitive(code2 as u8));
|
||||||
}
|
}
|
||||||
let auto_up = if autoup == 1 {true} else {false};
|
let auto_up = if autoup == 1 {true} else {false};
|
||||||
#[cfg(feature="keyboard")]
|
#[cfg(feature="emukbd")]
|
||||||
{
|
{
|
||||||
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
|
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
|
||||||
keyboard.write_report(&codes).ok();
|
keyboard.write_report(&codes).ok();
|
||||||
|
|
@ -397,7 +397,7 @@ fn main() -> ! {
|
||||||
KeyMap::Dvorak => mappings::char_to_hid_code_dvorak(ch),
|
KeyMap::Dvorak => mappings::char_to_hid_code_dvorak(ch),
|
||||||
_ => mappings::char_to_hid_code_us101(ch),
|
_ => mappings::char_to_hid_code_us101(ch),
|
||||||
};
|
};
|
||||||
#[cfg(feature="keyboard")]
|
#[cfg(feature="emukbd")]
|
||||||
{
|
{
|
||||||
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
|
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
|
||||||
keyboard.write_report(&codes).ok();
|
keyboard.write_report(&codes).ok();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue