Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::DMADriver Class Reference

This class is responsible for streams acquisition, streams release and interrupt handling. More...

#include <DMA.h>

Public Member Functions

void IRQhandleInterrupt (DMADefs::DMAStreamId id)
 
bool tryStream (DMADefs::DMAStreamId id)
 
DMAStreamGuard acquireStream (DMADefs::DMAStreamId id, DMADefs::Channel channel, std::chrono::nanoseconds timeout=std::chrono::nanoseconds::zero())
 Try to acquire the specified stream and initialize it with the correct channel.
 
DMAStreamGuard acquireStreamForPeripheral (DMADefs::Peripherals peripheral, std::chrono::nanoseconds timeout=std::chrono::nanoseconds::zero())
 Try to acquire a stream that is connected to the specified peripheral.
 
void releaseStream (DMADefs::DMAStreamId id)
 
 DMADriver (const DMADriver &)=delete
 
DMADriveroperator= (const DMADriver &)=delete
 

Static Public Member Functions

static DMADriverinstance ()
 

Detailed Description

This class is responsible for streams acquisition, streams release and interrupt handling.

Definition at line 154 of file DMA.h.

Constructor & Destructor Documentation

◆ DMADriver()

Boardcore::DMADriver::DMADriver ( const DMADriver & )
delete

Member Function Documentation

◆ acquireStream()

DMAStreamGuard Boardcore::DMADriver::acquireStream ( DMADefs::DMAStreamId id,
DMADefs::Channel channel,
std::chrono::nanoseconds timeout = std::chrono::nanoseconds::zero() )

Try to acquire the specified stream and initialize it with the correct channel.

Parameters
idThe id of the stream to be acquired.
channelThe channel used to initialize the stream.
timeoutThe maximum time that will be waited, defaults to waiting forever.
Returns
A stream guard that might be valid or not, depending on the outcome of the request.

Definition at line 329 of file DMA.cpp.

◆ acquireStreamForPeripheral()

DMAStreamGuard Boardcore::DMADriver::acquireStreamForPeripheral ( DMADefs::Peripherals peripheral,
std::chrono::nanoseconds timeout = std::chrono::nanoseconds::zero() )

Try to acquire a stream that is connected to the specified peripheral.

Parameters
peripheralThe wanted peripheral.
timeoutThe maximum time that will be waited, defaults to waiting forever.
Returns
A stream guard that might be valid or not, depending on the outcome of the request.

Definition at line 359 of file DMA.cpp.

◆ instance()

DMADriver & Boardcore::DMADriver::instance ( )
static

Definition at line 314 of file DMA.cpp.

◆ IRQhandleInterrupt()

void Boardcore::DMADriver::IRQhandleInterrupt ( DMADefs::DMAStreamId id)

Definition at line 270 of file DMA.cpp.

◆ operator=()

DMADriver & Boardcore::DMADriver::operator= ( const DMADriver & )
delete

◆ releaseStream()

void Boardcore::DMADriver::releaseStream ( DMADefs::DMAStreamId id)

Definition at line 402 of file DMA.cpp.

◆ tryStream()

bool Boardcore::DMADriver::tryStream ( DMADefs::DMAStreamId id)
Returns
True if the stream is not already in use.

Definition at line 320 of file DMA.cpp.


The documentation for this class was generated from the following files: