APM:Libraries
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
ChibiOS::Util Class Reference

#include <Util.h>

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

Public Member Functions

bool run_debug_shell (AP_HAL::BetterStream *stream)
 
AP_HAL::Semaphorenew_semaphore (void) override
 
uint32_t available_memory () override
 
void * malloc_type (size_t size, AP_HAL::Util::Memory_Type mem_type)
 
void free_type (void *ptr, size_t size, AP_HAL::Util::Memory_Type mem_type)
 
enum safety_state safety_switch_state (void) override
 
void set_imu_temp (float current)
 
void set_imu_target_temp (int8_t *target)
 
- Public Member Functions inherited from AP_HAL::Util
int snprintf (char *str, size_t size, const char *format,...)
 
int vsnprintf (char *str, size_t size, const char *format, va_list ap)
 
void set_soft_armed (const bool b)
 
bool get_soft_armed () const
 
void set_capabilities (uint64_t cap)
 
void clear_capabilities (uint64_t cap)
 
uint64_t get_capabilities () const
 
virtual const char * get_custom_log_directory () const
 
virtual const char * get_custom_terrain_directory () const
 
virtual const char * get_custom_storage_directory () const
 
virtual const char * get_custom_defaults_file () const
 
virtual void set_system_clock (uint64_t time_utc_usec)
 
uint64_t get_system_clock_ms () const
 
void get_system_clock_utc (int32_t &hour, int32_t &min, int32_t &sec, int32_t &ms) const
 
uint32_t get_time_utc (int32_t hour, int32_t min, int32_t sec, int32_t ms) const
 
virtual bool get_system_id (char buf[40])
 
virtual void commandline_arguments (uint8_t &argc, char *const *&argv)
 
virtual bool toneAlarm_init ()
 
virtual void toneAlarm_set_tune (uint8_t tune)
 
virtual void _toneAlarm_timer_tick ()
 
virtual AP_HAL::BetterStreamget_shell_stream ()
 
virtual perf_counter_t perf_alloc (perf_counter_type t, const char *name)
 
virtual void perf_begin (perf_counter_t h)
 
virtual void perf_end (perf_counter_t h)
 
virtual void perf_count (perf_counter_t h)
 

Static Public Member Functions

static Utilfrom (AP_HAL::Util *util)
 

Private Member Functions

void * try_alloc_from_ccm_ram (size_t size)
 
uint32_t available_memory_in_ccm_ram (void)
 

Additional Inherited Members

- Public Types inherited from AP_HAL::Util
enum  safety_state { SAFETY_NONE, SAFETY_DISARMED, SAFETY_ARMED }
 
enum  perf_counter_type { PC_COUNT, PC_ELAPSED, PC_INTERVAL }
 
enum  Memory_Type { MEM_DMA_SAFE, MEM_FAST }
 
typedef void * perf_counter_t
 
- Protected Attributes inherited from AP_HAL::Util
bool soft_armed = false
 
uint64_t capabilities = 0
 

Detailed Description

Definition at line 27 of file Util.h.

Member Function Documentation

◆ available_memory()

uint32_t Util::available_memory ( void  )
overridevirtual

how much free memory do we have in bytes.

Reimplemented from AP_HAL::Util.

Definition at line 45 of file Util.cpp.

Referenced by new_semaphore().

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

◆ available_memory_in_ccm_ram()

uint32_t ChibiOS::Util::available_memory_in_ccm_ram ( void  )
private

Referenced by new_semaphore().

Here is the caller graph for this function:

◆ free_type()

void Util::free_type ( void *  ptr,
size_t  size,
AP_HAL::Util::Memory_Type  mem_type 
)
virtual

Reimplemented from AP_HAL::Util.

Definition at line 64 of file Util.cpp.

Referenced by new_semaphore().

Here is the caller graph for this function:

◆ from()

static Util* ChibiOS::Util::from ( AP_HAL::Util util)
inlinestatic

Definition at line 29 of file Util.h.

Referenced by ChibiOS::Scheduler::_rcin_thread().

Here is the caller graph for this function:

◆ malloc_type()

void * Util::malloc_type ( size_t  size,
AP_HAL::Util::Memory_Type  mem_type 
)
virtual

Reimplemented from AP_HAL::Util.

Definition at line 55 of file Util.cpp.

Referenced by new_semaphore().

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

◆ new_semaphore()

AP_HAL::Semaphore* ChibiOS::Util::new_semaphore ( void  )
inlineoverridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 34 of file Util.h.

Here is the call graph for this function:

◆ run_debug_shell()

bool ChibiOS::Util::run_debug_shell ( AP_HAL::BetterStream stream)
inlinevirtual

Implements AP_HAL::Util.

Definition at line 33 of file Util.h.

◆ safety_switch_state()

Util::safety_state Util::safety_switch_state ( void  )
overridevirtual

Reimplemented from AP_HAL::Util.

Definition at line 87 of file Util.cpp.

Referenced by new_semaphore().

Here is the caller graph for this function:

◆ set_imu_target_temp()

void Util::set_imu_target_temp ( int8_t *  target)
virtual

Reimplemented from AP_HAL::Util.

Definition at line 139 of file Util.cpp.

Referenced by new_semaphore().

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

◆ set_imu_temp()

void Util::set_imu_temp ( float  current)
virtual

Reimplemented from AP_HAL::Util.

Definition at line 96 of file Util.cpp.

Referenced by new_semaphore().

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

◆ try_alloc_from_ccm_ram()

void * Util::try_alloc_from_ccm_ram ( size_t  size)
private

Definition at line 72 of file Util.cpp.

Referenced by malloc_type(), and new_semaphore().

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

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