test public
Dependencies: HttpServer_snapshot_mbed-os
R_BSP_Ssif.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) 2015 Renesas Electronics Corporation. All rights reserved. 00022 *******************************************************************************/ 00023 /**************************************************************************//** 00024 * @file R_BSP_Ssif.h 00025 * @brief SSIF API 00026 ******************************************************************************/ 00027 00028 #ifndef R_BSP_SSIF_H 00029 #define R_BSP_SSIF_H 00030 00031 #include <stdint.h> 00032 #include "R_BSP_SerialFamily.h" 00033 #include "R_BSP_SsifDef.h" 00034 #include "rtos.h" 00035 #include "pinmap.h" 00036 00037 /** A class to communicate a R_BSP_Ssif 00038 * 00039 */ 00040 class R_BSP_Ssif : public R_BSP_SerialFamily { 00041 00042 public: 00043 00044 /** Constructor 00045 * 00046 * @param sck SSIF serial bit clock 00047 * @param ws SSIF word selection 00048 * @param tx SSIF serial data output 00049 * @param rx SSIF serial data input 00050 */ 00051 R_BSP_Ssif(PinName sck, PinName ws, PinName tx, PinName rx, PinName audio_clk = NC); 00052 00053 /** Destructor 00054 * 00055 */ 00056 virtual ~R_BSP_Ssif(); 00057 00058 00059 /** Initialization 00060 * 00061 * @param p_ch_cfg SSIF channel configuration parameter 00062 * @param max_write_num The upper limit of write buffer (SSIF) 00063 * @param max_read_num The upper limit of read buffer (SSIF) 00064 * @return true = success, false = failure 00065 */ 00066 void init(const ssif_channel_cfg_t* const p_ch_cfg, int32_t max_write_num, int32_t max_read_num); 00067 00068 /** Get a value of SSIF channel number 00069 * 00070 * @return SSIF channel number 00071 */ 00072 int32_t GetSsifChNo(void) { 00073 return ssif_ch; 00074 }; 00075 00076 /** Save configuration to the SSIF driver 00077 * 00078 * @param p_ch_cfg SSIF channel configuration parameter 00079 * @return true = success, false = failure 00080 */ 00081 bool ConfigChannel(const ssif_channel_cfg_t* const p_ch_cfg); 00082 00083 /** Get a value of SSISR register 00084 * 00085 * @param p_status Pointer of status value 00086 * @return true = success, false = failure 00087 */ 00088 bool GetStatus(uint32_t* const p_status); 00089 00090 private: 00091 int32_t ssif_ch; 00092 }; 00093 #endif
Generated on Wed Jul 13 2022 05:33:36 by 1.7.2