fix CI issues in github actions due to namespace collision of feature & package

This commit is contained in:
bunnie 2022-06-04 14:20:45 +08:00
parent 4698a98d40
commit f4f6106b48
2 changed files with 8 additions and 8 deletions

View file

@ -41,6 +41,6 @@ rand_chacha = "0.3.1"
utralib = { path = "../../utralib"}
[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.
default = ["keyboard"]
default = ["emukbd"]

View file

@ -142,7 +142,7 @@ fn main() -> ! {
let usb_alloc = UsbBusAllocator::new(usbdev);
#[cfg(any(target_os = "none", target_os = "xous"))]
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()
.add_interface(
NKROBootKeyboardInterface::default_config(&clock),
@ -151,7 +151,7 @@ fn main() -> ! {
FidoInterface::default_config()
)
.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()
.add_interface(
FidoInterface::default_config()
@ -164,7 +164,7 @@ fn main() -> ! {
.product("Precursor")
.serial_number(&serial_number)
.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<'_, _, _,>, _>();
keyboard.write_report(&Vec::<Keyboard>::new()).ok();
@ -246,7 +246,7 @@ fn main() -> ! {
Some(Opcode::UsbIrqHandler) => {
#[cfg(any(target_os = "none", target_os = "xous"))]
if usb_dev.poll(&mut [&mut composite]) {
#[cfg(feature="keyboard")]
#[cfg(feature="emukbd")]
{
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
match keyboard.read_report() {
@ -361,7 +361,7 @@ fn main() -> ! {
codes.push(Keyboard::from_primitive(code2 as u8));
}
let auto_up = if autoup == 1 {true} else {false};
#[cfg(feature="keyboard")]
#[cfg(feature="emukbd")]
{
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
keyboard.write_report(&codes).ok();
@ -397,7 +397,7 @@ fn main() -> ! {
KeyMap::Dvorak => mappings::char_to_hid_code_dvorak(ch),
_ => mappings::char_to_hid_code_us101(ch),
};
#[cfg(feature="keyboard")]
#[cfg(feature="emukbd")]
{
let keyboard = composite.interface::<NKROBootKeyboardInterface<'_, _, _,>, _>();
keyboard.write_report(&codes).ok();