OpenCores
URL https://opencores.org/ocsvn/usb_nand_reader/usb_nand_reader/trunk

Subversion Repositories usb_nand_reader

[/] [usb_nand_reader/] [trunk/] [mini32/] [CMD_BlockErase.cp] - Rev 7

Compare with Previous | Blame | View Log

#line 1 "H:/MINI32/MINI-32 Examples/MINI-32 mikroC PRO for PIC32 Examples/MINI32_NAND_Controller/CMD_BlockErase.c"
#line 1 "h:/mini32/mini-32 examples/mini-32 mikroc pro for pic32 examples/mini32_nand_controller/nandcontrol.h"



void init_nand_control_line();
int nand_is_ready();
void nand_wait_ready();
void nand_chip_select(int idx);
void nand_chip_unselect();

void nand_send_command(unsigned char cmd);
void nand_send_address(unsigned char* addr, int len);
void nand_write(unsigned char* buffer, int len);
void nand_read(unsigned char* buffer, int len);
void nand_toggle_wp();

void blink(int i);
#line 1 "h:/mini32/mini-32 examples/mini-32 mikroc pro for pic32 examples/mini32_nand_controller/cmd.h"
#line 38 "h:/mini32/mini-32 examples/mini-32 mikroc pro for pic32 examples/mini32_nand_controller/cmd.h"
void do_delay(int cycles);

void cmd_chip_enable(unsigned char* cmd);
void cmd_chip_disable();
void cmd_chip_reset();
void cmd_chip_read_id(unsigned char* outBuffer, int addr);
void cmd_chip_read_param_page(unsigned char* outBuffer);
void cmd_chip_read_page(unsigned char* inBuffer, unsigned char* outBuffer, int len, int addressCycles);
void cmd_chip_read_page_cache_sequential(unsigned char* inBuffer, unsigned char* outBuffer, int len, int addressCylces);
unsigned char cmd_chip_read_status();
unsigned char cmd_chip_read_status_enhanced(unsigned char* inBuffer, int addressCycles);
void cmd_chip_read_unique_id(unsigned char* outBuffer);
void cmd_chip_block_erase(unsigned char* inBuffer);
unsigned char cmd_chip_page_program(unsigned char* inBuffer, int addressCycles, int pageSize);
#line 5 "H:/MINI32/MINI-32 Examples/MINI-32 mikroC PRO for PIC32 Examples/MINI32_NAND_Controller/CMD_BlockErase.c"
void cmd_chip_block_erase(unsigned char* inBuffer)
{
 nand_send_command( 0x60 );
 nand_send_address(inBuffer + 1, 3);
 do_delay(100);
 nand_send_command( 0xD0 );
 do_delay(100);
 nand_wait_ready();
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.