[bluetrum] Remove unnecessary comments

This commit is contained in:
greedyhao 2021-11-08 09:58:25 +08:00
parent 6a975ff9ed
commit 8e0c469d0c
2 changed files with 2 additions and 5 deletions

View File

@ -33,7 +33,6 @@ int btctrl_mem_init(void)
uint32_t block_size; uint32_t block_size;
bthw_get_heap_info(&heap_buf, &heap_size_buf, &block_size); bthw_get_heap_info(&heap_buf, &heap_size_buf, &block_size);
// rt_kprintf("heap_buf=0x%p heap_size_buf=0x%p block_size=0x%p\n", heap_buf, heap_size_buf, block_size);
nsmem_cb_init(heap_buf, heap_size_buf, block_size); nsmem_cb_init(heap_buf, heap_size_buf, block_size);
return 0; return 0;
} }

View File

@ -156,7 +156,6 @@ void cache_init(void)
RT_SECTION(".irq.cache") RT_SECTION(".irq.cache")
void os_spiflash_lock(void) void os_spiflash_lock(void)
{ {
// if (rt_thread_self()->stat == RT_THREAD_RUNNING) {
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0)) { if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0)) {
rt_mutex_take(&mutex_spiflash, RT_WAITING_FOREVER); rt_mutex_take(&mutex_spiflash, RT_WAITING_FOREVER);
} }
@ -165,7 +164,6 @@ void os_spiflash_lock(void)
RT_SECTION(".irq.cache") RT_SECTION(".irq.cache")
void os_spiflash_unlock(void) void os_spiflash_unlock(void)
{ {
// if (rt_thread_self()->stat == RT_THREAD_RUNNING) {
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0)) { if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0)) {
rt_mutex_release(&mutex_spiflash); rt_mutex_release(&mutex_spiflash);
} }
@ -174,7 +172,6 @@ void os_spiflash_unlock(void)
RT_SECTION(".irq.cache") RT_SECTION(".irq.cache")
void os_cache_lock(void) void os_cache_lock(void)
{ {
// if (rt_thread_self()->stat == RT_THREAD_RUNNING) {
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0)) { if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0)) {
rt_mutex_take(&mutex_cache, RT_WAITING_FOREVER); rt_mutex_take(&mutex_cache, RT_WAITING_FOREVER);
} }
@ -183,7 +180,6 @@ void os_cache_lock(void)
RT_SECTION(".irq.cache") RT_SECTION(".irq.cache")
void os_cache_unlock(void) void os_cache_unlock(void)
{ {
// if (rt_thread_self()->stat == RT_THREAD_RUNNING) {
if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0)) { if ((rt_thread_self() != RT_NULL) && (rt_interrupt_nest == 0)) {
rt_mutex_release(&mutex_cache); rt_mutex_release(&mutex_cache);
} }
@ -200,6 +196,8 @@ void rt_hw_console_output(const char *str)
/** /**
* @brief print exception error * @brief print exception error
* @note Every message needed to print, must put in .comm exction. * @note Every message needed to print, must put in .comm exction.
* @note (IRQ in Flash: %x %x - %x %x\n, -, rt_interrupt_nest, PC, miss_addr)
* miss_addr: The address in map file minus 0x10000000
*/ */
RT_SECTION(".irq.err") RT_SECTION(".irq.err")
void exception_isr(void) void exception_isr(void)