/* Get the CLI commands and correlate them to functions.  */
void cli_find_command(struct cli_desc *dev, uint8_t *command, cmd_func *function)
/* Get the CLI commands and correlate them to functions.  */
void cli_find_command(struct cli_desc *dev, uint8_t *command, cmd_func *function)
{
	uint8_t i = 0;
	while (command[i] != 0) {
		command[i] = tolower(command[i]);
		i++;
	}
	i = 0;
	while (dev->v_cmd_fun[i] != NULL) {
		if(strncmp((char *)command,
			   (char *)dev->cmd_commands[i],
			   dev->command_size[i]) == 0) {
			if(dev->command_size == 0) {
				break;
			}
			*function = dev->v_cmd_fun[i];
			break;
		}
		i++;
	}
}