Fix types in serial driver
authorNathael Pajani <nathael.pajani@ed3l.fr>
Sat, 13 May 2017 01:46:04 +0000 (03:46 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Sat, 13 May 2017 01:46:04 +0000 (03:46 +0200)
drivers/serial.c

index 6047398..47dd72c 100644 (file)
@@ -47,7 +47,7 @@ struct uart_device
        uint8_t current_mode;
 
        /* Output buffer */
-       volatile char out_buff[SERIAL_OUT_BUFF_SIZE];
+       volatile uint8_t out_buff[SERIAL_OUT_BUFF_SIZE];
        volatile uint32_t sending; /* Actual sending position in out buffer */
        /* This lock only prevents multiple calls to serial_write() to execute simultaneously */
        volatile uint32_t out_lock;
@@ -222,7 +222,7 @@ int serial_write(uint32_t uart_num, const char *buf, uint32_t length)
        if (length > SERIAL_OUT_BUFF_SIZE) {
                length = SERIAL_OUT_BUFF_SIZE;
        }
-       memcpy((char*)uart->out_buff, buf, length);
+       memcpy((void*)uart->out_buff, buf, length);
        uart->out_length = length;
 
        /* Turn output on */