File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ namespace klib::usb::device {
324324 const __attribute__ ((aligned(4 ))) static inline auto serial = string_descriptor(" 00001337" );
325325
326326 // configuration value. Value is set in the set config function
327- static inline uint8_t configuration = 0x00 ;
327+ static inline volatile uint8_t configuration = 0x00 ;
328328
329329 // flag if remote wakeup is supported
330330 static inline bool remote_wakeup = false ;
@@ -817,7 +817,7 @@ namespace klib::usb::device {
817817 const auto result = Usb::write (
818818 usb::status_callback<Usb>, usb::control_endpoint,
819819 usb::endpoint_mode::in,
820- {&configuration, sizeof (configuration)}
820+ {const_cast < uint8_t *>( &configuration) , sizeof (configuration)}
821821 );
822822
823823 // check if something went wrong already
You can’t perform that action at this time.
0 commit comments