37 #define DRIVER_NAME FMC 40 #include <oc_stdlib.h> 46 #ifdef oC_FMC_LLD_AVAILABLE 53 #define _________________________________________TYPES_SECTION______________________________________________________________________________ 190 #undef _________________________________________TYPES_SECTION______________________________________________________________________________ 197 #define _________________________________________INTERFACE_FUNCTIONS_SECTION________________________________________________________________ 204 extern oC_ErrorCode_t
oC_FMC_Read ( oC_FMC_Context_t Context ,
char * outBuffer , uint32_t Size , oC_IoFlags_t IoFlags );
205 extern oC_ErrorCode_t
oC_FMC_Write ( oC_FMC_Context_t Context ,
const char * Buffer , uint32_t Size , oC_IoFlags_t IoFlags );
206 extern oC_ErrorCode_t
oC_FMC_Ioctl ( oC_FMC_Context_t Context , oC_Ioctl_Command_t Command ,
void * Data );
208 extern oC_ErrorCode_t
oC_FMC_ReadDirectAddress ( oC_FMC_Context_t Context ,
void ** outAddress , oC_MemorySize_t * outMemorySize );
211 #undef _________________________________________INTERFACE_FUNCTIONS_SECTION________________________________________________________________ oC_FMC_SDRAM_Command_t
commands for SDRAM
The file with interface for the GPIO driver.
const oC_FMC_ChipInfo_t * ChipInfo
Pointer to the informations about the selected chip.
The file with frequency definitions.
oC_ErrorCode_t oC_FMC_TurnOff(void)
Turns off the FMC driver.
oC_FMC_LLD_NORFlash_Config_t NORFlash
NOR Flash configuration structure.
Simple no operation command.
Never use the memory as heap.
Deactivate a row in a bank (or in all banks)
oC_FMC_LLD_SDRAM_CommandData_t oC_FMC_SDRAM_CommandData_t
stores data for SDRAM commands
oC_ErrorCode_t oC_FMC_Write(oC_FMC_Context_t Context, const char *Buffer, uint32_t Size, oC_IoFlags_t IoFlags)
write buffer to the driver
Write a burst to an active row.
bool oC_FMC_IsTurnedOn(void)
checks if the driver is turned on
Read operations are performed.
Enables the clock (provides a stable CLK signal)
The COMMAND INHIBIT function prevents new commands from being executed by the device, regardless of whether the CLK signal is enabled.
oC_FMC_LLD_NANDFlash_Config_t NANDFlash
NAND Flash configuration structure.
oC_ErrorCode_t oC_FMC_Configure(const oC_FMC_Config_t *Config, oC_FMC_Context_t *outContext)
configures FMC pins to work
The command used for activate a row in a bank for a subsequent access.
The file with interface for driver creating.
oC_ErrorCode_t oC_FMC_FinishInitialization(const oC_FMC_Config_t *Config, oC_FMC_Context_t Context)
finishes initialization
The file with LLD interface for the FMC driver.
oC_FMC_Protection_t
stores memory protection
oC_ErrorCode_t oC_FMC_SDRAM_SendCommand(oC_FMC_Context_t Context, oC_Time_t *Timeout, oC_FMC_SDRAM_Command_t Command, const oC_FMC_SDRAM_CommandData_t *Data)
sends command to SDRAM chips
Read a burst to an active row.
oC_FMC_LLD_ChipParameters_t ChipParameters
Chip parameters.
oC_ErrorCode_t oC_FMC_TurnOn(void)
turns on the module
Default protection for the memory type.
oC_ErrorCode_t(* oC_FMC_InitializationFunction_t)(const void *Config, oC_FMC_Context_t Context, oC_Time_t *Timeout)
function for initialization of the chip
Execution operations are performed.
oC_ErrorCode_t oC_FMC_Read(oC_FMC_Context_t Context, char *outBuffer, uint32_t Size, oC_IoFlags_t IoFlags)
reads buffer from the driver
Terminates a burst (either fixed length or continuous page burst)
The file with interface for IOCTL.
oC_FMC_InitializationFunction_t InitializationFunction
Function to call for initialize the chip.
stores informations about chip
oC_FMC_HeapUsage_t
Heap should be used or not.
Refreshes a ram, when the system is powered-down (it does not require a CLOCK)
Default option - if usage of heap is possible, then use it.
oC_FMC_LLD_SDRAM_Config_t SDRAM
SDRAM configuration structure.
Configuration command for loading modes registers.
Write operations are performed.
oC_FMC_HeapUsage_t HeapUsage
Use or not the configured memory as heap.
FMC driver configuration structure.
oC_FMC_LLD_PSRAM_Config_t PSRAM
PSRAM configuration structure.
struct Context_t * oC_FMC_Context_t
The FMC context structure.
struct oC_FMC_Config_t oC_FMC_Config_t
FMC driver configuration structure.
oC_ErrorCode_t oC_FMC_ReadDirectAddress(oC_FMC_Context_t Context, void **outAddress, oC_MemorySize_t *outMemorySize)
returns an address for direct access to the memory
oC_ErrorCode_t oC_FMC_Unconfigure(const oC_FMC_Config_t *Config, oC_FMC_Context_t *outContext)
Unconfigures the driver.
oC_ErrorCode_t oC_FMC_Ioctl(oC_FMC_Context_t Context, oC_Ioctl_Command_t Command, void *Data)
handles input/output driver commands
oC_Time_t MaximumTimeForConfiguration
Maximum time for the memory configuration.