From 5f22cdc02cc192da918ad3790b99e2618126663c Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Fri, 14 Aug 2015 17:09:51 +0200 Subject: [PATCH] Updated comments --- drivers/serial.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/serial.c b/drivers/serial.c index 8675e0d..5730b9d 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -47,6 +47,7 @@ struct uart_device /* Output buffer */ volatile char 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; volatile uint32_t out_length; /* actual position to add in out buffer */ @@ -179,6 +180,11 @@ int serial_write(uint32_t uart_num, const char *buf, uint32_t length) return length; } + + +/***************************************************************************** */ +/* UART Setup : private part : Clocks, Pins, Power and Mode */ + struct uart_clk_cfg { uint32_t baudrate; uint8_t divisor_latch_lsb; @@ -190,9 +196,6 @@ static struct uart_clk_cfg uart_clk_table[] = { { 0, 0, 0, 0, }, }; -/***************************************************************************** */ -/* UART Setup : private part : Clocks, Pins, Power and Mode */ - /* UART Clock Setup */ /* Note : for both uarts we use full peripheral clock. * With a minimum main clock of 12MHz, ths gives 12MHz/16 = 750kbauds at least -- 2.43.0