Seeed Grove ++  v0.0.1-2019
Linux C++ Library For Seeed Grove Devices
seeedgrove.cpp File Reference
#include "sg++.hpp"
#include <iostream>
#include <iomanip>
#include <thread>
#include <typeinfo>
#include <csignal>
#include <cstring>
#include <system_error>
#include <cmath>
Include dependency graph for seeedgrove.cpp:

Typedefs

typedef std::vector< std::string > VStr
 

Functions

void list (const SG::VGroveTypes &v)
 
void list_all (void)
 
void list_detect (void)
 
void list_addresses (void)
 
void sg_fatal_signal_handler (int sig_num, siginfo_t *sig_info, void *context)
 
void sg_normal_signal_handler (int sig_num, siginfo_t *sig_info, void *context)
 
void setup_signal_handling (void)
 
void chainable_rgb_led (const VStr &args)
 
void buzzer (const VStr &args)
 
void temperature (const VStr &args)
 
void compass (const VStr &args)
 
void bb_detect (const VStr &args)
 
void bb_led (const VStr &args)
 
void bb_watchdog (const VStr &args)
 
void bb_usb (const VStr &args)
 
void common_oled (SG::CommonOLED &oled, const VStr &args)
 
void oled112 (const VStr &args)
 
void oled096 (const VStr &args)
 
void ledbar (const VStr &args)
 
void button (const VStr &args)
 
void variable_led (const VStr &args)
 
void show_help (void)
 
int seeedgrove_example_application (int argc, char **argv)
 
int main (int argc, char **argv)
 

Variables

volatile sig_atomic_t exit_signal_detected = 0
 

Typedef Documentation

typedef std::vector<std::string> VStr

Function Documentation

void bb_led ( const VStr args)

References exit_signal_detected, SG::BeagleBone::LEDControl::load_random_pattern(), and SG::BeagleBone::LEDControl::start_blink_thread().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void bb_usb ( const VStr args)

References SG::BeagleBone::USB::toggle(), SG::BeagleBone::USB::turn_off(), and SG::BeagleBone::USB::turn_on().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void button ( const VStr args)

References exit_signal_detected, SG::Button::is_up(), SG::Button::wait_for_button_down(), and SG::Button::wait_for_button_up().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void buzzer ( const VStr args)

References exit_signal_detected, SG::GroveBase::get_description(), SG::Buzzer::turn_off(), and SG::Buzzer::turn_on().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void chainable_rgb_led ( const VStr args)

References exit_signal_detected, SG::GroveBase::get_description(), SG::ChainableRGBLED::set_RGB(), and SG::ChainableRGBLED::start_pulse_thread().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void ledbar ( const VStr args)

References SG::LEDBar::all_off(), and SG::LEDBar::all_on().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void list ( const SG::VGroveTypes v)

References SG::get_grove_type_name_map(), and SG::get_sku_from_grove_type().

Referenced by list_addresses(), list_all(), and list_detect().

Here is the call graph for this function:

Here is the caller graph for this function:

void list_addresses ( void  )

References list().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void list_all ( void  )

References SG::get_grove_type_name_map(), and list().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void list_detect ( void  )

References SG::detect(), and list().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)
void oled096 ( const VStr args)

References common_oled().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void oled112 ( const VStr args)

References common_oled().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

int seeedgrove_example_application ( int  argc,
char **  argv 
)

References bb_detect(), bb_led(), bb_usb(), bb_watchdog(), button(), buzzer(), chainable_rgb_led(), compass(), SG::SGpp::get(), SG::SGpp::initialize(), ledbar(), list_addresses(), list_all(), list_detect(), oled096(), oled112(), show_help(), temperature(), and variable_led().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void setup_signal_handling ( void  )

References sg_fatal_signal_handler(), and sg_normal_signal_handler().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void sg_fatal_signal_handler ( int  sig_num,
siginfo_t *  sig_info,
void *  context 
)

References SG::SGpp::cleanup(), exit_signal_detected, and SG::SGpp::get().

Referenced by setup_signal_handling().

Here is the call graph for this function:

Here is the caller graph for this function:

void sg_normal_signal_handler ( int  sig_num,
siginfo_t *  sig_info,
void *  context 
)

References exit_signal_detected.

Referenced by setup_signal_handling().

Here is the caller graph for this function:

void show_help ( void  )

Referenced by seeedgrove_example_application().

Here is the caller graph for this function:

void temperature ( const VStr args)

References SG::I2CADC::enable_automatic_mode(), SG::TemperatureSensor::get_celsius(), and SG::GroveBase::get_description().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

void variable_led ( const VStr args)

References exit_signal_detected, SG::GroveBase::get_description(), SG::VariableColorLED::turn_off(), and SG::VariableColorLED::turn_on().

Referenced by seeedgrove_example_application().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation