AM275 FreeRTOS SDK  11.01.00
hyperRam.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2025, 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  *
32  */
33 
42  #ifndef hyperRam_H_
43  #define hyperRam_H_
44 
45 
46 /* ========================================================================== */
47 /* Include Files */
48 /* ========================================================================== */
49 
50 #include <stdint.h>
51 #include <kernel/dpl/SystemP.h>
52 #include <drivers/hw_include/soc_config.h>
53 #include <drivers/hyperbus.h>
54 #include <kernel/dpl/SemaphoreP.h>
55 
56  #ifdef __cplusplus
57  extern "C"
58  {
59  #endif
60 
61 /* ========================================================================== */
62 /* Macros & Typedefs */
63 /* ========================================================================== */
64 
78  typedef void *HYPERRAM_Handle;
79 
83  typedef struct HyperRam_Config_s HyperRam_Config;
84 
85 /* ========================================================================== */
86 /* Structure Declarations */
87 /* ========================================================================== */
88 
92  typedef struct HyperRam_Attrs_s {
93  char *HyperRamName;
95  uint32_t driverInstance;
97  uint16_t CR1;
99  uint16_t ID0;
101  uint16_t ID1;
104  } HyperRam_Attrs;
105 
110  {
113  void *object;
116  };
117 
118 /* ========================================================================== */
119 /* Function Declarations */
120 /* ========================================================================== */
121 
125 void HyperRam_init(void);
126 
130 void HyperRam_deinit(void);
131 
149 HYPERRAM_Handle HyperRam_open(uint32_t instanceId);
150 
157 
160 /* ========================================================================== */
161 /* Static Function Definitions */
162 /* ========================================================================== */
163 
164 /* None */
165 
166 /* ========================================================================== */
167 /* Internal/Private Structure Declarations */
168 /* ========================================================================== */
169 
170 typedef struct {
175  uint32_t isOpen;
180  } HyperRam_Object;
181 
182  #ifdef __cplusplus
183  }
184  #endif
185 
186  #endif /* hyperRam_H_ */
HyperRam_Object::hyperbusHandle
HYPERBUS_Handle hyperbusHandle
Definition: hyperRam.h:173
HyperRam_Attrs::driverInstance
uint32_t driverInstance
Definition: hyperRam.h:95
SystemP.h
HyperRam_Attrs::CR1
uint16_t CR1
Definition: hyperRam.h:97
HyperRam_init
void HyperRam_init(void)
This function initializes the HYPERBUS module.
HyperRam_deinit
void HyperRam_deinit(void)
This function de-initializes the HYPERBUS module.
HYPERBUS_Handle
void * HYPERBUS_Handle
A handle that is returned from a HYPERBUS_open() call.
Definition: hyperbus/v0/hyperbus.h:68
HyperRam_Attrs
HyperRam device attributes, these are filled by SysCfg based on the HyperRam device that is selected.
Definition: hyperRam.h:92
SemaphoreP.h
HyperRam_Attrs::HyperRamName
char * HyperRamName
Definition: hyperRam.h:93
HyperRam_close
void HyperRam_close(HYPERRAM_Handle handle)
Close HyperRam driver.
HyperRam_Attrs::ID1
uint16_t ID1
Definition: hyperRam.h:101
HyperRam_Object
Definition: hyperRam.h:170
HyperRam_Object::handle
HYPERRAM_Handle handle
Definition: hyperRam.h:171
HyperRam_Config_s::attrs
HyperRam_Attrs * attrs
Definition: hyperRam.h:111
HyperRam_Attrs::ID0
uint16_t ID0
Definition: hyperRam.h:99
hyperbus.h
HyperRam_Object::lockObj
SemaphoreP_Object lockObj
Definition: hyperRam.h:177
SemaphoreP_Object
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
HyperRam_Object::isOpen
uint32_t isOpen
Definition: hyperRam.h:175
HyperRam_Config_s
HyperRam driver configuration, these are filled by SysCfg based on the HyperRam device that is select...
Definition: hyperRam.h:110
HYPERRAM_Handle
void * HYPERRAM_Handle
Handle to the HYPERRAM driver returned by HyperRam_open()
Definition: hyperRam.h:78
HyperRam_open
HYPERRAM_Handle HyperRam_open(uint32_t instanceId)
Open HyperRam driver.
HyperRam_Config_s::object
void * object
Definition: hyperRam.h:113