text
stringlengths
0
234
Function Definition: procedure Reset_All_ADC_Units is
Function Body: begin
RCC_Periph.APB2RSTR.ADCRST := True;
RCC_Periph.APB2RSTR.ADCRST := False;
end Reset_All_ADC_Units;
------------------
-- Enable_Clock --
------------------
procedure Enable_Clock (This : aliased in out Digital_To_Analog_Converter)
is
pragma Unreferenced (This);
begin
RCC_Periph.APB1ENR.DACEN := True;
end Enable_Clock;
-----------
-- Reset --
-----------
procedure Reset (This : aliased in out Digital_To_Analog_Converter) is
pragma Unreferenced (This);
begin
RCC_Periph.APB1RSTR.DACRST := True;
RCC_Periph.APB1RSTR.DACRST := False;
end Reset;
------------------
-- Enable_Clock --
------------------
-- procedure Enable_Clock (This : aliased in out USART) is
-- begin
-- if This'Address = USART1_Base then
-- RCC_Periph.APB2ENR.USART1EN := True;
-- elsif This'Address = USART2_Base then
-- RCC_Periph.APB1ENR.USART2EN := True;
-- elsif This'Address = USART3_Base then
-- RCC_Periph.APB1ENR.USART3EN := True;
-- elsif This'Address = UART4_Base then
-- RCC_Periph.APB1ENR.UART4EN := True;
-- elsif This'Address = UART5_Base then
-- RCC_Periph.APB1ENR.UART5EN := True;
-- elsif This'Address = USART6_Base then
-- RCC_Periph.APB2ENR.USART6EN := True;
-- elsif This'Address = UART7_Base then
-- RCC_Periph.APB1ENR.UART7ENR := True;
-- elsif This'Address = UART8_Base then
-- RCC_Periph.APB1ENR.UART8ENR := True;
-- else
-- raise Unknown_Device;
-- end if;
-- end Enable_Clock;
-----------
-- Reset --
-----------
-- procedure Reset (This : aliased in out USART) is
-- begin
-- if This'Address = USART1_Base then
-- RCC_Periph.APB2RSTR.USART1RST := True;
-- RCC_Periph.APB2RSTR.USART1RST := False;
-- elsif This'Address = USART2_Base then
-- RCC_Periph.APB1RSTR.UART2RST := True;
-- RCC_Periph.APB1RSTR.UART2RST := False;
-- elsif This'Address = USART3_Base then
-- RCC_Periph.APB1RSTR.UART3RST := True;
-- RCC_Periph.APB1RSTR.UART3RST := False;
-- elsif This'Address = UART4_Base then
-- RCC_Periph.APB1RSTR.UART4RST := True;
-- RCC_Periph.APB1RSTR.UART4RST := False;
-- elsif This'Address = UART5_Base then
-- RCC_Periph.APB1RSTR.UART5RST := True;
-- RCC_Periph.APB1RSTR.UART5RST := False;
-- elsif This'Address = USART6_Base then
-- RCC_Periph.APB2RSTR.USART6RST := True;
-- RCC_Periph.APB2RSTR.USART6RST := False;
-- elsif This'Address = UART7_Base then
-- RCC_Periph.APB1RSTR.UART7RST := True;
-- RCC_Periph.APB1RSTR.UART7RST := False;
-- elsif This'Address = UART8_Base then
-- RCC_Periph.APB1RSTR.UART8RST := True;
-- RCC_Periph.APB1RSTR.UART8RST := False;
-- else
-- raise Unknown_Device;
-- end if;
-- end Reset;
------------------
-- Enable_Clock --
------------------
procedure Enable_Clock (This : aliased in out DMA_Controller) is
begin
if This'Address = STM32_SVD.DMA1_Base then
RCC_Periph.AHB1ENR.DMA1EN := True;
elsif This'Address = STM32_SVD.DMA2_Base then
RCC_Periph.AHB1ENR.DMA2EN := True;