Line 1... |
Line 1... |
/*!
|
/*!
|
ZTEX Firmware Kit for EZ-USB Microcontrollers
|
ZTEX Firmware Kit for EZ-USB FX2 Microcontrollers
|
Copyright (C) 2009-2010 ZTEX e.K.
|
Copyright (C) 2009-2011 ZTEX GmbH.
|
http://www.ztex.de
|
http://www.ztex.de
|
|
|
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
it under the terms of the GNU General Public License version 3 as
|
it under the terms of the GNU General Public License version 3 as
|
published by the Free Software Foundation.
|
published by the Free Software Foundation.
|
Line 34... |
Line 34... |
#else
|
#else
|
#define[FLASH_CS_BIT][7]
|
#define[FLASH_CS_BIT][7]
|
//#warning[FLASH_CS_BIT=7]
|
//#warning[FLASH_CS_BIT=7]
|
#endif
|
#endif
|
|
|
xdata BYTE flash_buffer = 1; // current buffer 1
|
__xdata BYTE flash_buffer = 1; // current buffer 1
|
xdata BYTE flash_bufferModified = 0; // 1 indicates that the current flash page needs to be reprogrammeded
|
__xdata BYTE flash_bufferModified = 0; // 1 indicates that the current flash page needs to be reprogrammeded
|
xdata WORD flash_page = 0xffff; // current flash page
|
__xdata WORD flash_page = 0xffff; // current flash page
|
xdata WORD flash_nextPage = 0xffff; // next flash page (usually flashPage+1)
|
__xdata WORD flash_nextPage = 0xffff; // next flash page (usually flashPage+1)
|
xdata WORD flash_maxPage = 0; // next flash page (usually flashPage+1)
|
__xdata WORD flash_maxPage = 0; // next flash page (usually flashPage+1)
|
xdata WORD flash_pageSize = 528; // page size (512 or 528)
|
__xdata WORD flash_pageSize = 528; // page size (512 or 528)
|
xdata BYTE flash_register[4]; // used to store register content
|
__xdata BYTE flash_register[4]; // used to store register content
|
|
|
/* *********************************************************************
|
/* *********************************************************************
|
***** flash_setPage *************************************************
|
***** flash_setPage *************************************************
|
********************************************************************* */
|
********************************************************************* */
|
/* set the current page, i.e. executes the following steps
|
/* set the current page, i.e. executes the following steps
|