Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:43

0001 /**
0002  * @file
0003  * @ingroup lm32_milkymist_flash RTEMSBSPsLM32SharedMilkymistOne
0004  * @brief Milkymist Flash
0005  */
0006 
0007 /*  milkymist_flash.h
0008  *  
0009  *  Copyright (C) 2010 Sebastien Bourdeauducq
0010  *
0011  *  The license and distribution terms for this file may be
0012  *  found in the file LICENSE in this distribution or at
0013  *  http://www.rtems.org/license/LICENSE.
0014  *
0015  */
0016 
0017 /**
0018  * @defgroup lm32_milkymist_flash Milkymist Flash
0019  * @ingroup RTEMSBSPsLM32SharedMilkymistOne
0020  * @brief Milkymist Flash
0021  * @{
0022  */
0023 
0024 #ifndef __MILKYMIST_FLASH_H_
0025 #define __MILKYMIST_FLASH_H_
0026 
0027 /* Ioctls */
0028 #define FLASH_GET_SIZE            0x4600
0029 #define FLASH_GET_BLOCKSIZE       0x4601
0030 #define FLASH_ERASE_BLOCK         0x4602
0031 
0032 struct flash_partition {
0033     unsigned int start_address;
0034     unsigned int length;
0035 };
0036 
0037 rtems_device_driver flash_initialize(
0038   rtems_device_major_number major,
0039   rtems_device_minor_number minor,
0040   void *arg
0041 );
0042 
0043 rtems_device_driver flash_read(
0044   rtems_device_major_number major,
0045   rtems_device_minor_number minor,
0046   void *arg
0047 );
0048 
0049 rtems_device_driver flash_write(
0050   rtems_device_major_number major,
0051   rtems_device_minor_number minor,
0052   void *arg
0053 );
0054 
0055 rtems_device_driver flash_control(
0056   rtems_device_major_number major,
0057   rtems_device_minor_number minor,
0058   void *arg
0059 );
0060 
0061 #define FLASH_DRIVER_TABLE_ENTRY {flash_initialize, \
0062 NULL, NULL, flash_read, flash_write, flash_control}
0063 
0064 #endif /* __MILKYMIST_FLASH_H_ */