Base class for Groves that use the UART (Universal Asynchronous Receiver/Transmitter) interface. More...
#include <sg_GroveUART.hpp>


Public Member Functions | |
| GroveUART (const SG::EGroveType t=SG::EGroveType::kUnknown, const std::string &n="") | |
| Constructor. More... | |
| virtual | ~GroveUART (void) |
| Destructor. More... | |
| virtual bool | is_grove_uart (void) const |
| Determine if this is a Grove UART device. More... | |
| virtual bool | is_grove_i2c (void) const |
| Determine if this is a Grove I2C device. More... | |
| virtual bool | is_grove_gpio (void) const |
| Determine if this is a Grove GPIO device. More... | |
| virtual uint32_t | get_sku (void) const |
| Return a guess as to the Seeed SKU number based on the grove type. More... | |
| virtual std::string | get_type_name (void) const |
| Return a short text string representing the grove type. More... | |
| virtual EGroveType | get_type (void) const |
| Return the grove type. More... | |
| virtual std::string | get_name (void) const |
| Return the user-supplied name. More... | |
| virtual std::string | get_description (void) const |
| Return a multi-word 1-line description of this object. More... | |
| bool | operator== (const GroveBase &rhs) const |
| Test object equality. More... | |
| bool | operator!= (const GroveBase &rhs) const |
| Test object equality. More... | |
Public Attributes | |
| EGroveType | grove_type |
| Grove type. More... | |
| std::string | grove_name |
| User-supplied name. More... | |
Base class for Groves that use the UART (Universal Asynchronous Receiver/Transmitter) interface.
When looking at the top of a BeagleBone Green with the network interface towards the top and the Grove interfaces at the bottom, this is the right-hand-side Grove interface labelled J5. On the board, you'll also see the labels RXD, TXD, 3V3, and GND.
The other interface called J4 on the left side is the I2C Grove interface.
| SG::GroveUART::GroveUART | ( | const SG::EGroveType | t = SG::EGroveType::kUnknown, |
| const std::string & | n = "" |
||
| ) |
Constructor.
|
virtual |
Destructor.
|
virtualinherited |
Return a multi-word 1-line description of this object.
References SG::demangle(), SG::GroveBase::get_name(), SG::GroveBase::get_sku(), SG::GroveBase::get_type_name(), SG::GroveBase::is_grove_gpio(), SG::GroveBase::is_grove_i2c(), SG::GroveBase::is_grove_uart(), and SG::BeagleBone::Detect::to_string().
Referenced by buzzer(), chainable_rgb_led(), common_oled(), SG::GroveBase::get_name(), SG::GroveI2CDigital::GroveI2CDigital(), SG::CommonOLED::set_display_bitmap(), SG::CommonOLED::set_orientation(), temperature(), variable_led(), and SG::GroveI2CDigital::write_block().


|
inlinevirtualinherited |
Return the user-supplied name.
References SG::GroveBase::get_description(), SG::GroveBase::grove_name, SG::GroveBase::is_grove_gpio(), SG::GroveBase::is_grove_i2c(), and SG::GroveBase::is_grove_uart().
Referenced by SG::GroveBase::get_description(), SG::GroveBase::operator=(), and SG::GroveBase::operator==().


|
inlinevirtualinherited |
Return a guess as to the Seeed SKU number based on the grove type.
References SG::get_sku_from_grove_type(), and SG::GroveBase::grove_type.
Referenced by SG::GroveBase::get_description().


|
inlinevirtualinherited |
Return the grove type.
References SG::GroveBase::grove_type.
Referenced by SG::GroveI2CDigital::get_address_from_type(), SG::GroveBase::operator=(), and SG::GroveBase::operator==().

|
inlinevirtualinherited |
Return a short text string representing the grove type.
References SG::GroveBase::grove_type, and SG::to_string().
Referenced by SG::GroveBase::get_description().


|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlineinherited |
Test object equality.
References SG::GroveBase::operator==().

|
inherited |
Test object equality.
References SG::GroveBase::get_name(), and SG::GroveBase::get_type().
Referenced by SG::GroveBase::operator!=(), SG::Buzzer::operator==(), SG::TemperatureAndHumiditySensor::operator==(), SG::TemperatureSensor::operator==(), and SG::I2CADC::operator==().


|
inherited |
User-supplied name.
Referenced by SG::GroveBase::get_name(), and SG::GroveBase::operator=().
|
inherited |
Grove type.
Referenced by SG::GroveBase::get_sku(), SG::GroveBase::get_type(), SG::GroveBase::get_type_name(), and SG::GroveBase::operator=().