APM:Libraries
Functions | Variables
stdio.c File Reference
#include <posix.h>
#include <string.h>
#include <hal.h>
#include <memstreams.h>
#include <chprintf.h>
#include <ctype.h>
#include "stdio.h"
Include dependency graph for stdio.c:

Go to the source code of this file.

Functions

int vsnprintf (char *str, size_t size, const char *fmt, va_list ap)
 
int snprintf (char *str, size_t size, const char *fmt,...)
 
int vasprintf (char **strp, const char *fmt, va_list ap)
 
int asprintf (char **strp, const char *fmt,...)
 
int vprintf (const char *fmt, va_list arg)
 
int printf (const char *fmt,...)
 
int scanf (const char *fmt,...)
 
int sscanf (const char *buf, const char *fmt,...)
 
static char * _getbase (char *p, int *basep)
 
static int16_t _atob (uint32_t *vp, char *p, int base)
 
int16_t atob (uint32_t *vp, char *p, int base)
 

Variables

int(* vprintf_console_hook )(const char *fmt, va_list arg) = vprintf
 

Function Documentation

◆ _atob()

static int16_t _atob ( uint32_t *  vp,
char *  p,
int  base 
)
static

Definition at line 172 of file stdio.c.

Referenced by atob().

Here is the caller graph for this function:

◆ _getbase()

static char* _getbase ( char *  p,
int *  basep 
)
static

Definition at line 148 of file stdio.c.

Referenced by atob().

Here is the caller graph for this function:

◆ asprintf()

int asprintf ( char **  strp,
const char *  fmt,
  ... 
)

◆ atob()

int16_t atob ( uint32_t *  vp,
char *  p,
int  base 
)

Definition at line 227 of file stdio.c.

Here is the call graph for this function:

◆ printf()

int printf ( const char *  fmt,
  ... 
)

Definition at line 113 of file stdio.c.

