Working (but still dev-mode; need some more different configurators)

This commit is contained in:
2025-04-02 18:26:02 +03:00
parent c449cb7108
commit faeac98318
18 changed files with 476 additions and 95 deletions

View File

@@ -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);