00001 #include <config.h>
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #define RAM_WREN 0x06
00026 #define RAM_WRDI 0x04
00027 #define RAM_RDID 0x9F
00028 #define RAM_RDSR 0x05
00029 #define RAM_WRSR 0x01
00030 #define RAM_READ 0x03
00031 #define RAM_FASTREAD 0x0B
00032 #define RAM_PP 0x02
00033 #define RAM_SE 0xD8
00034 #define RAM_BE 0xC7
00035 #define RAM_DP 0xB9
00036 #define RAM_RES 0xAB
00037
00038
00043 void read_ram_id(uint8_t* mem_ptr);
00044
00045
00046
00051 uint8_t read_ram_status();
00052
00053
00054
00062 void ram_bulk_erase();
00063
00064
00065
00075 void ram_sector_erase(uint8_t sector);
00076
00077
00078
00089 void write_flash_page(uint8_t flash_sector,uint8_t flash_page,uint8_t* mem_ptr);
00090
00091
00092
00103 void read_flash_page(uint8_t flash_sector,uint8_t flash_page,uint8_t* mem_ptr);
00104
00105
00106
00123 void read_write_flash_ram(uint8_t one_read_zero_write,uint16_t bytes_to_readwrite,uint8_t flash_sector,uint8_t flash_page,uint8_t offset,uint8_t* mem_ptr);
00124
00125
00131 void write_ram_status(uint8_t status);
00132
00133
00134
00140 void power_up_flash_ram(void);
00141
00142
00143
00152 void power_down_flash_ram(void);
00153