gpio: Add a function to get a pin number from mraa_gpio_context
Signed-off-by: Kenta Yonekura <yoneken@ieee.org> Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -183,6 +183,14 @@ class Gpio {
|
||||
mraa_result_t useMmap(bool enable) {
|
||||
return mraa_gpio_use_mmaped(m_gpio, (mraa_boolean_t) enable);
|
||||
}
|
||||
/**
|
||||
* Get pin number of Gpio
|
||||
*
|
||||
* @return Pin number
|
||||
*/
|
||||
int getPin() {
|
||||
return mraa_gpio_get_pin(m_gpio);
|
||||
}
|
||||
private:
|
||||
mraa_gpio_context m_gpio;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user