source: rtems/c/src/libchip/i2c/spi-fram-fm25l256.c @ 06a36cd1

4.11
Last change on this file since 06a36cd1 was 06a36cd1, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 7, 2011 at 10:15:25 PM

2011-07-07 Joel Sherrill <joel.sherrill@…>

  • libchip/display/disp_hcms29xx.c, libchip/flash/am29lv160.c, libchip/i2c/i2c-2b-eeprom.c, libchip/i2c/i2c-ds1621.c, libchip/i2c/spi-flash-m25p40.c, libchip/i2c/spi-fram-fm25l256.c, libchip/i2c/spi-memdrv.c, libchip/rtc/ds1375.c: Eliminate use of GNU old-style field designator extension as recommended by clang.
  • Property mode set to 100644
File size: 2.6 KB
Line 
1/*===============================================================*\
2| Project: SPI driver for FM25L256 like spi fram device           |
3+-----------------------------------------------------------------+
4|                    Copyright (c) 2008                           |
5|                    Embedded Brains GmbH                         |
6|                    Obere Lagerstr. 30                           |
7|                    D-82178 Puchheim                             |
8|                    Germany                                      |
9|                    rtems@embedded-brains.de                     |
10+-----------------------------------------------------------------+
11| The license and distribution terms for this file may be         |
12| found in the file LICENSE in this distribution or at            |
13|                                                                 |
14| http://www.rtems.com/license/LICENSE.                           |
15|                                                                 |
16+-----------------------------------------------------------------+
17\*===============================================================*/
18
19#include <rtems.h>
20#include <rtems/libi2c.h>
21
22#include <libchip/spi-fram-fm25l256.h>
23#include <rtems/libio.h>
24
25
26static spi_memdrv_t spi_fram_fm25l256_rw_drv_t = {
27  {/* public fields */
28    .ops =         &spi_memdrv_rw_ops, /* operations of general memdrv */
29    .size =        sizeof (spi_fram_fm25l256_rw_drv_t),
30  },
31  { /* our private fields */
32    .baudrate =             2000000,
33    .erase_before_program = false,
34    .empty_state =          0xff,
35    .page_size =            0x8000, /* 32K programming page size in bytes */
36    .sector_size =          1,      /* erase sector size in bytes */
37    .mem_size =             0x8000, /* 32K total capacity in bytes */
38  }
39};
40
41rtems_libi2c_drv_t *spi_fram_fm25l256_rw_driver_descriptor =
42&spi_fram_fm25l256_rw_drv_t.libi2c_drv_entry;
43
44static spi_memdrv_t spi_fram_fm25l256_ro_drv_t = {
45  {/* public fields */
46    .ops =         &spi_memdrv_ro_ops, /* operations of general memdrv */
47    .size =        sizeof (spi_fram_fm25l256_ro_drv_t),
48  },
49  { /* our private fields */
50    .baudrate =             2000000,
51    .erase_before_program = false,
52    .empty_state =          0xff,
53    .page_size =            0x8000, /* 32k programming page size in bytes */
54    .sector_size =          1,      /* erase sector size in bytes */
55    .mem_size =             0x8000, /* 32k total capacity in bytes */
56  }
57};
58
59rtems_libi2c_drv_t *spi_fram_fm25l256_ro_driver_descriptor =
60&spi_fram_fm25l256_ro_drv_t.libi2c_drv_entry;
Note: See TracBrowser for help on using the repository browser.