Use esp-synopsys-usb-otg 0.4.1 (#1452)
This commit is contained in:
parent
e368be0565
commit
2a750dfedc
@ -34,7 +34,7 @@ embedded-hal-nb = { version = "1.0.0", optional = true }
|
|||||||
embedded-io = { version = "0.6.1", optional = true }
|
embedded-io = { version = "0.6.1", optional = true }
|
||||||
embedded-io-async = { version = "0.6.1", optional = true }
|
embedded-io-async = { version = "0.6.1", optional = true }
|
||||||
enumset = "1.1.3"
|
enumset = "1.1.3"
|
||||||
esp-synopsys-usb-otg = { version = "0.4.0", optional = true, features = ["fs", "esp32sx"] }
|
esp-synopsys-usb-otg = { version = "0.4.1", optional = true, features = ["fs", "esp32sx"] }
|
||||||
fugit = "0.3.7"
|
fugit = "0.3.7"
|
||||||
log = { version = "0.4.21", optional = true }
|
log = { version = "0.4.21", optional = true }
|
||||||
nb = "1.1.0"
|
nb = "1.1.0"
|
||||||
|
|||||||
@ -7,6 +7,8 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
|
use core::ptr::addr_of_mut;
|
||||||
|
|
||||||
use esp_backtrace as _;
|
use esp_backtrace as _;
|
||||||
use esp_hal::{
|
use esp_hal::{
|
||||||
gpio::IO,
|
gpio::IO,
|
||||||
@ -26,7 +28,7 @@ fn main() -> ! {
|
|||||||
let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
|
let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
|
||||||
|
|
||||||
let usb = USB::new(peripherals.USB0, io.pins.gpio19, io.pins.gpio20);
|
let usb = USB::new(peripherals.USB0, io.pins.gpio19, io.pins.gpio20);
|
||||||
let usb_bus = UsbBus::new(usb, unsafe { &mut EP_MEMORY });
|
let usb_bus = UsbBus::new(usb, unsafe { &mut *addr_of_mut!(EP_MEMORY) });
|
||||||
|
|
||||||
let mut serial = SerialPort::new(&usb_bus);
|
let mut serial = SerialPort::new(&usb_bus);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user