APM:Libraries
Public Member Functions | Private Attributes | List of all members
ChibiOS::Semaphore Class Reference

#include <Semaphores.h>

Inheritance diagram for ChibiOS::Semaphore:
[legend]
Collaboration diagram for ChibiOS::Semaphore:
[legend]

Public Member Functions

 Semaphore ()
 
bool give ()
 
bool take (uint32_t timeout_ms)
 
bool take_nonblocking ()
 
bool check_owner (void)
 
void assert_owner (void)
 
- Public Member Functions inherited from AP_HAL::Semaphore
virtual void take_blocking ()
 
virtual ~Semaphore (void)
 

Private Attributes

mutex_t _lock
 

Detailed Description

Definition at line 24 of file Semaphores.h.

Constructor & Destructor Documentation

◆ Semaphore()

ChibiOS::Semaphore::Semaphore ( )
inline

Definition at line 26 of file Semaphores.h.

Here is the call graph for this function:

Member Function Documentation

◆ assert_owner()

void ChibiOS::Semaphore::assert_owner ( void  )
inline

Definition at line 41 of file Semaphores.h.

Referenced by ChibiOS::SPIDevice::acquire_bus(), ChibiOS::SPIDevice::clock_pulse(), and ChibiOS::SPIDevice::transfer_fullduplex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_owner()

bool ChibiOS::Semaphore::check_owner ( void  )
inline

Definition at line 34 of file Semaphores.h.

Referenced by assert_owner(), ChibiOS::I2CDevice::transfer(), and ChibiOS::SPIDevice::transfer().

Here is the caller graph for this function:

◆ give()

bool Semaphore::give ( )
virtual

Implements AP_HAL::Semaphore.

Definition at line 26 of file Semaphores.cpp.

Referenced by ChibiOS::UARTDriver::_timer_tick(), ChibiOS::RCInput::_timer_tick(), ChibiOS::DeviceBus::bus_thread(), ChibiOS::SPIDevice::clock_pulse(), ChibiOS::RCInput::new_input(), ChibiOS::RCInput::read(), Semaphore(), ChibiOS::UARTDriver::write(), and ChibiOS::UARTDriver::write_locked().

Here is the caller graph for this function:

◆ take()

bool Semaphore::take ( uint32_t  timeout_ms)
virtual

Implements AP_HAL::Semaphore.

Definition at line 32 of file Semaphores.cpp.

Referenced by ChibiOS::UARTDriver::_timer_tick(), ChibiOS::RCInput::_timer_tick(), ChibiOS::DeviceBus::bus_thread(), ChibiOS::SPIDevice::clock_pulse(), ChibiOS::RCInput::read(), and Semaphore().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ take_nonblocking()

bool Semaphore::take_nonblocking ( )
virtual

Implements AP_HAL::Semaphore.

Definition at line 51 of file Semaphores.cpp.

Referenced by ChibiOS::RCInput::new_input(), Semaphore(), take(), ChibiOS::UARTDriver::write(), and ChibiOS::UARTDriver::write_locked().

Here is the caller graph for this function:

Member Data Documentation

◆ _lock

mutex_t ChibiOS::Semaphore::_lock
private

Definition at line 45 of file Semaphores.h.

Referenced by check_owner(), give(), Semaphore(), take(), and take_nonblocking().


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