1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00
Files
esp8266/tools/sdk/lwip/include/lwip/app/espconn_buf.h
Ivan Grokhotkov ae13809c81 Update SDK to 2.0.0
- Update SDK header files and libraries to SDK 2.0.0 plus 2.0.0_16_08_09
  patch
- Remove mem_manager.o from libmain.a (replaced with umm_malloc)
- Disable switch from DIO to QIO mode for certain flash chips (saves
  IRAM space)
- Add user_rf_cal_sector_set; it points to rf_init_data sector.
- Change the way rf_init_data is spoofed.
  This is now done by wrapping spi_flash_read and returning the data we
  need during startup sequence.
- Place lwip library into flash using linker script instead of section
  attributes (saves IRAM space)
2017-02-03 04:21:20 +03:00

61 lines
1.2 KiB
C

/*
* ringbuf.h
*
* Created on: Apr 22, 2016
* Author: liuhan
*/
#ifndef _ESPCONN_BUF_H_
#define _ESPCONN_BUF_H_
/*
* ringbuffer.c
*
* Created on: Apr 22, 2016
* Author: liuhan
*/
#include "c_types.h"
#include "ets_sys.h"
#include "os_type.h"
typedef struct ringbuf_t {
uint8_t *buf;
uint8_t *head, *tail;
size_t size;
} ringbuf, *ringbuf_t;
ringbuf_t ringbuf_new(size_t capacity);
size_t ringbuf_buffer_size(const struct ringbuf_t *rb);
void ringbuf_reset(ringbuf_t rb);
void ringbuf_free(ringbuf_t *rb);
size_t ringbuf_capacity(const struct ringbuf_t *rb);
size_t ringbuf_bytes_free(const struct ringbuf_t *rb);
size_t ringbuf_bytes_used(const struct ringbuf_t *rb);
int ringbuf_is_full(const struct ringbuf_t *rb);
int ringbuf_is_empty(const struct ringbuf_t *rb);
const void* ringbuf_tail(const struct ringbuf_t *rb);
const void* ringbuf_head(const struct ringbuf_t *rb);
static uint8_t *ringbuf_nextp(ringbuf_t rb, const uint8_t *p);
size_t ringbuf_findchr(const struct ringbuf_t *rb, int c, size_t offset);
size_t ringbuf_memset(ringbuf_t dst, int c, size_t len);
void *ringbuf_memcpy_into(ringbuf_t dst, const void *src, size_t count);
void *ringbuf_memcpy_from(void *dst, ringbuf_t src, size_t count);
#endif /* RINGBUF_H_ */