uart: make mraa_uart_get_dev_path return const char*
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -125,7 +125,7 @@ mraa_result_t mraa_uart_set_timeout(mraa_uart_context dev, int read, int write,
|
|||||||
* @param dev uart context
|
* @param dev uart context
|
||||||
* @return char pointer of device path
|
* @return char pointer of device path
|
||||||
*/
|
*/
|
||||||
char* mraa_uart_get_dev_path(mraa_uart_context dev);
|
const char* mraa_uart_get_dev_path(mraa_uart_context dev);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy a mraa_uart_context
|
* Destroy a mraa_uart_context
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ struct _aio {
|
|||||||
struct _uart {
|
struct _uart {
|
||||||
/*@{*/
|
/*@{*/
|
||||||
int index; /**< the uart index, as known to the os. */
|
int index; /**< the uart index, as known to the os. */
|
||||||
char* path; /**< the uart device path. */
|
const char* path; /**< the uart device path. */
|
||||||
int fd; /**< file descriptor for device. */
|
int fd; /**< file descriptor for device. */
|
||||||
/*@}*/
|
/*@}*/
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -404,7 +404,7 @@ mraa_uart_set_timeout(mraa_uart_context dev, int read, int write, int interchar)
|
|||||||
return MRAA_ERROR_FEATURE_NOT_IMPLEMENTED;
|
return MRAA_ERROR_FEATURE_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
const char*
|
||||||
mraa_uart_get_dev_path(mraa_uart_context dev)
|
mraa_uart_get_dev_path(mraa_uart_context dev)
|
||||||
{
|
{
|
||||||
if (!dev) {
|
if (!dev) {
|
||||||
|
|||||||
Reference in New Issue
Block a user