Private
Public Access
2
0

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:
Jan Kiszka
2021-09-13 08:33:54 +02:00
committed by Tom Ingleby
parent 96472d1065
commit 8185e983e1
4 changed files with 13 additions and 4 deletions

View File

@@ -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
*

View File

@@ -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