diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-04-08 15:04:10 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-04-08 15:04:10 -0600 |
commit | 02c33f66c5a8be774034cd40e4125e9323c7b4d8 (patch) | |
tree | 17431cf009015b3059bec4ca7b99a0f1682f4658 /nuttx/arch | |
parent | 2df0b62e8383f86c101f2ebc9ca34a252bce7052 (diff) | |
download | px4-nuttx-02c33f66c5a8be774034cd40e4125e9323c7b4d8.tar.gz px4-nuttx-02c33f66c5a8be774034cd40e4125e9323c7b4d8.tar.bz2 px4-nuttx-02c33f66c5a8be774034cd40e4125e9323c7b4d8.zip |
SAM3/4 and SAMV7 UART: The IMR register is read-only. This means that sam_restoreints() does not actually re-enable UART interrupts.
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/arm/src/sam34/sam_lowputc.c | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/sam34/sam_serial.c | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/samv7/sam_lowputc.c | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/samv7/sam_serial.c | 2 |
4 files changed, 2 insertions, 6 deletions
diff --git a/nuttx/arch/arm/src/sam34/sam_lowputc.c b/nuttx/arch/arm/src/sam34/sam_lowputc.c index 9c7636c41..dbacb110d 100644 --- a/nuttx/arch/arm/src/sam34/sam_lowputc.c +++ b/nuttx/arch/arm/src/sam34/sam_lowputc.c @@ -299,8 +299,6 @@ void up_lowputc(char ch) /* Send the character */ putreg32((uint32_t)ch, SAM_CONSOLE_BASE + SAM_UART_THR_OFFSET); - irqrestore(flags); - return; } irqrestore(flags); diff --git a/nuttx/arch/arm/src/sam34/sam_serial.c b/nuttx/arch/arm/src/sam34/sam_serial.c index e2f2dfa57..b2f98a582 100644 --- a/nuttx/arch/arm/src/sam34/sam_serial.c +++ b/nuttx/arch/arm/src/sam34/sam_serial.c @@ -652,7 +652,7 @@ static inline void up_restoreusartint(struct up_dev_s *priv, uint32_t imr) { /* Restore the previous interrupt state */ - up_serialout(priv, SAM_UART_IMR_OFFSET, imr); + up_serialout(priv, SAM_UART_IER_OFFSET, imr); } /**************************************************************************** diff --git a/nuttx/arch/arm/src/samv7/sam_lowputc.c b/nuttx/arch/arm/src/samv7/sam_lowputc.c index b78a5f919..0c9b74baa 100644 --- a/nuttx/arch/arm/src/samv7/sam_lowputc.c +++ b/nuttx/arch/arm/src/samv7/sam_lowputc.c @@ -226,8 +226,6 @@ void up_lowputc(char ch) /* Send the character */ putreg32((uint32_t)ch, SAM_CONSOLE_BASE + SAM_UART_THR_OFFSET); - irqrestore(flags); - return; } irqrestore(flags); diff --git a/nuttx/arch/arm/src/samv7/sam_serial.c b/nuttx/arch/arm/src/samv7/sam_serial.c index 9618ee188..896fcd405 100644 --- a/nuttx/arch/arm/src/samv7/sam_serial.c +++ b/nuttx/arch/arm/src/samv7/sam_serial.c @@ -712,7 +712,7 @@ static inline void sam_restoreusartint(struct sam_dev_s *priv, uint32_t imr) { /* Restore the previous interrupt state */ - sam_serialout(priv, SAM_UART_IMR_OFFSET, imr); + sam_serialout(priv, SAM_UART_IER_OFFSET, imr); } /**************************************************************************** |