MotorWare f2806x Driver API Documentation

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

emu.h
Go to the documentation of this file.
1 /* --COPYRIGHT--,BSD
2 * Copyright (c) 2015, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 * --/COPYRIGHT--*/
33
34
35
36 #ifndef _EMU_H_
37 #define _EMU_H_
38
45
46
47 // **************************************************************************
48 // the includes
49
50 // drivers
51 #include "sw/modules/types/src/types.h"
52
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56
57
58 //---------------------------------------------------------------------------
59 // Device Emulation Register Bit Definitions:
60 //
61 // Device Configuration Register Bit Definitions
62 struct DEVICECNF_BITS { // bits description
63 uint16_t rsvd1:3; // 2:0 reserved
64 uint16_t VMAPS:1; // 3 VMAP Status
65 uint16_t rsvd2:1; // 4 reserved
66 uint16_t XRSn:1; // 5 XRSn Signal Status
67 uint16_t rsvd3:10; // 15:6 reserved
68 uint16_t rsvd4:3; // 18:16 reserved
69 uint16_t ENPROT:1; // 19 Enable/Disable pipeline protection
70 uint16_t rsvd5:7; // 26:21 reserved
71 uint16_t TRSTn:1; // 27 Status of TRSTn signal
72 uint16_t PINOUTSELSTS:1; // 28 Status of PINOUSTSEL pin
73 uint16_t PINOUTSELPUD:1; // 29 PINOUTSEL pin pull-up disable
74 uint16_t rsvd6:2; // 31:30 reserved
75 };
76
77 union DEVICECNF_REG {
78 uint32_t all;
79 struct DEVICECNF_BITS bit;
80 };
81
82 // CLASSID
83 struct CLASSID_BITS { // bits description
84 uint16_t CLASSNO:8; // 7:0 Class Number
85 uint16_t PARTTYPE:8; // 15:8 Part Type
86 };
87
88 union CLASSID_REG {
89 uint16_t all;
90 struct CLASSID_BITS bit;
91 };
92
93
94 struct DEV_EMU_REGS {
95 union DEVICECNF_REG DEVICECNF; // Device Configuration
96 union CLASSID_REG CLASSID; // Class ID
97 uint16_t REVID; // Device ID
98 };
99
100 // PARTID
101 struct PARTID_BITS { // bits description
102 uint16_t PARTNO:8; // 7:0 Part Number
103 uint16_t PARTTYPE:8; // 15:8 Part Type
104 };
105
106 union PARTID_REG {
107 uint16_t all;
108 struct PARTID_BITS bit;
109 };
110
111 struct PARTID_REGS {
112 union PARTID_REG PARTID; // Part ID
113 };
114
115
116 //---------------------------------------------------------------------------
117 // Device Emulation Register References & Function Declarations:
118 //
119 extern volatile struct DEV_EMU_REGS DevEmuRegs;
120 extern volatile struct PARTID_REGS PartIdRegs;
121
122 #ifdef __cplusplus
123 }
124 #endif /* extern "C" */
125
126 #endif // end of _EMU_H definition
127
DEVICECNF_BITS::XRSn
uint16_t XRSn
Definition: emu.h:66
DEV_EMU_REGS::REVID
uint16_t REVID
Definition: emu.h:97
CLASSID_BITS::PARTTYPE
uint16_t PARTTYPE
Definition: emu.h:85
CLASSID_REG::bit
struct CLASSID_BITS bit
Definition: emu.h:90
DEV_EMU_REGS::CLASSID
union CLASSID_REG CLASSID
Definition: emu.h:96
PARTID_REGS::PARTID
union PARTID_REG PARTID
Definition: emu.h:112
PARTID_REGS
Definition: emu.h:111
CLASSID_REG
Definition: emu.h:88
PARTID_REG::all
uint16_t all
Definition: emu.h:107
PARTID_BITS
Definition: emu.h:101
DEV_EMU_REGS::DEVICECNF
union DEVICECNF_REG DEVICECNF
Definition: emu.h:95
DEVICECNF_BITS
Definition: emu.h:62
PARTID_REG
Definition: emu.h:106
DEVICECNF_BITS::PINOUTSELPUD
uint16_t PINOUTSELPUD
Definition: emu.h:73
DevEmuRegs
volatile struct DEV_EMU_REGS DevEmuRegs
DEVICECNF_BITS::VMAPS
uint16_t VMAPS
Definition: emu.h:64
PARTID_BITS::PARTTYPE
uint16_t PARTTYPE
Definition: emu.h:103
PartIdRegs
volatile struct PARTID_REGS PartIdRegs
CLASSID_REG::all
uint16_t all
Definition: emu.h:89
DEV_EMU_REGS
Definition: emu.h:94
PARTID_REG::bit
struct PARTID_BITS bit
Definition: emu.h:108
DEVICECNF_BITS::rsvd3
uint16_t rsvd3
Definition: emu.h:67
CLASSID_BITS
Definition: emu.h:83
DEVICECNF_BITS::rsvd6
uint16_t rsvd6
Definition: emu.h:74
DEVICECNF_REG
Definition: emu.h:77
PARTID_BITS::PARTNO
uint16_t PARTNO
Definition: emu.h:102
DEVICECNF_BITS::PINOUTSELSTS
uint16_t PINOUTSELSTS
Definition: emu.h:72
DEVICECNF_REG::bit
struct DEVICECNF_BITS bit
Definition: emu.h:79
DEVICECNF_BITS::rsvd4
uint16_t rsvd4
Definition: emu.h:68
CLASSID_BITS::CLASSNO
uint16_t CLASSNO
Definition: emu.h:84
DEVICECNF_BITS::rsvd2
uint16_t rsvd2
Definition: emu.h:65
DEVICECNF_BITS::rsvd5
uint16_t rsvd5
Definition: emu.h:70
DEVICECNF_BITS::ENPROT
uint16_t ENPROT
Definition: emu.h:69
DEVICECNF_REG::all
uint32_t all
Definition: emu.h:78
DEVICECNF_BITS::rsvd1
uint16_t rsvd1
Definition: emu.h:63
DEVICECNF_BITS::TRSTn
uint16_t TRSTn
Definition: emu.h:71