gpio: Silence own use of deprecated mraa_gpio_use_mmaped
The warning is aiming at external use, not our own one. Silence the latter by adding an internal service that the deprecated function calls and use that service in the remaining mraa use cases. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
@@ -288,6 +288,9 @@ mraa_result_t mraa_gpio_owner(mraa_gpio_context dev, mraa_boolean_t owner);
|
||||
*/
|
||||
DEPRECATED mraa_result_t mraa_gpio_use_mmaped(mraa_gpio_context dev, mraa_boolean_t mmap);
|
||||
|
||||
/* remaining internal use only */
|
||||
mraa_result_t mraa_gpio_use_mmaped_internal(mraa_gpio_context dev, mraa_boolean_t mmap);
|
||||
|
||||
/**
|
||||
* Get a pin number of the gpio, invalid will return -1
|
||||
*
|
||||
|
||||
@@ -327,7 +327,7 @@ class Gpio
|
||||
Result
|
||||
useMmap(bool enable)
|
||||
{
|
||||
return (Result) mraa_gpio_use_mmaped(m_gpio, (mraa_boolean_t) enable);
|
||||
return (Result) mraa_gpio_use_mmaped_internal(m_gpio, (mraa_boolean_t) enable);
|
||||
}
|
||||
/**
|
||||
* Get pin number of Gpio. If raw param is True will return the
|
||||
|
||||
Reference in New Issue
Block a user