APM:Libraries
|
#include <shared_dma.h>
Classes | |
struct | dma_lock |
Public Member Functions | |
FUNCTOR_TYPEDEF (dma_allocate_fn_t, void, Shared_DMA *) | |
FUNCTOR_TYPEDEF (dma_deallocate_fn_t, void, Shared_DMA *) | |
Shared_DMA (uint8_t stream_id1, uint8_t stream_id2, dma_allocate_fn_t allocate, dma_allocate_fn_t deallocate) | |
void | lock (void) |
bool | lock_nonblock (void) |
void | unlock (void) |
void | unlock_from_IRQ (void) |
void | unlock_from_lockzone (void) |
void | unregister (void) |
bool | has_contention (void) const |
Static Public Member Functions | |
static void | init (void) |
static void | lock_all (void) |
Private Member Functions | |
void | lock_core (void) |
Private Attributes | |
dma_allocate_fn_t | allocate |
dma_allocate_fn_t | deallocate |
uint8_t | stream_id1 |
uint8_t | stream_id2 |
bool | have_lock |
bool | contention |
Static Private Attributes | |
static struct ChibiOS::Shared_DMA::dma_lock | locks [SHARED_DMA_MAX_STREAM_ID] |
Definition at line 26 of file shared_dma.h.
Shared_DMA::Shared_DMA | ( | uint8_t | stream_id1, |
uint8_t | stream_id2, | ||
dma_allocate_fn_t | allocate, | ||
dma_allocate_fn_t | deallocate | ||
) |
Definition at line 35 of file shared_dma.cpp.
ChibiOS::Shared_DMA::FUNCTOR_TYPEDEF | ( | dma_allocate_fn_t | , |
void | , | ||
Shared_DMA * | |||
) |
ChibiOS::Shared_DMA::FUNCTOR_TYPEDEF | ( | dma_deallocate_fn_t | , |
void | , | ||
Shared_DMA * | |||
) |
|
inline |
Definition at line 63 of file shared_dma.h.
Referenced by ChibiOS::UARTDriver::write_pending_bytes_DMA().
|
static |
Definition at line 27 of file shared_dma.cpp.
Referenced by THD_FUNCTION().
void Shared_DMA::lock | ( | void | ) |
Definition at line 92 of file shared_dma.cpp.
Referenced by ChibiOS::SPIDevice::acquire_bus(), ChibiOS::RCOutput::dshot_send(), ChibiOS::RCOutput::serial_write_bytes(), ChibiOS::RCOutput::setup_group_DMA(), and ChibiOS::I2CDevice::transfer().
|
static |
Definition at line 182 of file shared_dma.cpp.
Referenced by has_contention(), and ChibiOS::Scheduler::reboot().
|
private |
Definition at line 61 of file shared_dma.cpp.
Referenced by lock(), and lock_nonblock().
bool Shared_DMA::lock_nonblock | ( | void | ) |
Definition at line 104 of file shared_dma.cpp.
Referenced by ChibiOS::RCOutput::dshot_send(), and ChibiOS::UARTDriver::write_pending_bytes_DMA().
void Shared_DMA::unlock | ( | void | ) |
Definition at line 136 of file shared_dma.cpp.
Referenced by ChibiOS::SPIDevice::acquire_bus(), ChibiOS::RCOutput::serial_write_bytes(), ChibiOS::RCOutput::setup_group_DMA(), and ChibiOS::I2CDevice::transfer().
void Shared_DMA::unlock_from_IRQ | ( | void | ) |
Definition at line 164 of file shared_dma.cpp.
Referenced by ChibiOS::RCOutput::dma_irq_callback(), and ChibiOS::UARTDriver::tx_complete().
void Shared_DMA::unlock_from_lockzone | ( | void | ) |
Definition at line 149 of file shared_dma.cpp.
Referenced by ChibiOS::UARTDriver::check_dma_tx_completion().
void Shared_DMA::unregister | ( | void | ) |
Definition at line 47 of file shared_dma.cpp.
|
private |
Definition at line 69 of file shared_dma.h.
Referenced by lock_core(), and Shared_DMA().
|
private |
Definition at line 77 of file shared_dma.h.
Referenced by has_contention(), and lock_nonblock().
|
private |
Definition at line 70 of file shared_dma.h.
Referenced by lock_core(), and Shared_DMA().
|
private |
Definition at line 73 of file shared_dma.h.
Referenced by lock_core(), unlock(), unlock_from_IRQ(), and unlock_from_lockzone().
|
staticprivate |
Definition at line 25 of file shared_dma.cpp.
Referenced by init(), lock(), lock_all(), lock_core(), lock_nonblock(), unlock(), unlock_from_IRQ(), unlock_from_lockzone(), and unregister().
|
private |
Definition at line 71 of file shared_dma.h.
Referenced by lock(), lock_core(), lock_nonblock(), Shared_DMA(), unlock(), unlock_from_IRQ(), unlock_from_lockzone(), and unregister().
|
private |
Definition at line 72 of file shared_dma.h.
Referenced by lock(), lock_core(), lock_nonblock(), Shared_DMA(), unlock(), unlock_from_IRQ(), unlock_from_lockzone(), and unregister().