File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 3131
3232with STM32_SVD ; use STM32_SVD;
3333with STM32.Device ; use STM32.Device;
34- with System.Storage_Elements ; use System.Storage_Elements;
3534
3635package body STM32.PWM is
3736
@@ -453,7 +452,7 @@ package body STM32.PWM is
453452 function Data_Register_Address
454453 (This : PWM_Modulator) return Address is
455454 begin
456- return This.Generator.all 'Address + 16#4C# ;
455+ return STM32.Timers.Data_Register_Address ( This.Generator.all ) ;
457456 end Data_Register_Address ;
458457
459458end STM32.PWM ;
Original file line number Diff line number Diff line change @@ -435,6 +435,16 @@ package body STM32.Timers is
435435 This.CR2.Capture_Compare_DMA_Selection := False;
436436 end Disable_Capture_Compare_DMA ;
437437
438+ -- -------------------------
439+ -- Data_Register_Address --
440+ -- -------------------------
441+
442+ function Data_Register_Address
443+ (This : Timer) return Address is
444+ begin
445+ return This.DMAR'Address;
446+ end Data_Register_Address ;
447+
438448 -- ---------------------
439449 -- Current_Prescaler --
440450 -- ---------------------
Original file line number Diff line number Diff line change @@ -437,6 +437,9 @@ package STM32.Timers is
437437 procedure Disable_Capture_Compare_DMA
438438 (This : in out Timer);
439439
440+ function Data_Register_Address
441+ (This : Timer) return Address with Inline;
442+
440443 -- --------------------------------------------------------------------------
441444
442445 -- Output Compare Management ----------------------------------------------
You can’t perform that action at this time.
0 commit comments