📄 lib_sdramc.h
字号:
//*----------------------------------------------------------------------------
//* ATMEL Microcontroller Software Support - ROUSSET -
//*----------------------------------------------------------------------------
//* The software is delivered "AS IS" without warranty or condition of any
//* kind, either express, implied or statutory. This includes without
//* limitation any warranty or condition with respect to merchantability or
//* fitness for any particular purpose, or against the infringements of
//* intellectual property rights of others.
//*----------------------------------------------------------------------------
//* File Name : lib_sdramc.h
//* Object : SDRAMC Library Function Prototyping File.
//*
//* 1.0 01/02/01 ED : Creation
//*----------------------------------------------------------------------------
#ifndef lib_sdramc_h
#define lib_sdramc_h
#include "periph/stdc/std_c.h"
//* #include "periph/memc/memc.h"
#include "periph/sdramc/sdramc.h"
#include "drivers/wait/wait.h"
/*----------------------------------------*/
/* SDRAMC Descriptor Structure Definition */
/*----------------------------------------*/
typedef struct
{
StructSDRAMC *sdramc_base ; /* Peripheral base */
u_char periph_id ; /* SDRAMC Peripheral Identifier */
} SdramcDesc ;
typedef struct
{
u_int tref ; /* Refresh Period in us */
u_int col_nb ; /* SDRAM device column number */
u_int row_nb ; /* SDRAM device row number */
u_int bank_nb ; /* SDRAM device bank number */
u_int cas_latency ; /* SDRAM device CAS latency */
u_int twr ; /* Write recovery time in ns */
u_int trc ; /* Refresh to activate command time in ns */
u_int trp ; /* Precharge command to another command time in ns */
u_int trcd ; /* Activate command to read/write command time in ns */
u_int tras ; /* Activate command to Precharge command time in ns */
u_int txsr ; /* CKE high to Activate command time in ns */
u_int burst_length ; /* SDRAM Burst Length programmation in Mode Register */
u_int burst_type ; /* SDRAM Burst Type programmation in Mode Register */
u_int data_bus_width ; /* Data-path width (16 or 32 bits) */
} ParamSdramDesc ;
/* Time constants definition */
#define WAIT_1MS 1000
#define WAIT_200US 200
#define WAIT_100US 100
/* Function Prototyping */
extern void at91_sdramc_open ( const SdramcDesc *sdramc_desc, ParamSdramDesc *sdram_desc,
u_int *base_address, WaitDesc *wait_desc ) ;
extern void at91_sdramc_close ( const SdramcDesc *sdramc_desc ) ;
extern void at91_sdramc_trig_cmd ( const SdramcDesc *sdramc_desc, u_int cmd ) ;
extern u_int at91_sdramc_get_status ( const SdramcDesc *sdramc_desc ) ;
#endif /* lib_sdramc_h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -