OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ARM7_STR75x_IAR/] [STLibrary/] [inc/] [75x_smi.h] - Blame information for rev 577

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 577 jeremybenn
/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
2
* File Name          : 75x_smi.h
3
* Author             : MCD Application Team
4
* Date First Issued  : 03/10/2006
5
* Description        : This file contains all the functions prototypes for the
6
*                      SMI software library.
7
********************************************************************************
8
* History:
9
* 07/17/2006 : V1.0
10
* 03/10/2006 : V0.1
11
********************************************************************************
12
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
13
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
14
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
15
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
16
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
17
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
18
*******************************************************************************/
19
 
20
/* Define to prevent recursive inclusion -------------------------------------*/
21
#ifndef __75x_SMI_H
22
#define __75x_SMI_H
23
 
24
/* Includes ------------------------------------------------------------------*/
25
#include "75x_map.h"
26
 
27
/* Exported types ------------------------------------------------------------*/
28
typedef struct
29
{
30
  u8 SMI_ClockHold;
31
  u8 SMI_Prescaler;
32
  u8 SMI_DeselectTime;
33
} SMI_InitTypeDef;
34
 
35
/* Exported constants --------------------------------------------------------*/
36
/* SMI mode */
37
#define SMI_Mode_HW    0xEFFFFFFF
38
#define SMI_Mode_SW    0x10000000
39
 
40
/* Reception Length */
41
#define SMI_RxLength_0Bytes    0x00000000
42
#define SMI_RxLength_1Byte     0x00000010
43
#define SMI_RxLength_2Bytes    0x00000020
44
#define SMI_RxLength_3Bytes    0x00000030
45
#define SMI_RxLength_4Bytes    0x00000040
46
 
47
/* Transmission Length */
48
#define SMI_TxLength_0Bytes    0x00000000
49
#define SMI_TxLength_1Byte     0x00000001
50
#define SMI_TxLength_2Bytes    0x00000002
51
#define SMI_TxLength_3Bytes    0x00000003
52
#define SMI_TxLength_4Bytes    0x00000004
53
 
54
/* SMI memory Banks */
55
#define SMI_Bank_0    0x00000001
56
#define SMI_Bank_1    0x00000002
57
#define SMI_Bank_2    0x00000004
58
#define SMI_Bank_3    0x00000008
59
 
60
/* SMI Interrupts */
61
#define SMI_IT_WC    0x00000200
62
#define SMI_IT_TF    0x00000100
63
 
64
/* Fast Read Mode */
65
#define SMI_FastRead_Disable    0xFFFF7FFF
66
#define SMI_FastRead_Enable     0x00008000
67
 
68
/* Write Burst Mode */
69
#define SMI_WriteBurst_Disable    0xDFFFFFFF
70
#define SMI_WriteBurst_Enable     0x20000000
71
 
72
/* SMI Flags */
73
#define SMI_FLAG_Bank3_WM    0x00008000
74
#define SMI_FLAG_Bank2_WM    0x00004000
75
#define SMI_FLAG_Bank1_WM    0x00002000
76
#define SMI_FLAG_Bank0_WM    0x00001000
77
#define SMI_FLAG_ERF2        0x00000800
78
#define SMI_FLAG_ERF1        0x00000400
79
#define SMI_FLAG_WC          0x00000200
80
#define SMI_FLAG_TF          0x00000100
81
 
82
/* Exported macro ------------------------------------------------------------*/
83
/* Exported functions ------------------------------------------------------- */
84
void SMI_DeInit(void);
85
void SMI_Init(SMI_InitTypeDef* SMI_InitStruct);
86
void SMI_StructInit(SMI_InitTypeDef* SMI_InitStruct);
87
void SMI_ModeConfig(u32 SMI_Mode);
88
void SMI_TxRxLengthConfig(u32 SMI_TxLength, u32 SMI_RxLength);
89
void SMI_BankCmd(u32 SMI_Bank, FunctionalState NewState);
90
void SMI_ITConfig(u32 SMI_IT, FunctionalState NewState);
91
void SMI_SelectBank(u32 SMI_Bank);
92
void SMI_SendWENCmd(void);
93
void SMI_SendRSRCmd(void);
94
void SMI_SendCmd(u32 Command);
95
void SMI_FastReadConfig(u32 SMI_FastRead);
96
void SMI_WriteBurstConfig(u32 SMI_WriteBurst);
97
void SMI_WriteByte(u32 WriteAddr, u8 Data);
98
void SMI_WriteHalfWord(u32 WriteAddr, u16 Data);
99
void SMI_WriteWord(u32 WriteAddr, u32 Data);
100
u8 SMI_ReadByte(u32 ReadAddr);
101
u16 SMI_ReadHalfWord(u32 ReadAddr);
102
u32 SMI_ReadWord(u32 ReadAddr);
103
u8 SMI_ReadMemoryStatusRegister(void);
104
FlagStatus SMI_GetFlagStatus(u32 SMI_FLAG);
105
void SMI_ClearFlag(u32 SMI_FLAG);
106
ITStatus SMI_GetITStatus(u32 SMI_IT);
107
void SMI_ClearITPendingBit(u32 SMI_IT);
108
 
109
#endif /* __75x_SMI_H */
110
 
111
/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.