/****************************************************************************** * @name Shell_mute * * @brief Servers the mute command * * @param None * * @return None * ****************************************************************************** * This function is used to mute the audio device *****************************************************************************/ int32_t Shell_mute(int32_t argc, char *argv[]) { bool print_usage, shorthelp = FALSE; print_usage = Shell_check_help_request (argc, argv, &shorthelp); if (!print_usage) { if (argc > 1) { printf(" Error: This command doesn't need parameters\n"); return (SHELL_EXIT_ERROR); } else { audio_mute_command(); } } if (print_usage) { if (shorthelp) { printf("%s\n", argv[0]); } else { printf("Usage: %s\n", argv[0]); } } return(SHELL_EXIT_SUCCESS); }
/*FUNCTION*---------------------------------------------------------------- * * Function Name : process_kbd_buffer * Returned Value : None * Comments : * The way keyboard works is that it sends reports of 8 bytes of data * every time keys are pressed. However, it reports all the keys * that are pressed in a single report. The following code should * really be implemented by a user in the way he would like it to be. *END*--------------------------------------------------------------------*/ void process_kbd_buffer(unsigned char *buffer) { printf("\nprocess_kbd_buffer :%d\n",buffer[0]); if(4==buffer[0]) audio_mute_command(); if(1==buffer[0]) audio_increase_volume_command(); if(2==buffer[0]) audio_decrease_volume_command(); //fflush(stdout); }