RZ/A1H CMSIS-RTOS RTX BSP for GR-PEACH.

Dependents:   R_BSP_SSIF_HelloWorld GR-PEACH_Azure_Speech ImageZoomInout_Sample ImageRotaion_Sample ... more

Fork of R_BSP by Daiki Kato

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers R_BSP_Ssif.h Source File

R_BSP_Ssif.h

Go to the documentation of this file.
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      * @param int_level     Interupt priority (SSIF)
00051      * @param max_write_num The upper limit of write buffer (SSIF)
00052      * @param max_read_num  The upper limit of read buffer (SSIF)
00053      */
00054     R_BSP_Ssif(PinName sck, PinName ws, PinName tx, PinName rx, uint8_t int_level = 0x80, int32_t max_write_num = 16, int32_t max_read_num = 16);
00055 
00056     /** Destructor
00057      *
00058      */
00059     virtual ~R_BSP_Ssif();
00060 
00061     /** Get a value of SSIF channel number
00062      *
00063      * @return SSIF channel number
00064      */
00065     int32_t GetSsifChNo(void) {
00066         return ssif_ch;
00067     };
00068 
00069     /** Save configuration to the SSIF driver
00070      *
00071      * @param p_ch_cfg SSIF channel configuration parameter
00072      * @return true = success, false = failure
00073      */
00074     bool ConfigChannel(const ssif_channel_cfg_t* const p_ch_cfg);
00075 
00076     /** Get a value of SSISR register
00077      *
00078      * @param p_status Pointer of status value
00079      * @return true = success, false = failure
00080      */
00081     bool GetStatus(uint32_t* const p_status);
00082 
00083 private:
00084     ssif_channel_cfg_t  ssif_cfg;
00085     int32_t ssif_ch;
00086 };
00087 #endif