source: EcnlProtoTool/trunk/asp3_dcre/mbed/targets/TARGET_RENESAS/TARGET_RZA1XX/spibsc.h@ 439

Last change on this file since 439 was 439, checked in by coas-nagasima, 4 years ago

mrubyを2.1.1に更新

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr;charset=UTF-8
File size: 6.0 KB
Line 
1/*******************************************************************************
2* DISCLAIMER
3* This software is supplied by Renesas Electronics Corporation and is only
4* intended for use with Renesas products. No other uses are authorized. This
5* software is owned by Renesas Electronics Corporation and is protected under
6* all applicable laws, including copyright laws.
7* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
8* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT
9* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
10* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.
11* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS
12* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE
13* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR
14* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE
15* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
16* Renesas reserves the right, without notice, to make changes to this software
17* and to discontinue the availability of this software. By using this software,
18* you agree to the additional terms and conditions found by accessing the
19* following link:
20* http://www.renesas.com/disclaimer
21*
22* Copyright (C) 2016 Renesas Electronics Corporation. All rights reserved.
23*******************************************************************************/
24/******************************************************************************
25* File Name : spibsc.h
26* $Rev: 12 $
27* $Date:: 2016-05-19 17:26:37 +0900#$
28* Description :
29******************************************************************************/
30#ifndef _SPIBSC_H_
31#define _SPIBSC_H_
32
33/******************************************************************************
34Includes <System Includes> , "Project Includes"
35******************************************************************************/
36#include "iodefine.h"
37
38/******************************************************************************
39Macro definitions
40******************************************************************************/
41#define SPIBSC_CMNCR_MD_EXTRD (0u)
42#define SPIBSC_CMNCR_MD_SPI (1u)
43
44#define SPIBSC_OUTPUT_LOW (0u)
45#define SPIBSC_OUTPUT_HIGH (1u)
46#define SPIBSC_OUTPUT_LAST (2u)
47#define SPIBSC_OUTPUT_HiZ (3u)
48
49#define SPIBSC_CMNCR_CPHAT_EVEN (0u)
50#define SPIBSC_CMNCR_CPHAT_ODD (1u)
51
52#define SPIBSC_CMNCR_CPHAR_ODD (0u)
53#define SPIBSC_CMNCR_CPHAR_EVEN (1u)
54
55#define SPIBSC_CMNCR_SSLP_LOW (0u)
56#define SPIBSC_CMNCR_SSLP_HIGH (1u)
57
58#define SPIBSC_CMNCR_CPOL_LOW (0u)
59#define SPIBSC_CMNCR_CPOL_HIGH (1u)
60
61#define SPIBSC_CMNCR_BSZ_SINGLE (0u)
62#define SPIBSC_CMNCR_BSZ_DUAL (1u)
63
64#define SPIBSC_DELAY_1SPBCLK (0u)
65#define SPIBSC_DELAY_2SPBCLK (1u)
66#define SPIBSC_DELAY_3SPBCLK (2u)
67#define SPIBSC_DELAY_4SPBCLK (3u)
68#define SPIBSC_DELAY_5SPBCLK (4u)
69#define SPIBSC_DELAY_6SPBCLK (5u)
70#define SPIBSC_DELAY_7SPBCLK (6u)
71#define SPIBSC_DELAY_8SPBCLK (7u)
72
73
74#define SPIBSC_BURST_1 (0x00u)
75#define SPIBSC_BURST_2 (0x01u)
76#define SPIBSC_BURST_3 (0x02u)
77#define SPIBSC_BURST_4 (0x03u)
78#define SPIBSC_BURST_5 (0x04u)
79#define SPIBSC_BURST_6 (0x05u)
80#define SPIBSC_BURST_7 (0x06u)
81#define SPIBSC_BURST_8 (0x07u)
82#define SPIBSC_BURST_9 (0x08u)
83#define SPIBSC_BURST_10 (0x09u)
84#define SPIBSC_BURST_11 (0x0au)
85#define SPIBSC_BURST_12 (0x0bu)
86#define SPIBSC_BURST_13 (0x0cu)
87#define SPIBSC_BURST_14 (0x0du)
88#define SPIBSC_BURST_15 (0x0eu)
89#define SPIBSC_BURST_16 (0x0fu)
90
91#define SPIBSC_BURST_DISABLE (0u)
92#define SPIBSC_BURST_ENABLE (1u)
93
94#define SPIBSC_DRCR_RCF_EXE (1u)
95
96#define SPIBSC_SSL_NEGATE (0u)
97#define SPIBSC_TRANS_END (1u)
98
99#define SPIBSC_1BIT (0u)
100#define SPIBSC_2BIT (1u)
101#define SPIBSC_4BIT (2u)
102
103#define SPIBSC_OUTPUT_DISABLE (0u)
104#define SPIBSC_OUTPUT_ENABLE (1u)
105#define SPIBSC_OUTPUT_ADDR_24 (0x07u)
106#define SPIBSC_OUTPUT_ADDR_32 (0x0fu)
107#define SPIBSC_OUTPUT_OPD_3 (0x08u)
108#define SPIBSC_OUTPUT_OPD_32 (0x0cu)
109#define SPIBSC_OUTPUT_OPD_321 (0x0eu)
110#define SPIBSC_OUTPUT_OPD_3210 (0x0fu)
111
112#define SPIBSC_OUTPUT_SPID_8 (0x08u)
113#define SPIBSC_OUTPUT_SPID_16 (0x0cu)
114#define SPIBSC_OUTPUT_SPID_32 (0x0fu)
115
116#define SPIBSC_SPISSL_NEGATE (0u)
117#define SPIBSC_SPISSL_KEEP (1u)
118
119#define SPIBSC_SPIDATA_DISABLE (0u)
120#define SPIBSC_SPIDATA_ENABLE (1u)
121
122#define SPIBSC_SPI_DISABLE (0u)
123#define SPIBSC_SPI_ENABLE (1u)
124
125
126/* Use for setting of the DME bit of "data read enable register"(DRENR) */
127#define SPIBSC_DUMMY_CYC_DISABLE (0u)
128#define SPIBSC_DUMMY_CYC_ENABLE (1u)
129
130/* Use for setting of the DMCYC [2:0] bit of "data read dummy cycle register"(DRDMCR) */
131#define SPIBSC_DUMMY_1CYC (0u)
132#define SPIBSC_DUMMY_2CYC (1u)
133#define SPIBSC_DUMMY_3CYC (2u)
134#define SPIBSC_DUMMY_4CYC (3u)
135#define SPIBSC_DUMMY_5CYC (4u)
136#define SPIBSC_DUMMY_6CYC (5u)
137#define SPIBSC_DUMMY_7CYC (6u)
138#define SPIBSC_DUMMY_8CYC (7u)
139
140/* Use for setting of "data read DDR enable register"(DRDRENR) */
141#define SPIBSC_SDR_TRANS (0u)
142#define SPIBSC_DDR_TRANS (1u)
143
144/* Use for setting the CKDLY regsiter */
145#define SPIBSC_CKDLY_DEFAULT (0x0000A504uL) /* Initial value */
146#define SPIBSC_CKDLY_TUNING (0x0000A50AuL) /* Shorten the data input setup time and extend the data hold time */
147
148/* Use for setting the SPODLY regsiter */
149#define SPIBSC_SPODLY_DEFAULT (0xA5000000uL) /* Initial value */
150#define SPIBSC_SPODLY_TUNING (0xA5001111uL) /* Delay the data output delay/hold/buffer-on/buffer-off time */
151
152#endif /* _SPIBSC_H_ */
153
154/* End of File */
Note: See TracBrowser for help on using the repository browser.