From: Nathael Pajani Date: Fri, 14 Aug 2015 15:09:51 +0000 (+0200) Subject: Updated comments X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=5f22cdc02cc192da918ad3790b99e2618126663c;p=soft%2Flpc122x%2Fcore Updated comments --- 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