HAL_Linux: UARTDriver, const device_path

Class member set to const and set_device_path
accepts a const char* now.
This commit is contained in:
Víctor Mayoral Vilches 2015-06-28 20:57:19 +02:00 committed by Andrew Tridgell
parent 790f4ec56c
commit 309511dc08
2 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ LinuxUARTDriver::LinuxUARTDriver(bool default_console) :
/*
set the tty device to use for this UART
*/
void LinuxUARTDriver::set_device_path(char *path)
void LinuxUARTDriver::set_device_path(const char *path)
{
device_path = path;
}

View File

@ -25,7 +25,7 @@ public:
size_t write(uint8_t c);
size_t write(const uint8_t *buffer, size_t size);
void set_device_path(char *path);
void set_device_path(const char *path);
virtual void _timer_tick(void);
@ -58,7 +58,7 @@ private:
uint64_t _last_write_time;
protected:
char *device_path;
const char *device_path;
volatile bool _initialised;
// we use in-task ring buffers to reduce the system call cost
// of ::read() and ::write() in the main loop