examples/nrf: add product strings to all usb examples.

This commit is contained in:
Dario Nieuwenhuis 2022-04-24 22:46:45 +02:00
parent d57fd87ba7
commit d409026b95
4 changed files with 17 additions and 6 deletions

View File

@ -59,8 +59,8 @@ async fn main(_spawner: Spawner, p: Peripherals) {
// Create embassy-usb Config // Create embassy-usb Config
let mut config = Config::new(0xc0de, 0xcafe); let mut config = Config::new(0xc0de, 0xcafe);
config.manufacturer = Some("Tactile Engineering"); config.manufacturer = Some("Embassy");
config.product = Some("Testy"); config.product = Some("HID keyboard example");
config.serial_number = Some("12345678"); config.serial_number = Some("12345678");
config.max_power = 100; config.max_power = 100;
config.max_packet_size_0 = 64; config.max_packet_size_0 = 64;

View File

@ -39,10 +39,11 @@ async fn main(_spawner: Spawner, p: Peripherals) {
// Create embassy-usb Config // Create embassy-usb Config
let mut config = Config::new(0xc0de, 0xcafe); let mut config = Config::new(0xc0de, 0xcafe);
config.manufacturer = Some("Tactile Engineering"); config.manufacturer = Some("Embassy");
config.product = Some("Testy"); config.product = Some("HID mouse example");
config.serial_number = Some("12345678"); config.serial_number = Some("12345678");
config.max_power = 100; config.max_power = 100;
config.max_packet_size_0 = 64;
// Create embassy-usb DeviceBuilder using the driver and config. // Create embassy-usb DeviceBuilder using the driver and config.
// It needs some buffers for building the descriptors. // It needs some buffers for building the descriptors.

View File

@ -36,7 +36,12 @@ async fn main(_spawner: Spawner, p: Peripherals) {
let driver = Driver::new(p.USBD, irq); let driver = Driver::new(p.USBD, irq);
// Create embassy-usb Config // Create embassy-usb Config
let config = Config::new(0xc0de, 0xcafe); let mut config = Config::new(0xc0de, 0xcafe);
config.manufacturer = Some("Embassy");
config.product = Some("USB-serial example");
config.serial_number = Some("12345678");
config.max_power = 100;
config.max_packet_size_0 = 64;
// Create embassy-usb DeviceBuilder using the driver and config. // Create embassy-usb DeviceBuilder using the driver and config.
// It needs some buffers for building the descriptors. // It needs some buffers for building the descriptors.

View File

@ -53,7 +53,12 @@ async fn main(spawner: Spawner, p: Peripherals) {
let driver = Driver::new(p.USBD, irq); let driver = Driver::new(p.USBD, irq);
// Create embassy-usb Config // Create embassy-usb Config
let config = Config::new(0xc0de, 0xcafe); let mut config = Config::new(0xc0de, 0xcafe);
config.manufacturer = Some("Embassy");
config.product = Some("USB-serial example");
config.serial_number = Some("12345678");
config.max_power = 100;
config.max_packet_size_0 = 64;
struct Resources { struct Resources {
device_descriptor: [u8; 256], device_descriptor: [u8; 256],