summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorZYH <[email protected]>2018-03-28 10:10:39 +0800
committerZYH <[email protected]>2018-03-28 10:10:39 +0800
commit26119affdf381f83a25b3e2d482e0d9aafb8390a (patch)
treed05f2b07c7f0646b21850a1f7e344d7b7d29a271 /components
parente04c3cecc8f43d892fca33669f566abff7e455af (diff)
parentc6a5a2a3864e54d773afd207f3da7d159415d151 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'components')
-rw-r--r--components/drivers/audio/audio.c4
-rw-r--r--components/drivers/src/ringbuffer.c5
-rw-r--r--components/finsh/Kconfig4
-rw-r--r--components/finsh/shell.c4
4 files changed, 16 insertions, 1 deletions
diff --git a/components/drivers/audio/audio.c b/components/drivers/audio/audio.c
index 66d9557d46..87bb726058 100644
--- a/components/drivers/audio/audio.c
+++ b/components/drivers/audio/audio.c
@@ -294,6 +294,10 @@ static rt_size_t _audio_dev_write(struct rt_device *dev, rt_off_t pos, const voi
_audio_send_replay_frame(audio);
}
+ else
+ {
+ rt_hw_interrupt_enable(level);
+ }
return size;
}
diff --git a/components/drivers/src/ringbuffer.c b/components/drivers/src/ringbuffer.c
index baeeea0e50..48bf590f8c 100644
--- a/components/drivers/src/ringbuffer.c
+++ b/components/drivers/src/ringbuffer.c
@@ -119,8 +119,11 @@ rt_size_t rt_ringbuffer_put_force(struct rt_ringbuffer *rb,
space_length = rt_ringbuffer_space_len(rb);
- if (length > space_length)
+ if (length > rb->buffer_size)
+ {
+ ptr = &ptr[length - rb->buffer_size];
length = rb->buffer_size;
+ }
if (rb->buffer_size - rb->write_index > length)
{
diff --git a/components/finsh/Kconfig b/components/finsh/Kconfig
index f36c73e1fb..610db05eb6 100644
--- a/components/finsh/Kconfig
+++ b/components/finsh/Kconfig
@@ -26,6 +26,10 @@ config FINSH_USING_DESCRIPTION
bool "Keeping description in symbol table"
default y
+config FINSH_ECHO_DISABLE_DEFAULT
+ bool "Disable the echo mode in default"
+ default n
+
config FINSH_THREAD_PRIORITY
int "The priority level value of finsh thread"
default 20
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index fc13a92b13..ea68a57ffa 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -414,7 +414,11 @@ void finsh_thread_entry(void *parameter)
char ch;
/* normal is echo mode */
+#ifndef FINSH_ECHO_DISABLE_DEFAULT
shell->echo_mode = 1;
+#else
+ shell->echo_mode = 0;
+#endif
#ifndef FINSH_USING_MSH_ONLY
finsh_init(&shell->parser);