Seeed Grove ++  v0.0.1-2386
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

◆ VStr

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

Function Documentation

◆ bb_detect()

◆ bb_led()

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:

◆ bb_usb()

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:

◆ bb_watchdog()

◆ button()

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:

◆ buzzer()

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:

◆ chainable_rgb_led()

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:

◆ common_oled()

◆ compass()

◆ ledbar()

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:

◆ list()

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:

◆ list_addresses()

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:

◆ list_all()

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:

◆ list_detect()

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:

◆ main()

int main ( int  argc,
char **  argv 
)

◆ oled096()

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:

◆ oled112()

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:

◆ seeedgrove_example_application()

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:

◆ setup_signal_handling()

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:

◆ sg_fatal_signal_handler()

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:

◆ sg_normal_signal_handler()

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:

◆ show_help()

void show_help ( void  )

Referenced by seeedgrove_example_application().

Here is the caller graph for this function:

◆ temperature()

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:

◆ variable_led()

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

◆ exit_signal_detected