ringbuffer: Make ring buffer access irq-save

We have to temporarily disable nterrupts when performing rinbuffer
operations, as the ring buffer is used both from IRQ as well as process
context.
This commit is contained in:
Harald Welte
2016-03-03 17:48:32 +01:00
parent 7dd3dfd992
commit 7abdb51f8f
7 changed files with 61 additions and 16 deletions

View File

@@ -129,8 +129,6 @@ uint32_t ISO7816_SendChar( uint8_t CharToSend, Usart_info *usart )
Usart *us_base = usart->base;
uint32_t us_id = usart->id;
TRACE_DEBUG("***Send char: 0x%X\n\r", CharToSend);
if( usart->state == USART_RCV ) {
us_base->US_CR = US_CR_RSTSTA | US_CR_RSTIT | US_CR_RSTNACK;
usart->state = USART_SEND;