|
|
@@ -5,7 +5,7 @@
|
|
|
static int circle_get_write_space(c_buffer_t *cbuff);
|
|
|
static int circle_get_read_space(c_buffer_t *cbuff);
|
|
|
|
|
|
-void circle_buffer_init(c_buffer_t *cbuff, char *buffer, int16_t max_len){
|
|
|
+void circle_buffer_init(c_buffer_t *cbuff, uint8_t *buffer, int16_t max_len){
|
|
|
cbuff->buffer = buffer;
|
|
|
cbuff->buffer_len = max_len;
|
|
|
}
|
|
|
@@ -15,7 +15,7 @@ void circle_reset(c_buffer_t *cbuff){
|
|
|
}
|
|
|
|
|
|
|
|
|
-int circle_put_data(c_buffer_t *cbuff, char *data, int16_t len){
|
|
|
+int circle_put_data(c_buffer_t *cbuff, uint8_t *data, int16_t len){
|
|
|
int16_t size = circle_get_write_space(cbuff);
|
|
|
int16_t w_len = len;
|
|
|
int16_t w1_len = len;
|
|
|
@@ -41,7 +41,7 @@ int circle_put_data(c_buffer_t *cbuff, char *data, int16_t len){
|
|
|
return min(len, size);
|
|
|
}
|
|
|
|
|
|
-int circle_put_one_data(c_buffer_t *cbuff, char data){
|
|
|
+int circle_put_one_data(c_buffer_t *cbuff, uint8_t data){
|
|
|
int16_t size = circle_get_write_space(cbuff);
|
|
|
if (size < 0){
|
|
|
return size;
|
|
|
@@ -54,7 +54,7 @@ int circle_put_one_data(c_buffer_t *cbuff, char data){
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
-int circle_get_data(c_buffer_t *cbuff, char *data, int16_t len){
|
|
|
+int circle_get_data(c_buffer_t *cbuff, uint8_t *data, int16_t len){
|
|
|
int16_t size = circle_get_read_space(cbuff);
|
|
|
int16_t r_len = len;
|
|
|
int16_t r1_len = 0;
|
|
|
@@ -82,7 +82,7 @@ int circle_get_data(c_buffer_t *cbuff, char *data, int16_t len){
|
|
|
}
|
|
|
|
|
|
|
|
|
-int circle_get_one_data(c_buffer_t *cbuff, char *data){
|
|
|
+int circle_get_one_data(c_buffer_t *cbuff, uint8_t *data){
|
|
|
int16_t size = circle_get_read_space(cbuff);
|
|
|
if (size <= 0){
|
|
|
return size;
|