Referenced by Linux::UtilRPI::_check_rpi_version(), AP_Compass_BMM150::_compensate_z(), AP_Compass_QMC5883L::_dump_registers(), EEPROMClass::_ErasePage(), AP_Compass_MAG3110::_hardware_init(), AP_Baro_MS56XX::_init(), AP_Baro_KellerLD::_init(), EEPROMClass::_init(), AP_InertialSensor_RST::_init_accel(), AP_InertialSensor_RST::_init_gyro(), PX4::PX4Storage::_mtd_load(), VRBRAIN::VRBRAINStorage::_mtd_load(), AP_InertialSensor_PX4::_new_accel_sample(), AP_InertialSensor_PX4::_new_gyro_sample(), HALSITL::SITL_State::_parse_command_line(), F4Light::Scheduler::_print_stats(), Linux::RCOutput_Bebop::_run_rcout(), HALSITL::SITL_State::_set_param_default(), Linux::VideoIn::_set_streaming(), PX4::PX4Storage::_storage_open(), VRBRAIN::VRBRAINStorage::_storage_open(), Linux::Scheduler::_timer_task(), VRBRAIN::VRBRAINScheduler::_timer_thread(), PX4::PX4Scheduler::_timer_thread(), F4Light::Scheduler::_try_kill_task_or_reboot(), HALSITL::SITL_State::_update_gps_file(), AP_TECS::_update_pitch(), AP_InertialSensor_Backend::_update_sensor_rate(), HALSITL::SITL_State::_usage(), _usage(), OSD_EEPROM::_write(), Linux::RCInput::add_dsm_input(), Linux::RCInput::add_sbus_input(), SITL::Aircraft::Aircraft(), Linux::VideoIn::allocate_buffers(), ap_hook_accel_sample(), ap_hook_AHRS_update(), ap_hook_gyro_sample(), ap_hook_setup_complete(), ap_hook_setup_start(), AP_BoardConfig::board_setup_drivers(), AP_Airspeed_MS5525::calculate(), MAVLink_routing::check_and_forward(), AP_RangeFinder_VL53L0X::check_id(), AP_HAL::Device::check_next_register(), GCS_MAVLINK::correct_offboard_timestamp_usec_to_ms(), AP_Param::count_embedded_param_defaults(), PX4::PX4Scheduler::delay(), VRBRAIN::VRBRAINScheduler::delay(), AP_GPS::detect_instance(), dsm_decode(), SITL::FlightAxis::exchange_data(), Linux::SPIDeviceManager::get_device(), PX4::SPIDeviceManager::get_device(), VRBRAIN::SPIDeviceManager::get_device(), ChibiOS::SPIDeviceManager::get_device(), F4Light::Scheduler::get_next_task(), MAVLink_routing::handle_heartbeat(), AP_IRLock_I2C::init(), TSYS01::init(), AP_Baro_DPS280::init(), AP_Baro_FBM320::init(), Linux::RCOutput_Disco::init(), AP_RangeFinder_VL53L0X::init(), Linux::Led_Sysfs::init(), Linux::RCInput_SBUS::init(), AP_Airspeed_MS4525::init(), AP_RangeFinder_PulsedLightLRF::init(), AP_Airspeed_MS5525::init(), AP_Compass_IST8310::init(), AP_Compass_QMC5883L::init(), AP_Compass_LIS3MDL::init(), AP_Compass_MMC3416::init(), DataFlash_Class::Init(), AP_Compass_AK09916::init(), Linux::GPIO_BBB::init(), AP_Gripper_EPM::init_gripper(), HAL_F4Light::lateInit(), MAVLink_routing::learn_route(), loop(), main(), Linux::RCInput_RPI::map_peripheral(), SITL::MultiCopter::MultiCopter(), TCPServerDevice::open(), SITL::JSBSim::open_control_socket(), param_find(), SITL::Aircraft::parse_home(), AP_Param::parse_param_line(), SITL::FlightAxis::parse_reply(), perror(), AP_BoardConfig::px4_setup_peripherals(), AP_BoardConfig::px4_setup_px4io(), AP_BoardConfig::px4_start_driver(), SITL::QuadPlane::QuadPlane(), F4Light::RCInput::read(), AP_Compass_LIS3MDL::read(), read_calibration_data(), AP_IRLock_I2C::read_frames(), Linux::RCOutput_Bebop::read_obs_data(), AP_Airspeed_MS5525::read_prom(), SITL::XPlane::receive_data(), AP_Param::reload_defaults_file(), SITL::FlightAxis::report_FPS(), HAL_Linux::run(), HAL_PX4::run(), HAL_VRBRAIN::run(), HAL_F4Light::run(), AP_OpticalFlow_PX4Flow::scan_buses(), SCSI_ProcessCmd(), sdcard_init(), SITL::XPlane::select_data(), SITL::ADSB::send_report(), SITL::Gimbal::send_report(), MAVLink_routing::send_to_components(), AP_BoardConfig::sensor_config_error(), AP_HAL::Device::set_checked_register(), Linux::RCInput_SBUS::set_device_path(), SITL::Gazebo::set_interface_ports(), set_object_value_and_report(), FlashTest::setup(), setup(), show_matrix(), SITL::SimRover::SimRover(), SITL::Aircraft::smooth_sensors(), SITL::FlightAxis::soap_request(), PX4::SPIDevice::SPIDevice(), VRBRAIN::SPIDevice::SPIDevice(), srxl_channels_get_v5(), srxl_decode(), DataFlash_MAVLink::stats_log(), sumd_decode(), Linux::Scheduler::suspend_timer_procs(), SITL::Aircraft::sync_frame_time(), test_matrix_inverse(), AP_Compass_QMC5883L::timer(), AP_Compass_MMC3416::timer(), type_size(), SITL::Tracker::update(), SITL::Balloon::update(), SITL::XPlane::update(), SITL::Sprayer::update(), SITL::ICEngine::update(), SITL::Aircraft::update_dynamics(), SITL::Gripper_EPM::update_from_demand(), AP_TECS::update_pitch_throttle(), SITL::Vicon::update_vicon_position_estimate(), usage(), Soft_I2C::wait_done(), FlashTest::write(), SITL::XPlane::XPlane(), PX4::I2CDevice::~I2CDevice(), VRBRAIN::I2CDevice::~I2CDevice(), ChibiOS::I2CDevice::~I2CDevice(), PX4::SPIDevice::~SPIDevice(), and VRBRAIN::SPIDevice::~SPIDevice().

Here is the caller graph for this function:

◆ scanf()

int scanf ( const char *  fmt,
  ... 
)

Definition at line 127 of file stdio.c.

◆ snprintf()

int snprintf ( char *  str,
size_t  size,
const char *  fmt,
  ... 
)

◆ sscanf()

int sscanf ( const char *  buf,
const char *  fmt,
  ... 
)

Definition at line 136 of file stdio.c.

Referenced by Linux::UtilRPI::_check_rpi_version(), dsm_decode(), Linux::I2CDeviceManager::get_device(), main(), and AP_Proximity_LightWareSF40C::process_reply().

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

◆ vasprintf()

int vasprintf ( char **  strp,
const char *  fmt,
va_list  ap 
)

Definition at line 76 of file stdio.c.

Referenced by HALSITL::SITL_State::_gps_nmea_printf(), asprintf(), fprintf(), and SITL::FlightAxis::soap_request().

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

◆ vprintf()

int vprintf ( const char *  fmt,
va_list  arg 
)

Definition at line 100 of file stdio.c.

Referenced by AP_HAL::panic().

Here is the caller graph for this function:

◆ vsnprintf()

int vsnprintf ( char *  str,
size_t  size,
const char *  fmt,
va_list  ap 
)

Definition at line 34 of file stdio.c.

Referenced by AP_HAL::Util::snprintf(), snprintf(), and vasprintf().

Here is the caller graph for this function:

Variable Documentation

◆ vprintf_console_hook

int(* vprintf_console_hook) (const char *fmt, va_list arg) = vprintf

Definition at line 111 of file stdio.c.

Referenced by ChibiOS::UARTDriver::begin(), and printf().