drivers: i2s: Rename struct ring_buf -> struct ring_buffer
The struct ring_buf is renamed to struct ring_buffer to be able to coexist with the sys/ring_buffer.h header file. Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
This commit is contained in:
parent
4772bfe710
commit
62ddd5fe79
5 changed files with 13 additions and 13 deletions
|
|
@ -260,7 +260,7 @@ static void i2s_copy_to_fifo(uint8_t *src, size_t size, int sample_width,
|
|||
/*
|
||||
* Get data from the queue
|
||||
*/
|
||||
static int queue_get(struct ring_buf *rb, void **mem_block, size_t *size)
|
||||
static int queue_get(struct ring_buffer *rb, void **mem_block, size_t *size)
|
||||
{
|
||||
unsigned int key;
|
||||
|
||||
|
|
@ -282,7 +282,7 @@ static int queue_get(struct ring_buf *rb, void **mem_block, size_t *size)
|
|||
/*
|
||||
* Put data in the queue
|
||||
*/
|
||||
static int queue_put(struct ring_buf *rb, void *mem_block, size_t size)
|
||||
static int queue_put(struct ring_buffer *rb, void *mem_block, size_t size)
|
||||
{
|
||||
uint16_t head_next;
|
||||
unsigned int key;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ struct queue_item {
|
|||
};
|
||||
|
||||
/* Minimal ring buffer implementation */
|
||||
struct ring_buf {
|
||||
struct ring_buffer {
|
||||
struct queue_item *buf;
|
||||
uint16_t len;
|
||||
uint16_t head;
|
||||
|
|
@ -81,7 +81,7 @@ struct stream {
|
|||
int32_t state;
|
||||
struct k_sem sem;
|
||||
struct i2s_config cfg;
|
||||
struct ring_buf mem_block_queue;
|
||||
struct ring_buffer mem_block_queue;
|
||||
void *mem_block;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ static unsigned int div_round_closest(uint32_t dividend, uint32_t divisor)
|
|||
return (dividend + (divisor / 2U)) / divisor;
|
||||
}
|
||||
|
||||
static bool queue_is_empty(struct ring_buf *rb)
|
||||
static bool queue_is_empty(struct ring_buffer *rb)
|
||||
{
|
||||
unsigned int key;
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ static bool queue_is_empty(struct ring_buf *rb)
|
|||
/*
|
||||
* Get data from the queue
|
||||
*/
|
||||
static int queue_get(struct ring_buf *rb, void **mem_block, size_t *size)
|
||||
static int queue_get(struct ring_buffer *rb, void **mem_block, size_t *size)
|
||||
{
|
||||
unsigned int key;
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ static int queue_get(struct ring_buf *rb, void **mem_block, size_t *size)
|
|||
/*
|
||||
* Put data in the queue
|
||||
*/
|
||||
static int queue_put(struct ring_buf *rb, void *mem_block, size_t size)
|
||||
static int queue_put(struct ring_buffer *rb, void *mem_block, size_t size)
|
||||
{
|
||||
uint16_t head_next;
|
||||
unsigned int key;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ struct queue_item {
|
|||
};
|
||||
|
||||
/* Minimal ring buffer implementation */
|
||||
struct ring_buf {
|
||||
struct ring_buffer {
|
||||
struct queue_item *buf;
|
||||
uint16_t len;
|
||||
uint16_t head;
|
||||
|
|
@ -44,7 +44,7 @@ struct stream {
|
|||
bool tx_stop_for_drain;
|
||||
|
||||
struct i2s_config cfg;
|
||||
struct ring_buf mem_block_queue;
|
||||
struct ring_buffer mem_block_queue;
|
||||
void *mem_block;
|
||||
bool last_block;
|
||||
bool master;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ struct queue_item {
|
|||
};
|
||||
|
||||
/* Minimal ring buffer implementation */
|
||||
struct ring_buf {
|
||||
struct ring_buffer {
|
||||
struct queue_item *buf;
|
||||
uint16_t len;
|
||||
uint16_t head;
|
||||
|
|
@ -83,7 +83,7 @@ struct stream {
|
|||
uint8_t word_size_bytes;
|
||||
bool last_block;
|
||||
struct i2s_config cfg;
|
||||
struct ring_buf mem_block_queue;
|
||||
struct ring_buffer mem_block_queue;
|
||||
void *mem_block;
|
||||
int (*stream_start)(struct stream *, Ssc *const,
|
||||
const struct device *);
|
||||
|
|
@ -113,7 +113,7 @@ static void tx_stream_disable(struct stream *, Ssc *const,
|
|||
/*
|
||||
* Get data from the queue
|
||||
*/
|
||||
static int queue_get(struct ring_buf *rb, void **mem_block, size_t *size)
|
||||
static int queue_get(struct ring_buffer *rb, void **mem_block, size_t *size)
|
||||
{
|
||||
unsigned int key;
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ static int queue_get(struct ring_buf *rb, void **mem_block, size_t *size)
|
|||
/*
|
||||
* Put data in the queue
|
||||
*/
|
||||
static int queue_put(struct ring_buf *rb, void *mem_block, size_t size)
|
||||
static int queue_put(struct ring_buffer *rb, void *mem_block, size_t size)
|
||||
{
|
||||
uint16_t head_next;
|
||||
unsigned int key;
|
||||
|
|
|
|||
Loading…
Reference in a new issue