text stringlengths 0 234 |
|---|
----------- |
procedure Reset (This : in out I2S_Port) is |
begin |
if This.Periph.all'Address = SPI1_Base then |
RCC_Periph.APB2RSTR.SPI1RST := True; |
RCC_Periph.APB2RSTR.SPI1RST := False; |
elsif This.Periph.all'Address = SPI2_Base then |
RCC_Periph.APB1RSTR.SPI2RST := True; |
RCC_Periph.APB1RSTR.SPI2RST := False; |
elsif This.Periph.all'Address = SPI3_Base then |
RCC_Periph.APB1RSTR.SPI3RST := True; |
RCC_Periph.APB1RSTR.SPI3RST := False; |
elsif This.Periph.all'Address = SPI4_Base then |
RCC_Periph.APB2RSTR.SPI4RST := True; |
RCC_Periph.APB2RSTR.SPI4RST := False; |
elsif This.Periph.all'Address = SPI5_Base then |
RCC_Periph.APB2RSTR.SPI5RST := True; |
RCC_Periph.APB2RSTR.SPI5RST := False; |
elsif This.Periph.all'Address = SPI6_Base then |
RCC_Periph.APB2RSTR.SPI6RST := True; |
RCC_Periph.APB2RSTR.SPI6RST := False; |
else |
raise Unknown_Device; |
end if; |
end Reset; |
------------------ |
-- Enable_Clock -- |
------------------ |
procedure Enable_Clock (This : in out Timer) is |
begin |
if This'Address = TIM1_Base then |
RCC_Periph.APB2ENR.TIM1EN := True; |
elsif This'Address = TIM2_Base then |
RCC_Periph.APB1ENR.TIM2EN := True; |
elsif This'Address = TIM3_Base then |
RCC_Periph.APB1ENR.TIM3EN := True; |
elsif This'Address = TIM4_Base then |
RCC_Periph.APB1ENR.TIM4EN := True; |
elsif This'Address = TIM5_Base then |
RCC_Periph.APB1ENR.TIM5EN := True; |
elsif This'Address = TIM6_Base then |
RCC_Periph.APB1ENR.TIM6EN := True; |
elsif This'Address = TIM7_Base then |
RCC_Periph.APB1ENR.TIM7EN := True; |
elsif This'Address = TIM8_Base then |
RCC_Periph.APB2ENR.TIM8EN := True; |
elsif This'Address = TIM9_Base then |
RCC_Periph.APB2ENR.TIM9EN := True; |
elsif This'Address = TIM10_Base then |
RCC_Periph.APB2ENR.TIM10EN := True; |
elsif This'Address = TIM11_Base then |
RCC_Periph.APB2ENR.TIM11EN := True; |
elsif This'Address = TIM12_Base then |
RCC_Periph.APB1ENR.TIM12EN := True; |
elsif This'Address = TIM13_Base then |
RCC_Periph.APB1ENR.TIM13EN := True; |
elsif This'Address = TIM14_Base then |
RCC_Periph.APB1ENR.TIM14EN := True; |
else |
raise Unknown_Device; |
end if; |
end Enable_Clock; |
----------- |
-- Reset -- |
----------- |
procedure Reset (This : in out Timer) is |
begin |
if This'Address = TIM1_Base then |
RCC_Periph.APB2RSTR.TIM1RST := True; |
RCC_Periph.APB2RSTR.TIM1RST := False; |
elsif This'Address = TIM2_Base then |
RCC_Periph.APB1RSTR.TIM2RST := True; |
RCC_Periph.APB1RSTR.TIM2RST := False; |
elsif This'Address = TIM3_Base then |
RCC_Periph.APB1RSTR.TIM3RST := True; |
RCC_Periph.APB1RSTR.TIM3RST := False; |
elsif This'Address = TIM4_Base then |
RCC_Periph.APB1RSTR.TIM4RST := True; |
RCC_Periph.APB1RSTR.TIM4RST := False; |
elsif This'Address = TIM5_Base then |
RCC_Periph.APB1RSTR.TIM5RST := True; |
RCC_Periph.APB1RSTR.TIM5RST := False; |
elsif This'Address = TIM6_Base then |
RCC_Periph.APB1RSTR.TIM6RST := True; |
RCC_Periph.APB1RSTR.TIM6RST := False; |
elsif This'Address = TIM7_Base then |
RCC_Periph.APB1RSTR.TIM7RST := True; |
RCC_Periph.APB1RSTR.TIM7RST := False; |
elsif This'Address = TIM8_Base then |
RCC_Periph.APB2RSTR.TIM8RST := True; |
RCC_Periph.APB2RSTR.TIM8RST := False; |
elsif This'Address = TIM9_Base then |
RCC_Periph.APB2RSTR.TIM9RST := True; |
RCC_Periph.APB2RSTR.TIM9RST := False; |
elsif This'Address = TIM10_Base then |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.