File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -297,8 +297,11 @@ impl DeviceExt for Device {
297
297
} else {
298
298
return Err ( anyhow ! ( "derive: incorrect syntax for {}" , pname) ) ;
299
299
} ;
300
- self . get_peripheral ( pderive)
301
- . ok_or_else ( || anyhow ! ( "peripheral {} not found" , pderive) ) ?;
300
+
301
+ if !pderive. contains ( '.' ) {
302
+ self . get_peripheral ( pderive)
303
+ . ok_or_else ( || anyhow ! ( "peripheral {} not found" , pderive) ) ?;
304
+ }
302
305
303
306
match self . get_mut_peripheral ( pname) {
304
307
Some ( peripheral) => peripheral. modify_from ( info, VAL_LVL ) ?,
Original file line number Diff line number Diff line change @@ -377,6 +377,7 @@ impl PeripheralExt for Peripheral {
377
377
} else {
378
378
return Err ( anyhow ! ( "derive: incorrect syntax for {}" , rname) ) ;
379
379
} ;
380
+
380
381
self . get_register ( rderive)
381
382
. ok_or_else ( || anyhow ! ( "register {} not found" , rderive) ) ?;
382
383
You can’t perform that action at this time.
0 commit comments