mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-02-28 03:44:30 +03:00
Working (but still dev-mode; need some more different configurators)
This commit is contained in:
@@ -25,12 +25,14 @@
|
||||
#include <stm32f3.h>
|
||||
#endif
|
||||
|
||||
#include <stdatomic.h>
|
||||
|
||||
typedef struct{
|
||||
uint8_t *data; // data buffer
|
||||
const int length; // its length
|
||||
int head; // head index
|
||||
int tail; // tail index
|
||||
volatile int busy; // == TRUE if buffer is busy now
|
||||
volatile atomic_int busy; // == TRUE if buffer is busy now
|
||||
} ringbuffer;
|
||||
|
||||
int RB_read(ringbuffer *b, uint8_t *s, int len);
|
||||
|
||||
Reference in New Issue
Block a user