From: Nathael Pajani Date: Mon, 11 Mar 2013 17:13:15 +0000 (+0100) Subject: Declare sending buffer as constant. X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=a2ec532a7b4a5b3a1a5f4a8f4513e4c7e588b8ba;p=soft%2Flpc122x%2Fcore Declare sending buffer as constant. --- diff --git a/drivers/serial.c b/drivers/serial.c index b8d8406..ba11e77 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -37,7 +37,7 @@ struct uart_device uint32_t baudrate; /* Output buffer */ - volatile char* out_buff; + volatile const char* out_buff; volatile uint32_t sending; /* Actual sending position in out buffer */ volatile uint32_t out_lock; volatile uint32_t out_length; /* actual position to add in out buffer */ @@ -116,7 +116,7 @@ static void uart_start_sending(uint32_t uart_num) /***************************************************************************** */ /* Serial Write */ -int serial_write(uint32_t uart_num, char *buf, uint32_t length) +int serial_write(uint32_t uart_num, const char *buf, uint32_t length) { struct uart_device* uart = NULL; diff --git a/include/drivers/serial.h b/include/drivers/serial.h index f70a1a7..4ab049c 100644 --- a/include/drivers/serial.h +++ b/include/drivers/serial.h @@ -28,7 +28,7 @@ /***************************************************************************** */ /* Serial Write */ -int serial_write(uint32_t uart_num, char *buf, uint32_t length); +int serial_write(uint32_t uart_num, const char *buf, uint32_t length);