/* Display the current code sample for every active ratio.  */
static int32_t cn0503_show_line_code(struct cn0503_dev *dev)
/* Display the current code sample for every active ratio.  */
static int32_t cn0503_show_line_code(struct cn0503_dev *dev)
{
	uint8_t buff[256];
	int8_t i = 0, j = 0;
	if(dev->mode == CN0503_CODE) {
		cli_write_string(dev->cli_handler,
				 (uint8_t *)"DATI: ");
		do {
			if(dev->two_channel_slots & (1 << i)) {
				sprintf((char *)buff, "%lX %lX ",
					dev->data_channel[j],
					dev->data_channel[(j + 1)]);
				j += 2;
			} else {
				sprintf((char *)buff, "%lX ",
					dev->data_channel[j]);
				j++;
			}
			cli_write_string(dev->cli_handler,
					 buff);
			i++;
		} while(i < dev->active_slots);
		cli_write_string(dev->cli_handler,
				 (uint8_t *)"\n");
	}
	return SUCCESS;
}