test public
Dependencies: HttpServer_snapshot_mbed-os
AUDIO_RBSP.h
00001 /******************************************************************************* 00002 * DISCLAIMER 00003 * This software is supplied by Renesas Electronics Corporation and is only 00004 * intended for use with Renesas products. No other uses are authorized. This 00005 * software is owned by Renesas Electronics Corporation and is protected under 00006 * all applicable laws, including copyright laws. 00007 * THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING 00008 * THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT 00009 * LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 00010 * AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. 00011 * TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS 00012 * ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE 00013 * FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR 00014 * ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE 00015 * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 00016 * Renesas reserves the right, without notice, to make changes to this software 00017 * and to discontinue the availability of this software. By using this software, 00018 * you agree to the additional terms and conditions found by accessing the 00019 * following link: 00020 * http://www.renesas.com/disclaimer* 00021 * Copyright (C) 2018 Renesas Electronics Corporation. All rights reserved. 00022 *******************************************************************************/ 00023 00024 #ifndef AUDIO_RBSP_H 00025 #define AUDIO_RBSP_H 00026 00027 #include "mbed.h" 00028 #include "R_BSP_Aio.h" 00029 00030 /** AUDIO_RBSP class 00031 * 00032 */ 00033 class AUDIO_RBSP { 00034 public: 00035 /** Overloaded power() 00036 * 00037 * @param type true=power up, false=power down 00038 */ 00039 virtual void power(bool type = true) = 0; 00040 00041 /** Set I2S interface bit length and mode 00042 * 00043 * @param length Set bit length to 16 bits 00044 * @return true = success, false = failure 00045 */ 00046 virtual bool format(char length) = 0; 00047 00048 /** Set sample frequency 00049 * 00050 * @param frequency Sample frequency of data in Hz 00051 * @return true = success, false = failure 00052 * 00053 * supports frequencies: 44.1kHz 00054 * Default is 44.1kHz 00055 */ 00056 virtual bool frequency(int hz) = 0; 00057 00058 /** Enqueue asynchronous write request 00059 * 00060 * @param p_data Location of the data 00061 * @param data_size Number of bytes to write 00062 * @param p_data_conf Asynchronous control block structure 00063 * @return Number of bytes written on success. negative number on error. 00064 */ 00065 virtual int write(void * const p_data, uint32_t data_size, const rbsp_data_conf_t * const p_data_conf = NULL) = 0; 00066 00067 /** Enqueue asynchronous read request 00068 * 00069 * @param p_data Location of the data 00070 * @param data_size Number of bytes to read 00071 * @param p_data_conf Asynchronous control block structure 00072 * @return Number of bytes read on success. negative number on error. 00073 */ 00074 virtual int read(void * const p_data, uint32_t data_size, const rbsp_data_conf_t * const p_data_conf = NULL) = 0; 00075 00076 /** Headphone out volume control 00077 * 00078 * @param leftVolumeOut Left headphone-out volume 00079 * @param rightVolumeOut Right headphone-out volume 00080 * @return Returns "true" for success, "false" if parameters are out of range 00081 */ 00082 virtual bool outputVolume(float leftVolumeOut, float rightVolumeOut) = 0; 00083 00084 /** Microphone volume 00085 * 00086 * @param VolumeIn Microphone volume 00087 * @return Returns "true" for success, "false" if parameters are out of range 00088 */ 00089 virtual bool micVolume(float VolumeIn) = 0; 00090 00091 }; 00092 00093 #endif
Generated on Wed Jul 13 2022 05:33:36 by 1.7.2