/* Allocate memory for the driver handler and initialize the physical layer. */
int32_t cli_setup(struct cli_desc **device, struct cli_init_param *init_param)
/* Allocate memory for the driver handler and initialize the physical layer. */
int32_t cli_setup(struct cli_desc **device, struct cli_init_param *init_param)
{
	int32_t ret;
	struct cli_desc *dev;
	dev = calloc(1, sizeof *dev);
	if (!dev)
		return -1;
	ret = usr_uart_init(&dev->uart_device, &init_param->uart_init);
	if(ret < 0)
		goto error;
	*device = dev;
	return ret;
error:
	free(dev);
	return ret;
}