| Electronic Components Datasheet Search |
|
SH7262 Datasheet(PDF) 27 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
SH7262 Datasheet(HTML) 27 Page - Renesas Technology Corp |
|
27 / 45 page ![]() SH7262/SH7264 Group High-speed Read/Write Serial Flash Memory Using the Renesas Serial Peripheral Interface REJ06B0889-0100/Rev.1.00 June 2009 Page 27 of 45 3.9 Sample Program Listing "serial_flash.c" (6/19) 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 /*""FUNC COMMENT""************************************************************** * ID : * Outline : Read data (byte transfer). *------------------------------------------------------------------------------ * Include : *------------------------------------------------------------------------------ * Declaration : void sf_byte_read(unsigned long addr, unsigned char *buf, int size); *------------------------------------------------------------------------------ * Description : Reads the specified number of bytes from serial flash memory. *------------------------------------------------------------------------------ * Argument : unsigned long addr ; I : Address in serial flash memory to read * : unsigned char *buf ; I : Buffer address to store the read data * : int size ; I : Number of bytes to read *------------------------------------------------------------------------------ * Return Value : void *------------------------------------------------------------------------------ * Note : None *""FUNC COMMENT END""**********************************************************/ void sf_byte_read(unsigned long addr, unsigned char *buf, int size) { unsigned char cmd[5]; cmd[0] = SFLASHCMD_BYTE_READ; cmd[1] = (unsigned char)((addr >> 16) & 0xff); cmd[2] = (unsigned char)((addr >> 8) & 0xff); cmd[3] = (unsigned char)( addr & 0xff); cmd[4] = 0x00; io_cmd_exe_rdmode(cmd, 5, buf, size); } /*""FUNC COMMENT""************************************************************** * ID : * Outline : Read data (Longword transfer). *------------------------------------------------------------------------------ * Include : *------------------------------------------------------------------------------ * Declaration : void sf_byte_read_long(unsigned long addr, unsigned long *buf, int size); *------------------------------------------------------------------------------ * Description : Reads the specified number of bytes in units of longword * : from serial flash memory. *------------------------------------------------------------------------------ * Argument : unsigned long addr ; I : Address in serial flash memory to read * : unsigned long *buf ; I : Buffer address to store the read data * : int size ; I : Number of bytes to read *------------------------------------------------------------------------------ * Return Value : void *------------------------------------------------------------------------------ * Note : None *""FUNC COMMENT END""**********************************************************/ |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |