Xiang Xiao
4c167b0729
Correct the code alignment
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-01 21:22:21 -03:00
Huang Qi
3d4be7089c
drivers/serial/uart_16550: Fix warning for format
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-12-07 23:28:33 -06:00
Huang Qi
a24005b70b
drivers/serial: Fix offset calculation in 16550
...
Signed-off-by: Huang Qi <no1wudi@qq.com>
2021-12-05 07:02:40 -06:00
Xiang Xiao
2e54df0f35
Don't include assert.h from public header file
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-03 08:36:03 -07:00
Alin Jerpelea
e5b6305f4a
drivers: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-04 18:32:27 -08:00
zhongan
d5d6690ebc
drivers/serial/uart_16550.c: fix complie warning and writing style.
...
change argue type from 'uint32_t' to 'unsigned int' in fucntion
'u16550_receive'.
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-12-24 10:51:46 -06:00
Xiang Xiao
5c80b94820
Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
...
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao
6a3c2aded6
Fix wait loop and void cast ( #24 )
...
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Gregory Nutt
0d203fd535
drivers/serial: The upper half serial driver configuration CONFIG_SERIAL_DMA used to enable DMA on both RX and TX streams. This was replaced with CONFIG_SERIAL_RXDMA and CONFIG_SERIAKL_TXDMA which will permit supporting DMA on only one or both streams.
2019-04-24 12:11:40 -06:00
Gregory Nutt
7310fb7018
drivers/serial/uart_16550.c: Fix typo for UART1 flow field initialization
2019-01-27 10:57:41 -06:00
Xiang Xiao
c07ba1eac1
drivers/serial/uart_16550.c: Fix error: 'g_uart0port' undeclared.
2019-01-27 10:57:41 -06:00
ligd
5223d7a391
drivers/serial/uart_16550.c: Remove disabling of interrupts in up_earlyserialinit. up_irqinitialize() already disable all interrupts
2018-11-08 10:21:49 -06:00
zhangyuan7
a7d9d4bc1e
drivers/serial/uart_16550.c: Fox UART flow control issue. UART_MCR_RTS need be high even UART_MCR_AFCE is enabled
2018-11-08 10:21:16 -06:00
Gregory Nutt
8530fe0a7c
Update some comments.
2018-08-26 13:14:26 -06:00
Xiang Xiao
ead2c40cd4
Squashed commit of the following:
...
drivers/serial/uart_16550.c: Support 16550 auto hardware flow control
drivers/serial/uart_16550.c: Add configuration option CONFIG_16550_SUPRESS_INITIAL_CONFIG. This is identical to the standard configuration in arch/Kconfig CONFIG_SUPPRESS_UART_CONFIG, but with scope of only the 16550 driver.
2018-08-26 11:37:16 -06:00
anchao
fa08e69cca
drivers/serial/uart_16550.c: Add serial termios handling
2018-08-26 11:30:51 -06:00
Xiang Xiao
b426e35ed2
drivers/serial/uart_16550.c: Fix UART 16550 warning when disable HAVE_16550_CONSOLE.
2018-08-26 11:28:57 -06:00
ligd
1cbaae77cc
drivers/serial/uart_16550.c: Add stub implementations of DMA-related methods in the 16550 UART v-table.
2018-08-26 11:22:44 -06:00
Xiang Xiao
46e47c8dcf
Squashed commit of the following:
...
drivers/serial/uart_16550.c: Add a configuration, analogous to the STM32 configuration option, to suppress the NuttX standard re-ordering for /dev/ttySN for special case of the 16550 UART.
config/serial: UART 16550: Add CONFIG_SERIAL_UART_ARCH_MMIO option so the a memory mapped device doesn't need to provide uart_getreg() and uart_putreg() implementations.
u16550_txempty() should check UART_LSR_TEMT to avoid some data left in the transmit FIFO
2018-08-26 11:17:33 -06:00
Gregory Nutt
1567b82429
Make sure that labeling is used consistently in all function headers (part 2).
2018-02-01 12:03:55 -06:00
Gregory Nutt
8394f9b60f
Squashed commit of the following:
...
configs/z80sim and xtrs: Serial driver lower halfs ioctl methods should return a negated errno value, not set the errno variable.
drivers/wireless: CC1101 driver not permitted to set errno.
drivers/sensors: LIS331DL driver not permitted to set errno.
drivers/lcd: ILI9341 initialize method not permitted to set errno,
drivers/serial: 16550 UART driver IOCTL method must not set errno; it must return a negated errno value.
2017-09-30 12:59:33 -06:00
Gregory Nutt
e3c9e9e0b8
UART 16550: Missing left parenthesis in function prototype. This is Bitbucket Issue #41 .
2017-04-20 06:50:11 -06:00
Gregory Nutt
b4ff7391f8
Convert more drivers to use use irq_attach with argument.
2017-02-27 10:44:13 -06:00
Mark Schulte
b3222bbc8a
irq_dispatch: Add argument pointer to irq_dispatch
...
Provide a user defined callback context for irq's, such that when
registering a callback users can provide a pointer that will get
passed back when the isr is called.
2017-02-27 06:27:56 -06:00
Gregory Nutt
08c001196b
drivers/: Remove all explicit use of 'hidden' macro _info. Code must never use this directly. Code must always use a debug macro such as info which is basic on _info but can be appropriately filtered.
2017-01-15 13:00:50 -06:00
Heath Petersen
dc72e16625
handle when CONFIG_SERIAL_UART_ARCH_IOCTL is not enabled
2016-07-12 06:50:58 +00:00
Gregory Nutt
0c8c7fecf0
Add _ to the beginning of all debug macros to avoid name collisions
2016-06-16 12:33:32 -06:00
Gregory Nutt
efb02f2ef1
drivers/: Change some nerr() ERRORS to nwarn() WARNINGS. Anomolous network evernts are not errors.
2016-06-12 08:31:22 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Gregory Nutt
050f544782
Fix typo in variable name in serial BREAK logic. Review other serial implementations for similar naming problems.
2016-05-05 11:30:47 -06:00
Gregory Nutt
0fb035f76b
Standardize some naming in code section comments
2016-02-21 18:09:04 -06:00
Gregory Nutt
2244ed46bc
nuttx/drivers: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section()
2016-02-14 07:32:58 -06:00
Gregory Nutt
cf14f8d1b5
drivers/: Fixes to spacing and alignement
2015-10-10 10:41:00 -06:00
Gregory Nutt
0b12dbf95d
Fix some spacing problems
2015-10-04 15:04:00 -06:00
Anton D. Kachalov
1bb74504a8
Add support for custom platform IOCTL on UART
...
Signed-off-by: Anton D. Kachalov <mouse@yandex-team.ru>
2015-08-03 15:32:51 +03:00
Anton D. Kachalov
a07ed262b4
Revert "Two more places there THRE is used with inverted sense"
...
Signed-off-by: Anton D. Kachalov <mouse@yandex-team.ru>
2015-08-03 13:21:01 +03:00
Anton D. Kachalov
2fa6237b49
Revert THRNE-patch. The problem was in u16550_putc
...
Regarding to:
https://github.com/tanzilli/ariag25-linux-2.6.39/blob/ariag25/drivers/tty/serial/8250.c#L1584
https://github.com/tanzilli/ariag25-linux-2.6.39/blob/ariag25/drivers/tty/serial/8250.c#L1913
When UART_LSR_THRE bit is set, then we ready to transmit more.
Current u16550_putc loops while UART_LSR_THRE bit is set. This logic have to be inverted.
Signed-off-by: Anton D. Kachalov <mouse@yandex-team.ru>
2015-08-03 13:19:55 +03:00
Anton D. Kachalov
274b7986be
[drivers/serial/uart_16550] Typo fix in data bits setup
...
Signed-off-by: Anton D. Kachalov <mouse@yandex-team.ru>
2015-07-31 20:19:54 +03:00
Gregory Nutt
fb82061bf7
Two more places there THRE is used with inverted sense
2015-07-29 20:42:49 -06:00
Gregory Nutt
8935ff34d5
16550 UART Driver: Add a configuration option to indicate the the THR empty bit is inverted. This is the the case for the moxART SoC. Based comments from Anton D. Kachalov
2015-07-29 16:31:21 -06:00
Gregory Nutt
7594d8b8cf
Add serial method so that lower half driver can provide RX flow control information. From Jussi Kivilinna
2014-05-08 09:00:33 -06:00
Gregory Nutt
b630e6a153
Useless TIOCSERGSTRUCT logic in most serial drivers is not compiled unless CONFIG_DEBUG and CONFIG_SERIAL_TIOCSERGSTRUCT are defined
2013-04-25 15:52:48 -06:00
patacongo
d621681866
Some NuTiny-SDK-NUC120 size reduction; All serial driver vtables should be static const
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5683 42af7a65-404d-4744-a932-0658087f49c3
2013-02-27 22:24:49 +00:00
patacongo
08ef9d0367
Add Kconfig settings for the LPC17xx
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5094 42af7a65-404d-4744-a932-0658087f49c3
2012-09-05 17:20:19 +00:00
patacongo
5b7341f5db
drivers/, drivers/pipes, and drivers/serial file clean-up
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4944 42af7a65-404d-4744-a932-0658087f49c3
2012-07-15 14:56:25 +00:00
patacongo
34b7ebdf68
Move serial header files to include/nuttx/serial
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4500 42af7a65-404d-4744-a932-0658087f49c3
2012-03-21 19:47:23 +00:00
patacongo
2fe4ad52f8
Move file-system header files to include/nuttx/fs
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4499 42af7a65-404d-4744-a932-0658087f49c3
2012-03-21 18:01:07 +00:00
patacongo
ee04a259db
ADS7843E driver is code complete
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4018 42af7a65-404d-4744-a932-0658087f49c3
2011-10-04 17:08:59 +00:00
patacongo
a3c96a8df6
Add QEMU NSH configuration
...
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3358 42af7a65-404d-4744-a932-0658087f49c3
2011-03-10 04:13:44 +00:00