66use core:: ptr:: addr_of_mut;
77
88use esp_backtrace as _;
9- use esp_hal:: { clock, gpio, otg_fs, xtensa_lx_rt, Config } ;
9+ use esp_hal:: { clock:: CpuClock , gpio, otg_fs, xtensa_lx_rt} ;
1010use esp_println:: println;
1111use heapless:: Vec ;
1212use midi_convert:: midi_types:: { Channel , MidiMessage , Note , Value7 } ;
@@ -19,11 +19,12 @@ static mut EP_MEMORY: [u32; 1024] = [0; 1024];
1919// Size of the used SysEx buffers in bytes.
2020const SYSEX_BUFFER_SIZE : usize = 64 ;
2121
22+ esp_bootloader_esp_idf:: esp_app_desc!( ) ;
23+
2224#[ xtensa_lx_rt:: entry]
2325fn main ( ) -> ! {
2426 // Some basic setup to run the MCU at maximum clock speed.
25- let mut config = Config :: default ( ) ;
26- config. cpu_clock = clock:: CpuClock :: _240MHz;
27+ let config = esp_hal:: Config :: default ( ) . with_cpu_clock ( CpuClock :: _240MHz) ;
2728 let peripherals = esp_hal:: init ( config) ;
2829
2930 let usb_bus_allocator = otg_fs:: UsbBus :: new (
@@ -47,7 +48,10 @@ fn main() -> ! {
4748 . build ( ) ;
4849
4950 // This is the *BOOT* button on the ESP32-S3-DevKitC-1.
50- let button = gpio:: Input :: new ( peripherals. GPIO0 , gpio:: Pull :: Up ) ;
51+ let button = gpio:: Input :: new (
52+ peripherals. GPIO0 ,
53+ gpio:: InputConfig :: default ( ) . with_pull ( gpio:: Pull :: Up ) ,
54+ ) ;
5155 let mut last_button_level = button. level ( ) ;
5256
5357 // Buffer for received SysEx messages from the host.
0 commit comments