Nut/OS  4.10.3
API Reference
at45db.h
Go to the documentation of this file.
00001 #ifndef _DEV_AT45DB_H_
00002 #define _DEV_AT45DB_H_
00003 /*
00004  * Copyright (C) 2006 by egnite Software GmbH. All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted provided that the following conditions
00008  * are met:
00009  *
00010  * 1. Redistributions of source code must retain the above copyright
00011  *    notice, this list of conditions and the following disclaimer.
00012  * 2. Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  * 3. Neither the name of the copyright holders nor the names of
00016  *    contributors may be used to endorse or promote products derived
00017  *    from this software without specific prior written permission.
00018  *
00019  * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
00020  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00021  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00022  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
00023  * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00024  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00025  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
00026  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
00027  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00028  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
00029  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00030  * SUCH DAMAGE.
00031  *
00032  * For additional information see http://www.ethernut.de/
00033  */
00034 
00066 #include <sys/types.h>
00067 #include <stdint.h>
00068 
00069 __BEGIN_DECLS
00070 /* Prototypes */
00071 extern int At45dbSendCmd(int dd, uint8_t op, uint32_t parm, int len, CONST void *tdata, void *rdata, int datalen);
00072 extern uint8_t At45dbGetStatus(int dd);
00073 extern int At45dbWaitReady(int dd, uint32_t tmo, int poll);
00074 extern int At45dbInit(unsigned int spibas, unsigned int spipcs);
00075 extern int At45dbPageErase(int dd, uint32_t pgn);
00076 extern int At45dbChipErase(void);
00077 extern int At45dbPageRead(int dd, uint32_t pgn, void *data, unsigned int len);
00078 extern int At45dbPageWrite(int dd, uint32_t pgn, CONST void *data, unsigned int len);
00079 extern uint32_t At45dbPages(int dd);
00080 extern unsigned int At45dbPageSize(int dd);
00081 extern int At45dbParamRead(unsigned int pos, void *data, unsigned int len);
00082 extern int At45dbParamWrite(unsigned int pos, CONST void *data, unsigned int len);
00083 
00084 __END_DECLS
00085 /* End of prototypes */
00086 #endif