Add calibration routine from shell
This commit is contained in:
@@ -81,11 +81,12 @@ int dma_ring_buffer_periph_to_mem_get_data(struct dma_ring_buffer_to_mem *buff,
|
||||
*data_buff = &(((char *)buff->data_ptr)[buff->get_idx * buff->element_size]);
|
||||
*len = buff->buffer_count - buff->get_idx;
|
||||
buff->get_idx = 0;
|
||||
ret_code = 1;
|
||||
ret_code = 2;
|
||||
} else if (put_idx > buff->get_idx) {
|
||||
*data_buff = &(((char *)buff->data_ptr)[buff->get_idx * buff->element_size]);
|
||||
*len = put_idx - buff->get_idx;
|
||||
buff->get_idx += *len;
|
||||
ret_code = 1;
|
||||
} else {
|
||||
/* No new data */
|
||||
*len = 0;
|
||||
|
Reference in New Issue
Block a user