text
stringlengths 0
234
|
|---|
Function Definition: procedure Disable_Data
|
Function Body: (This : in out SDMMC_Controller)
|
is
|
begin
|
This.Periph.DCTRL := (others => <>);
|
end Disable_Data;
|
--------------------------
|
-- Enable_DMA_Transfers --
|
--------------------------
|
procedure Enable_DMA_Transfers
|
(This : in out SDMMC_Controller;
|
RX_Int : not null STM32.DMA.Interrupts.DMA_Interrupt_Controller_Access;
|
TX_Int : not null STM32.DMA.Interrupts.DMA_Interrupt_Controller_Access;
|
SD_Int : not null STM32.SDMMC_Interrupt.SDMMC_Interrupt_Handler_Access)
|
is
|
begin
|
This.TX_DMA_Int := TX_Int;
|
This.RX_DMA_Int := RX_Int;
|
This.SD_Int := SD_Int;
|
end Enable_DMA_Transfers;
|
--------------------------
|
-- Has_Card_Information --
|
--------------------------
|
function Has_Card_Information
|
(This : SDMMC_Controller)
|
return Boolean
|
is (This.Has_Info);
|
----------------------
|
-- Card_Information --
|
----------------------
|
function Card_Information
|
(This : SDMMC_Controller)
|
return HAL.SDMMC.Card_Information
|
is
|
begin
|
return This.Info;
|
end Card_Information;
|
----------------------------
|
-- Clear_Card_Information --
|
----------------------------
|
procedure Clear_Card_Information
|
(This : in out SDMMC_Controller)
|
is
|
begin
|
This.Has_Info := False;
|
end Clear_Card_Information;
|
---------------
|
-- Read_FIFO --
|
---------------
|
function Read_FIFO
|
(Controller : in out SDMMC_Controller) return UInt32
|
is
|
begin
|
return Controller.Periph.FIFO;
|
end Read_FIFO;
|
-------------------
|
-- Command_Error --
|
-------------------
|
function Command_Error
|
(Controller : in out SDMMC_Controller) return SD_Error
|
is
|
Start : constant Time := Clock;
|
begin
|
while not Controller.Periph.STA.CMDSENT loop
|
if Clock - Start > Milliseconds (1000) then
|
return Timeout_Error;
|
end if;
|
end loop;
|
Clear_Static_Flags (Controller);
|
return OK;
|
end Command_Error;
|
-----------------------
|
-- Response_R1_Error --
|
-----------------------
|
function Response_R1_Error
|
(Controller : in out SDMMC_Controller;
|
Command_Index : SD_Command) return SD_Error
|
is
|
Start : constant Time := Clock;
|
Timeout : Boolean := False;
|
R1 : UInt32;
|
begin
|
while not Controller.Periph.STA.CCRCFAIL
|
and then not Controller.Periph.STA.CMDREND
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.