aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-04-08 17:47:11 (GMT)
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-07-24 12:38:22 (GMT)
commite40b2fa239e15c3ea8ea9407be704882916bcacc (patch)
tree2cbc03aaaea67e9d86bc61d372ddef2ceba4baaf
parent0ee78af736ce947d286d21b5fdc2c0212b2f8d38 (diff)
downloadkernel_samsung_smdk4412-e40b2fa239e15c3ea8ea9407be704882916bcacc.zip
kernel_samsung_smdk4412-e40b2fa239e15c3ea8ea9407be704882916bcacc.tar.gz
kernel_samsung_smdk4412-e40b2fa239e15c3ea8ea9407be704882916bcacc.tar.bz2
input: cypress touchkey: cypressbln: also remove unused firmware loading code
Some of the files (issp_*) that are involved in the firmware loading have unclear licensing statements. Removing the problematic files and adapting the code to compile without them is easier and faster than getting legal advise to understand if the files are under a free software license or not. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--drivers/input/keyboard/cypressbln/Makefile2
-rw-r--r--drivers/input/keyboard/cypressbln/cypress-touchkey.c285
-rw-r--r--drivers/input/keyboard/cypressbln/issp_defs.h101
-rw-r--r--drivers/input/keyboard/cypressbln/issp_delays.h87
-rw-r--r--drivers/input/keyboard/cypressbln/issp_directives.h474
-rw-r--r--drivers/input/keyboard/cypressbln/issp_driver_routines.c461
-rw-r--r--drivers/input/keyboard/cypressbln/issp_errors.h65
-rw-r--r--drivers/input/keyboard/cypressbln/issp_extern.h99
-rw-r--r--drivers/input/keyboard/cypressbln/issp_main.c916
-rw-r--r--drivers/input/keyboard/cypressbln/issp_revision.h65
-rw-r--r--drivers/input/keyboard/cypressbln/issp_routines.c1044
-rw-r--r--drivers/input/keyboard/cypressbln/issp_vectors.h1146
12 files changed, 1 insertions, 4744 deletions
diff --git a/drivers/input/keyboard/cypressbln/Makefile b/drivers/input/keyboard/cypressbln/Makefile
index a50c126..2342d7f 100644
--- a/drivers/input/keyboard/cypressbln/Makefile
+++ b/drivers/input/keyboard/cypressbln/Makefile
@@ -2,4 +2,4 @@
# Makefile for the Cypress touchkey driver
#
-obj-$(CONFIG_KEYBOARD_CYPRESS_TOUCH_BLN) += cypress-touchkey.o issp_driver_routines.o issp_main.o issp_routines.o
+obj-$(CONFIG_KEYBOARD_CYPRESS_TOUCH_BLN) += cypress-touchkey.o
diff --git a/drivers/input/keyboard/cypressbln/cypress-touchkey.c b/drivers/input/keyboard/cypressbln/cypress-touchkey.c
index ef31ebc..194a251 100644
--- a/drivers/input/keyboard/cypressbln/cypress-touchkey.c
+++ b/drivers/input/keyboard/cypressbln/cypress-touchkey.c
@@ -43,7 +43,6 @@
#include <plat/gpio-cfg.h>
#include <mach/gpio.h>
-#include "issp_extern.h"
#ifdef CONFIG_TOUCHSCREEN_ATMEL_MXT540E
#include <linux/i2c/mxt540e.h>
#else
@@ -206,7 +205,6 @@ static void init_hw(void);
static int i2c_touchkey_probe(struct i2c_client *client,
const struct i2c_device_id *id);
-extern int get_touchkey_firmware(char *version);
static int touchkey_led_status;
static int touchled_cmd_reversed;
@@ -657,129 +655,6 @@ static ssize_t touchkey_threshold_show(struct device *dev,
}
#endif
-#if defined(CONFIG_MACH_C1_NA_SPR_EPIC2_REV00) \
- || defined(CONFIG_MACH_Q1_BD) \
- || defined(CONFIG_MACH_C1_NA_USCC_REV05) \
- || defined(CONFIG_TARGET_LOCALE_NA)
-void touchkey_firmware_update(void)
-{
- char data[3];
- int retry = 3;
- int ret = 0;
-
- ret = i2c_touchkey_read(KEYCODE_REG, data, 3);
- if (ret < 0) {
- printk(KERN_DEBUG
- "[TouchKey] i2c read fail. do not excute firm update.\n");
- return;
- }
-
- touch_version = data[1];
- module_version = data[2];
-
-#ifdef CONFIG_MACH_C1_NA_SPR_EPIC2_REV00
- if (system_rev > 6) {
- printk(KERN_DEBUG "[TouchKey] not firmup hw(system_rev=%d)\n",
- system_rev);
- return;
- }
-#endif
-
- if ((touch_version < TK_FIRMWARE_VER) &&
- (module_version == TK_MODULE_VER)) {
- printk(KERN_DEBUG "[TouchKey] firmware auto update excute\n");
- disable_irq(IRQ_TOUCH_INT);
- touchkey_update_status = 1;
-
- while (retry--) {
- if (ISSP_main() == 0) {
- printk(KERN_DEBUG
- "[TouchKey]firmware update succeeded\n");
- touchkey_update_status = 0;
- break;
- }
- msleep(100);
- printk(KERN_DEBUG
- "[TouchKey] firmware update failed. retry\n");
- }
- if (retry <= 0) {
- touchkey_ldo_on(0);
- touchkey_update_status = -1;
- printk(KERN_DEBUG
- "[TouchKey] firmware update failed.\n");
- msleep(300);
- }
- enable_irq(IRQ_TOUCH_INT);
- init_hw();
- } else {
- printk(KERN_DEBUG
- "[TouchKey] firmware auto update do not excute\n");
- printk(KERN_DEBUG
- "[TouchKey] firmware_ver(banary=%d, current=%d)\n",
- TK_FIRMWARE_VER, touch_version);
- printk(KERN_DEBUG
- "[TouchKey] module_ver(banary=%d, current=%d)\n",
- TK_MODULE_VER, module_version);
- return;
- }
- msleep(100);
- i2c_touchkey_read(KEYCODE_REG, data, 3);
- touch_version = data[1];
- module_version = data[2];
- printk(KERN_DEBUG "[TouchKey] firm ver = %d, module ver = %d\n",
- touch_version, module_version);
-}
-#else
-void touchkey_firmware_update(void)
-{
- char data[3];
- int retry;
- int ret = 0;
-
- ret = i2c_touchkey_read(KEYCODE_REG, data, 3);
- if (ret < 0) {
- printk(KERN_DEBUG
- "[TouchKey] i2c read fail. do not excute firm update.\n");
- return;
- }
-
- printk(KERN_ERR "%s F/W version: 0x%x, Module version:0x%x\n", __func__,
- data[1], data[2]);
- retry = 3;
-
- touch_version = data[1];
- module_version = data[2];
-
- if (touch_version < 0x0A) {
- touchkey_update_status = 1;
- while (retry--) {
- if (ISSP_main() == 0) {
- printk(KERN_ERR
- "[TOUCHKEY]Touchkey_update succeeded\n");
- touchkey_update_status = 0;
- break;
- }
- printk(KERN_ERR "touchkey_update failed...retry...\n");
- }
- if (retry <= 0) {
- touchkey_ldo_on(0);
- touchkey_update_status = -1;
- msleep(300);
- }
-
- init_hw();
- } else {
- if (touch_version >= 0x0A) {
- printk(KERN_ERR
- "[TouchKey] Not F/W update. Cypess touch-key F/W version is latest\n");
- } else {
- printk(KERN_ERR
- "[TouchKey] Not F/W update. Cypess touch-key version(module or F/W) is not valid\n");
- }
- }
-}
-#endif
-
void touchkey_work_func(struct work_struct *p)
{
u8 data[3];
@@ -1606,17 +1481,6 @@ int touchkey_update_open(struct inode *inode, struct file *filp)
return 0;
}
-ssize_t touchkey_update_read(struct file *filp, char *buf, size_t count,
- loff_t *f_pos)
-{
- char data[3] = { 0, };
-
- get_touchkey_firmware(data);
- put_user(data[1], buf);
-
- return 1;
-}
-
int touchkey_update_release(struct inode *inode, struct file *filp)
{
return 0;
@@ -1648,75 +1512,6 @@ static ssize_t touch_version_write(struct device *dev,
return size;
}
-void touchkey_update_func(struct work_struct *p)
-{
- int retry = 10;
-#if defined(CONFIG_TARGET_LOCALE_NAATT)
- char data[3];
- i2c_touchkey_read(KEYCODE_REG, data, 3);
- printk(KERN_DEBUG "[%s] F/W version: 0x%x, Module version:0x%x\n",
- __func__, data[1], data[2]);
-#endif
- touchkey_update_status = 1;
- printk(KERN_DEBUG "[TouchKey] %s start\n", __func__);
- touchkey_enable = 0;
- while (retry--) {
- if (ISSP_main() == 0) {
- printk(KERN_DEBUG
- "[TouchKey] touchkey_update succeeded\n");
- init_hw();
- enable_irq(IRQ_TOUCH_INT);
- touchkey_enable = 1;
-#if defined(CONFIG_MACH_Q1_BD)
- touchkey_autocalibration();
-#else
-#if defined(CONFIG_TARGET_LOCALE_NA)
- if (store_module_version >= 8)
- touchkey_autocalibration();
-#endif
-#endif
- touchkey_update_status = 0;
- return;
- }
-#if defined(CONFIG_TARGET_LOCALE_NAATT) \
-|| defined(CONFIG_TARGET_LOCALE_NA) || defined(CONFIG_MACH_Q1_BD)
- touchkey_ldo_on(0);
- msleep(300);
- init_hw();
-#endif
- }
-
- touchkey_update_status = -1;
- printk(KERN_DEBUG "[TouchKey] touchkey_update failed\n");
- return;
-}
-
-static ssize_t touch_update_write(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t size)
-{
-#ifdef CONFIG_TARGET_LOCALE_NA
- if (store_module_version < 8) {
- printk(KERN_DEBUG
- "[TouchKey] Skipping f/w update : module_version =%d\n",
- store_module_version);
- touchkey_update_status = 0;
- return 1;
- } else {
-#endif /* CONFIG_TARGET_LOCALE_NA */
- printk(KERN_DEBUG "[TouchKey] touchkey firmware update\n");
-
- if (*buf == 'S') {
- disable_irq(IRQ_TOUCH_INT);
- INIT_WORK(&touch_update_work, touchkey_update_func);
- queue_work(touchkey_wq, &touch_update_work);
- }
- return size;
-#ifdef CONFIG_TARGET_LOCALE_NA
- }
-#endif /* CONFIG_TARGET_LOCALE_NA */
-}
-
static ssize_t touch_update_read(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -1979,59 +1774,6 @@ static ssize_t set_touchkey_firm_version_show(struct device *dev,
return sprintf(buf, "0x%x\n", TK_FIRMWARE_VER);
}
-static ssize_t set_touchkey_update_show(struct device *dev,
- struct device_attribute *attr,
- char *buf)
-{
- /* TO DO IT */
- int count = 0;
- int retry = 3;
- touchkey_update_status = 1;
-
- while (retry--) {
- if (ISSP_main() == 0) {
- printk(KERN_ERR
- "[TOUCHKEY]Touchkey_update succeeded\n");
- touchkey_update_status = 0;
- count = 1;
- break;
- }
- printk(KERN_ERR "touchkey_update failed... retry...\n");
- }
- if (retry <= 0) {
- /* disable ldo11 */
- touchkey_ldo_on(0);
- msleep(300);
- count = 0;
- printk(KERN_ERR "[TOUCHKEY]Touchkey_update fail\n");
- touchkey_update_status = -1;
- return count;
- }
-
- init_hw(); /* after update, re initalize. */
-
- return count;
-
-}
-
-static ssize_t set_touchkey_firm_version_read_show(struct device *dev,
- struct device_attribute
- *attr, char *buf)
-{
- char data[3] = { 0, };
- int count;
-
- init_hw();
- /*if (get_touchkey_firmware(data) != 0) { */
- i2c_touchkey_read(KEYCODE_REG, data, 3);
- /*} */
- count = sprintf(buf, "0x%x\n", data[1]);
-
- printk(KERN_DEBUG "[TouchKey] touch_version_read 0x%x\n", data[1]);
- printk(KERN_DEBUG "[TouchKey] module_version_read 0x%x\n", data[2]);
- return count;
-}
-
static ssize_t set_touchkey_firm_status_show(struct device *dev,
struct device_attribute *attr,
char *buf)
@@ -2054,8 +1796,6 @@ static ssize_t set_touchkey_firm_status_show(struct device *dev,
static DEVICE_ATTR(recommended_version, S_IRUGO | S_IWUSR | S_IWGRP,
touch_version_read, touch_version_write);
-static DEVICE_ATTR(updated_version, S_IRUGO | S_IWUSR | S_IWGRP,
- touch_update_read, touch_update_write);
static DEVICE_ATTR(brightness, S_IRUGO | S_IWUSR | S_IWGRP, NULL,
touch_led_control);
static DEVICE_ATTR(enable_disable, S_IRUGO | S_IWUSR | S_IWGRP, NULL,
@@ -2071,14 +1811,10 @@ static DEVICE_ATTR(touchkey_search, S_IRUGO, touchkey_search_show, NULL);
static DEVICE_ATTR(touch_sensitivity, S_IRUGO | S_IWUSR | S_IWGRP, NULL,
touch_sensitivity_control);
/*20110223N1 firmware sync*/
-static DEVICE_ATTR(touchkey_firm_update, S_IRUGO | S_IWUSR | S_IWGRP,
- set_touchkey_update_show, NULL);/* firmware update */
static DEVICE_ATTR(touchkey_firm_update_status, S_IRUGO | S_IWUSR | S_IWGRP,
set_touchkey_firm_status_show, NULL);/* firmware update status */
static DEVICE_ATTR(touchkey_firm_version_phone, S_IRUGO | S_IWUSR | S_IWGRP,
set_touchkey_firm_version_show, NULL);/* PHONE */
-static DEVICE_ATTR(touchkey_firm_version_panel, S_IRUGO | S_IWUSR | S_IWGRP,
- set_touchkey_firm_version_read_show, NULL);
/*PART*/
/*end N1 firmware sync*/
static DEVICE_ATTR(touchkey_brightness, S_IRUGO | S_IWUSR | S_IWGRP, NULL,
@@ -2117,26 +1853,11 @@ static int __init touchkey_init(void)
if (IS_ERR(sec_touchkey))
printk(KERN_ERR "Failed to create device(sec_touchkey)!\n");
- if (device_create_file(sec_touchkey, &dev_attr_touchkey_firm_update) <
- 0) {
- printk(KERN_ERR "Failed to create device file(%s)!\n",
- dev_attr_touchkey_firm_update.attr.name);
- }
- if (device_create_file
- (sec_touchkey, &dev_attr_touchkey_firm_update_status) < 0) {
- printk(KERN_ERR "Failed to create device file(%s)!\n",
- dev_attr_touchkey_firm_update_status.attr.name);
- }
if (device_create_file
(sec_touchkey, &dev_attr_touchkey_firm_version_phone) < 0) {
printk(KERN_ERR "Failed to create device file(%s)!\n",
dev_attr_touchkey_firm_version_phone.attr.name);
}
- if (device_create_file
- (sec_touchkey, &dev_attr_touchkey_firm_version_panel) < 0) {
- printk(KERN_ERR "Failed to create device file(%s)!\n",
- dev_attr_touchkey_firm_version_panel.attr.name);
- }
if (device_create_file(sec_touchkey,
&dev_attr_touchkey_brightness) < 0) {
printk(KERN_ERR "Failed to create device file(%s)!\n",
@@ -2158,12 +1879,6 @@ static int __init touchkey_init(void)
}
if (device_create_file(sec_touchkey,
- &dev_attr_updated_version) < 0) {
- pr_err("Failed to create device file(%s)!\n",
- dev_attr_updated_version.attr.name);
- }
-
- if (device_create_file(sec_touchkey,
&dev_attr_brightness) < 0) {
pr_err("Failed to create device file(%s)!\n",
dev_attr_brightness.attr.name);
diff --git a/drivers/input/keyboard/cypressbln/issp_defs.h b/drivers/input/keyboard/cypressbln/issp_defs.h
deleted file mode 100644
index 5878300..0000000
--- a/drivers/input/keyboard/cypressbln/issp_defs.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// filename: ISSP_Defs.h
-#include "issp_revision.h"
-#ifdef PROJECT_REV_304
-/* Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress� product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-
---------------------------------------------------------------------------*/
-#ifndef INC_ISSP_DEFS
-#define INC_ISSP_DEFS
-
-#include "issp_directives.h"
-
-// Block-Verify Uses 64-Bytes of RAM
-// #define TARGET_DATABUFF_LEN 64
-#define TARGET_DATABUFF_LEN 128 // **** CY8C20x66 Device ****
-
-// The number of Flash blocks in each part is defined here. This is used in
-// main programming loop when programming and verifying the blocks.
-
-#ifdef CY8CTMx30x // **** CY8C20x66 Device ****
-#define NUM_BANKS 1
-#define BLOCKS_PER_BANK 256
-#define SECURITY_BYTES_PER_BANK 64
-#endif
-
-#ifdef CY8C20x66 // **** CY8C20x66 Device ****
-#ifdef CY8C20246 // **** CY8C20x66 Device ****
-#define NUM_BANKS 1
-#define BLOCKS_PER_BANK 128
-#define SECURITY_BYTES_PER_BANK 64
-#elif defined(CY8C20236)
-#define NUM_BANKS 1
-#define BLOCKS_PER_BANK 64
-#define SECURITY_BYTES_PER_BANK 64
-#else
-#define NUM_BANKS 1
-#define BLOCKS_PER_BANK 256
-#define SECURITY_BYTES_PER_BANK 64
-#endif
-#endif
-#ifdef CY8C21x23
-#define NUM_BANKS 1
-#define BLOCKS_PER_BANK 64
-#define SECURITY_BYTES_PER_BANK 64
-#endif
-#ifdef CY8C21x34
-#define NUM_BANKS 1
-#define BLOCKS_PER_BANK 128
-#define SECURITY_BYTES_PER_BANK 64
-#endif
-#ifdef CY8C24x23A
-#define NUM_BANKS 1
-#define BLOCKS_PER_BANK 64
-#define SECURITY_BYTES_PER_BANK 64
-#endif
-#ifdef CY8C24x94
-#define NUM_BANKS 2
-#define BLOCKS_PER_BANK 128
-#define SECURITY_BYTES_PER_BANK 32
-#endif
-#ifdef CY8C27x43
-#define NUM_BANKS 1
-#define BLOCKS_PER_BANK 256
-#define SECURITY_BYTES_PER_BANK 64
-#endif
-#ifdef CY8C29x66
-#define NUM_BANKS 4
-#define BLOCKS_PER_BANK 128
-#define SECURITY_BYTES_PER_BANK 32
-#endif
-#endif //(INC_ISSP_DEFS)
-#endif //(PROJECT_REV_)
-//end of file ISSP_Defs.h
diff --git a/drivers/input/keyboard/cypressbln/issp_delays.h b/drivers/input/keyboard/cypressbln/issp_delays.h
deleted file mode 100644
index e727310..0000000
--- a/drivers/input/keyboard/cypressbln/issp_delays.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// filename: ISSP_Delays.h
-#include "issp_revision.h"
-#ifdef PROJECT_REV_304
-/* Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress� product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-
------------------------------------------------------------------------------*/
-#ifndef INC_ISSP_DELAYS
-#define INC_ISSP_DELAYS
-
-// The Delay() routine, in ISSP_Driver_Routines.c, has a delay of n+3 usec,
-// where n is the value passed to the routine. This is true for the m8c micro-
-// processor in the PSoC when it is running at a CPU clock of 24MHz.
-//
-// PROCESSOR_SPECIFIC
-// If another processor is used, or if the m8c is running at a slower clock
-// speed, then the delay parameters will be different. This file makes changing
-// the delays simpiler when porting the program to other processors.
-
-// DELAY_M is the slope of the Delay = Mx + B equation
-#define DELAY_M 1
-// DELAY_B is the offset of the delay in Delay = Mx + B.
-#define DELAY_B 3
-
-///////////////////////////////////////////////////////////////////////////////
-// CAUTION:
-// For the above parameters the minimum delay value is 3 (this would result in
-// 0 being passed for a minimum delay. A value less than 3 would actually
-// create a negative number, causing a very long delay
-///////////////////////////////////////////////////////////////////////////////
-
-// TRANSITION_TIMEOUT is a loop counter for a 100msec timeout when waiting for
-// a high-to-low transition. This is used in the polling loop of
-// fDetectHiLoTransition(). Each pass through the loop takes approximately 15
-// usec. 100 msec is about 6740 loops. 13480
-#define TRANSITION_TIMEOUT 0x100000 //6740
-
-// XRES_DELAY is the time duration for which XRES is asserted. This defines
-// a 63 usec delay.
-// The minimum Xres time (from the device datasheet) is 10 usec.
-//mhsong #define XRES_CLK_DELAY ((63 - DELAY_B) / DELAY_M)
-#define XRES_CLK_DELAY 63
-
-// POWER_CYCLE_DELAY is the time required when power is cycled to the target
-// device to create a power reset after programming has been completed. The
-// actual time of this delay will vary from system to system depending on the
-// bypass capacitor size. A delay of 150 usec is used here.
-//mhsong #define POWER_CYCLE_DELAY ((150 - DELAY_B) / DELAY_M)
-#define POWER_CYCLE_DELAY 150
-
-// DELAY_100us delays 100 usec. This is used in fXRESInitializeTargetForISSP to
-// time the wait for Vdd to become stable after a power up. A loop runs 10 of
-// these for a total delay of 1 msec.
-//mhsong #define DELAY100us ((100 - DELAY_B) / DELAY_M)
-#define DELAY100us 100
-
-#endif //(INC_ISSP_DELAYS)
-#endif //(PROJECT_REV_)
-//end of file ISSP_Delays.h
diff --git a/drivers/input/keyboard/cypressbln/issp_directives.h b/drivers/input/keyboard/cypressbln/issp_directives.h
deleted file mode 100644
index b6cdddc..0000000
--- a/drivers/input/keyboard/cypressbln/issp_directives.h
+++ /dev/null
@@ -1,474 +0,0 @@
-// filename: ISSP_Directives.h
-#include "issp_revision.h"
-#ifdef PROJECT_REV_304
-/* Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress� product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-
-----------------------------------------------------------------------------*/
-
-// --------------------- Compiler Directives ----------------------------------
-#ifndef INC_ISSP_DIRECTIVES
-#define INC_ISSP_DIRECTIVES
-
-// This directive will enable a Genral Purpose test-point on P1.7
-// It can be toggled as needed to measure timing, execution, etc...
-// A "Test Point" sets a GPIO pin of the host processor high or low. This GPIO
-// pin can be observed with an oscilloscope to verify the timing of key
-// programming steps. TPs have been added in main() that set Port 0, pin 1
-// high during bulk erase, during each block write and during security write.
-// The timing of these programming steps should be verified as correct as part
-// of the validation process of the final program.
-
-//JBA
-//#define USE_TP
-
-// ****************************************************************************
-// ************* USER ATTENTION REQUIRED: TARGET SUPPLY VOLTAGE ***************
-// ****************************************************************************
-// This directive causes the proper Initialization vector #3 to be sent
-// to the Target, based on what the Target Vdd programming voltage will
-// be. Either 5V (if #define enabled) or 3.3V (if #define disabled).
-
-//JBA
-//#define TARGET_VOLTAGE_IS_5V
-
-// ****************************************************************************
-// **************** USER ATTENTION REQUIRED: PROGRAMMING MODE *****************
-// ****************************************************************************
-// This directive selects whether code that uses reset programming mode or code
-// that uses power cycle programming is use. Reset programming mode uses the
-// external reset pin (XRES) to enter programming mode. Power cycle programming
-// mode uses the power-on reset to enter programming mode.
-// Applying signals to various pins on the target device must be done in a
-// deliberate order when using power cycle mode. Otherwise, high signals to GPIO
-// pins on the target will power the PSoC through the protection diodes.
-
-//JBA
-// choose the RESET MODE or POWER MODE
-// #define RESET_MODE
-
-// ****************************************************************************
-// ****************** USER ATTENTION REQUIRED: TARGET PSOC ********************
-// ****************************************************************************
-// The directives below enable support for various PSoC devices. The root part
-// number to be programmed should be un-commented so that its value becomes
-// defined. All other devices should be commented out.
-// Select one device to be supported below:
-
-/*************** CY8CTMA30x, CY8CTMG30x, CY8CTST30x series by KIMC, 2009.08.11 ***********************************/
-//#define CY8CTST300_36 // CY8CTST300_36LQXI // 2009.08.11, not tested.
-//#define CY8CTST300_48 // CY8CTST300_48LTXI // 2009.08.11, not tested.
-//#define CY8CTST300_49 // CY8CTST300_49FNXI // 2009.08.11, not tested.
-//#define CY8CTMA300_36 // CY8CTMA300_36LQXI // 2009.08.11, Test OK.
-//#define CY8CTMA300_48 // CY8CTMA300_48LTXI // 2009.08.11, not tested.
-//#define CY8CTMA300_49 // CY8CTMA300_49FNXI // 2009.08.11, not tested.
-//#define CY8CTMG300_36 // CY8CTMG300_36LQXI // 2009.08.11, not tested.
-//#define CY8CTMG300_48 // CY8CTMG300_48LTXI // 2009.08.11, not tested.
-//#define CY8CTMG300_49 // CY8CTMG300_49FNXI // 2009.08.11, not tested.
-//#define CY8CTMG300B_36 // CY8CTMG300B_36LQXI // 2009.08.11, not tested.
-//#define CY8CTMA300B_36 // CY8CTMA300B_36LQXI // 2009.08.11, not tested.
-//#define CY8CTST300B_36 // CY8CTST300B_36LQXI // 2009.08.11, not tested.
-//#define CY8CTMA301_36 // CY8CTMA301_36LQXI // 2009.08.11, not tested.
-//#define CY8CTMA301_48 // CY8CTMA301_48LTXI // 2009.08.11, not tested.
-//#define CY8CTMA301D_36 // CY8CTMA301D_36LQXI // 2009.08.11, not tested.
-//#define CY8CTMA301D_48 // CY8CTMA301D_48LTXI // 2009.08.11, not tested.
-//#define CY8CTMA300D_36 // CY8CTMA300D_36LQXI // 2009.08.11, not tested.
-//#define CY8CTMA300D_48 // CY8CTMA300D_48LTXI // 2009.08.11, not tested.
-//#define CY8CTMA300D_49 // CY8CTMA300D_49FNXIT // 2009.08.11, not tested.
-/****************************************************************************************************/
-
-/*************** CY8CTMG/TST series modified by KJHW, 2009.08.14 *********************************************/
-//#define CY8CTMG110
-//#define CY8CTST200_24PIN
-//#define CY8CTST200_32PIN
-//#define CY8CTMG200_24PIN
-//#define CY8CTMG200_32PIN
-/***************************************************************************************************/
-
-#define CY8C20236
-// **** CY8C20x66 devices ****
-//#define CY8C20246 /// 2009.03.26. kimc
-//#define CY8C20266
-//#define CY8C20366
-//#define CY8C20466
-//#define CY8C20566
-//#define CY8C20666
-//#define CY8C20066
-//#define CY8C200661
-
-// **** CY8C21x23 devices ****
-//#define CY8C21123
-//#define CY8C21223
-//#define CY8C21323
-//#define CY8C21002
-
-// **** CY8C21x34 devices ****
-//#define CY8C21234
-//#define CY8C21334
-//#define CY8C21434
-//#define CY8C21534
-//#define CY8C21634
-//#define CY8C21001
-
-// **** CY8C24x23A devices ****
-//#define CY8C24123A
-//#define CY8C24223A
-//#define CY8C24423A
-//#define CY8C24000A
-
-// **** CY8C24x94 devices ****
-//#define CY8C24794
-//#define CY8C24894
-//#define CY8C24994
-//#define CY8C24094
-
-// **** CY8C27x34 devices ****
-//#define CY8C27143
-//#define CY8C27243
-//#define CY8C27443
-//#define CY8C27543
-//#define CY8C27643
-//#define CY8C27002
-
-// **** CY8C29x66 devices ****
-//#define CY8C29466
-//#define CY8C29566
-//#define CY8C29666
-//#define CY8C29866
-//#define CY8C29002
-
-//-----------------------------------------------------------------------------
-// This section sets the Family that has been selected. These are used to
-// simplify other conditional compilation blocks.
-//-----------------------------------------------------------------------------
-
-/*************** CY8CTMA30x, CY8CTMG30x, CY8CTST30x series by KIMC, 2009.08.11 ***********************************/
-#ifdef CY8CTST300_36 // CY8CTST300_36LQXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTST300_48 // CY8CTST300_48LTXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTST300_49 // CY8CTST300_49FNXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA300_36 // CY8CTMA300_36LQXI // 2009.08.11, test OK
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA300_48 // CY8CTMA300_48LTXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA300_49 // CY8CTMA300_49FNXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMG300_36 // CY8CTMG300_36LQXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMG300_48 // CY8CTMG300_48LTXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMG300_49 // CY8CTMG300_49FNXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMG300B_36 // CY8CTMG300B_36LQXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA300B_36 // CY8CTMA300B_36LQXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTST300B_36 // CY8CTST300B_36LQXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA301_36 // CY8CTMA301_36LQXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA301_48 // CY8CTMA301_48LTXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA301D_36 // CY8CTMA301D_36LQXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA301D_48 // CY8CTMA301D_48LTXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA300D_36 // CY8CTMA300D_36LQXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA300D_48 // CY8CTMA300D_48LTXI // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-#ifdef CY8CTMA300D_49 // CY8CTMA300D_49FNXIT // 2009.08.11, not tested.
-#define CY8CTMx30x
-#define CY8C20x66
-#endif
-/**************************************************/
-
-/*************** CY8CTMG/TST series modified by KJHW, 2009.08.14 *********************************************/
-
-#ifdef CY8CTMG110
-#define CY8C21x34
-#endif
-#ifdef CY8CTST200_24PIN
-#define CY8C20x66
-#endif
-#ifdef CY8CTST200_32PIN
-#define CY8C20x66
-#endif
-#ifdef CY8CTMG200_24PIN
-#define CY8C20x66
-#endif
-#ifdef CY8CTMG200_32PIN
-#define CY8C20x66
-#endif
-
-/***************************************************************************************************/
-#ifdef CY8C20236
-#define CY8C20x66
-#endif
-#ifdef CY8C20246 /// 2009.03.26. kimc
-#define CY8C20x66
-#endif
-#ifdef CY8C20266
-#define CY8C20x66
-#endif
-#ifdef CY8C20366
-#define CY8C20x66
-#endif
-#ifdef CY8C20466
-#define CY8C20x66
-#endif
-#ifdef CY8C20566
-#define CY8C20x66
-#endif
-#ifdef CY8C20666
-#define CY8C20x66
-#endif
-#ifdef CY8C20066
-#define CY8C20x66
-#endif
-#ifdef CY8C200661
-#define CY8C20x66
-#endif
-
-#ifdef CY8C21123
-#define CY8C21x23
-#endif
-#ifdef CY8C21223
-#define CY8C21x23
-#endif
-#ifdef CY8C21323
-#define CY8C21x23
-#endif
-#ifdef CY8C21002
-#define CY8C21x23
-#endif
-#ifdef CY8C21234
-#define CY8C21x34
-#endif
-#ifdef CY8C21334
-#define CY8C21x34
-#endif
-#ifdef CY8C21434
-#define CY8C21x34
-#endif
-#ifdef CY8C21534
-#define CY8C21x34
-#endif
-#ifdef CY8C21634
-#define CY8C21x34
-#endif
-#ifdef CY8C21001
-#define CY8C21x34
-#endif
-#ifdef CY8C24123A
-#define CY8C24x23A
-#endif
-#ifdef CY8C24223A
-#define CY8C24x23A
-#endif
-#ifdef CY8C24423A
-#define CY8C24x23A
-#endif
-#ifdef CY8C24000A
-#define CY8C24x23A
-#endif
-#ifdef CY8C24794
-#define CY8C24x94
-#endif
-#ifdef CY8C24894
-#define CY8C24x94
-#endif
-#ifdef CY8C24994
-#define CY8C24x94
-#endif
-#ifdef CY8C24094
-#define CY8C24x94
-#endif
-#ifdef CY8C27143
-#define CY8C27x43
-#endif
-#ifdef CY8C27243
-#define CY8C27x43
-#endif
-#ifdef CY8C27443
-#define CY8C27x43
-#endif
-#ifdef CY8C27543
-#define CY8C27x43
-#endif
-#ifdef CY8C27643
-#define CY8C27x43
-#endif
-#ifdef CY8C27002
-#define CY8C27x43
-#endif
-#ifdef CY8C29466
-#define CY8C29x66
-#endif
-#ifdef CY8C29566
-#define CY8C29x66
-#endif
-#ifdef CY8C29666
-#define CY8C29x66
-#endif
-#ifdef CY8C29866
-#define CY8C29x66
-#endif
-#ifdef CY8C29002
-#define CY8C29x66
-#endif
-
-//-----------------------------------------------------------------------------
-// The directives below are used for Krypton.
-// See the Krypton programming spec 001-15870 rev *A for more details. (The
-// spec uses "mnemonics" instead of "directives"
-//-----------------------------------------------------------------------------
-#ifdef CY8C20x66
-#define TSYNC
-
-#define ID_SETUP_1 //PTJ: ID_SETUP_1 is similar to init1_v
-#define ID_SETUP_2 //PTJ: ID_SETUP_2 is similar to init2_v
-#define SET_BLOCK_NUM
-#define CHECKSUM_SETUP //PTJ: CHECKSUM_SETUP_20x66 is the same as CHECKSUM-SETUP in 001-15870
-#define READ_CHECKSUM
-#define PROGRAM_AND_VERIFY //PTJ: PROGRAM_BLOCK_20x66 is the same as PROGRAM-AND-VERIFY in 001-15870
-#define ERASE
-#define SECURE
-#define READ_SECURITY
-#define READ_WRITE_SETUP
-#define WRITE_BYTE
-#define VERIFY_SETUP
-#define READ_STATUS
-#define READ_BYTE
- //READ_ID_WORD //PTJ: 3rd Party Progrmmer will have to write code to handle this directive, we do it out own way in this code, see read_id_v
-#endif
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// The directives below are used to define various sets of vectors that differ
-// for more than one set of PSoC parts.
-//-----------------------------------------------------------------------------
-// **** Select a Checksum Setup Vector ****
-#ifdef CY8C21x23
-#define CHECKSUM_SETUP_21_27
-#endif
-#ifdef CY8C21x34
-#define CHECKSUM_SETUP_21_27
-#endif
-#ifdef CY8C24x23A
-#define CHECKSUM_SETUP_24_24A
-#endif
-#ifdef CY8C24x94
-#define CHECKSUM_SETUP_24_29
-#endif
-#ifdef CY8C27x43
-#define CHECKSUM_SETUP_21_27
-#endif
-#ifdef CY8C29x66
-#define CHECKSUM_SETUP_24_29
-#endif
-
-// **** Select a Program Block Vector ****
-
-#ifdef CY8C21x23
-#define PROGRAM_BLOCK_21_24_29
-#endif
-#ifdef CY8C21x34
-#define PROGRAM_BLOCK_21_24_29
-#endif
-#ifdef CY8C24x23A
-#define PROGRAM_BLOCK_21_24_29
-#endif
-#ifdef CY8C24x94
-#define PROGRAM_BLOCK_21_24_29
-#endif
-#ifdef CY8C27x43
-#define PROGRAM_BLOCK_27
-#endif
-#ifdef CY8C29x66
-#define PROGRAM_BLOCK_21_24_29
-#endif
-
-//-----------------------------------------------------------------------------
-// The directives below are used to control switching banks if the device is
-// has multiple banks of Flash.
-//-----------------------------------------------------------------------------
-// **** Select a Checksum Setup Vector ****
-#ifdef CY8C24x94
-#define MULTI_BANK
-#endif
-#ifdef CY8C29x66
-#define MULTI_BANK
-#endif
-
-// ----------------------------------------------------------------------------
-#endif //(INC_ISSP_DIRECTIVES)
-#endif //(PROJECT_REV_)
-//end of file ISSP_Directives.h
diff --git a/drivers/input/keyboard/cypressbln/issp_driver_routines.c b/drivers/input/keyboard/cypressbln/issp_driver_routines.c
deleted file mode 100644
index 55edf15..0000000
--- a/drivers/input/keyboard/cypressbln/issp_driver_routines.c
+++ /dev/null
@@ -1,461 +0,0 @@
-// filename: ISSP_Driver_Routines.c
-#include "issp_revision.h"
-#ifdef PROJECT_REV_304
-/* Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress� product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-
---------------------------------------------------------------------------*/
-
-#include <linux/module.h>
-
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/i2c.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/sched.h>
-#include <linux/pm.h>
-#include <linux/sysctl.h>
-#include <linux/proc_fs.h>
-#include <linux/delay.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <mach/regs-gpio.h>
-#include <plat/gpio-cfg.h>
-#include <asm/gpio.h>
-#include <linux/miscdevice.h>
-#include <asm/uaccess.h>
-#include <linux/earlysuspend.h>
-#include <asm/io.h>
-#include <linux/hrtimer.h>
-
-//mhsong #include <m8c.h> // part specific constants and macros
-//mhsong #include "PSoCAPI.h" // PSoC API definitions for all User Modules
-#include "issp_defs.h"
-#include "issp_errors.h"
-#include "issp_directives.h"
-#include "u1-cypress-gpio.h"
-
-extern unsigned char bTargetDataPtr;
-extern unsigned char abTargetDataOUT[TARGET_DATABUFF_LEN];
-
-/* enable ldo11 */
-extern int touchkey_ldo_on(bool on);
-
-// ****************************** PORT BIT MASKS ******************************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-#define SDATA_PIN 0x80 // P1.0 -> P1.4
-#define SCLK_PIN 0x40 // P1.1 -> P1.3
-#define XRES_PIN 0x40 // P2.0 -> P1.6
-#define TARGET_VDD 0x08 // P2.1
-
-unsigned int nBlockCount = 1; // test, KIMC
-
-// ((((((((((((((((((((((( DEMO ISSP SUBROUTINE SECTION )))))))))))))))))))))))
-// ((((( Demo Routines can be deleted in final ISSP project if not used )))))
-// ((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))
-
-// ============================================================================
-// InitTargetTestData()
-// !!!!!!!!!!!!!!!!!!FOR TEST!!!!!!!!!!!!!!!!!!!!!!!!!!
-// PROCESSOR_SPECIFIC
-// Loads a 64-Byte array to use as test data to program target. Ultimately,
-// this data should be fed to the Host by some other means, ie: I2C, RS232,
-// etc. Data should be derived from hex file.
-// Global variables affected:
-// bTargetDataPtr
-// abTargetDataOUT
-// ============================================================================
-void InitTargetTestData(unsigned char bBlockNum, unsigned char bBankNum)
-{
- // create unique data for each block
- for (bTargetDataPtr = 0; bTargetDataPtr < TARGET_DATABUFF_LEN;
- bTargetDataPtr++) {
- abTargetDataOUT[bTargetDataPtr] = nBlockCount;
- // abTargetDataOUT[bTargetDataPtr] = bTargetDataPtr + bBlockNum + bBankNum;
- }
- nBlockCount++;
-}
-
-// ============================================================================
-// LoadArrayWithSecurityData()
-// !!!!!!!!!!!!!!!!!!FOR TEST!!!!!!!!!!!!!!!!!!!!!!!!!!
-// PROCESSOR_SPECIFIC
-// Most likely this data will be fed to the Host by some other means, ie: I2C,
-// RS232, etc., or will be fixed in the host. The security data should come
-// from the hex file.
-// bStart - the starting byte in the array for loading data
-// bLength - the number of byte to write into the array
-// bType - the security data to write over the range defined by bStart and
-// bLength
-// ============================================================================
-void LoadArrayWithSecurityData(unsigned char bStart, unsigned char bLength,
- unsigned char bType)
-{
- // Now, write the desired security-bytes for the range specified
- for (bTargetDataPtr = bStart; bTargetDataPtr < bLength;
- bTargetDataPtr++) {
- abTargetDataOUT[bTargetDataPtr] = bType;
- }
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// Delay()
-// This delay uses a simple "nop" loop. With the CPU running at 24MHz, each
-// pass of the loop is about 1 usec plus an overhead of about 3 usec.
-// total delay = (n + 3) * 1 usec
-// To adjust delays and to adapt delays when porting this application, see the
-// ISSP_Delays.h file.
-// ****************************************************************************
-void Delay(unsigned char n) // by KIMC
-{
- udelay(n);
-}
-
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// fLoadSecurityData()
-// Load security data from hex file into 64 byte host ram buffer. In a fully
-// functional program (not a demo) this routine should do the following:
-// 1. Read data from security record in hex file into ram buffer.
-// 2. Check host ram buffer + record data (Address, # of bytes) against hex
-// record checksum at end of record line
-// 3. If error reread security data from file or abort
-// 4. Exit this Function and Program block
-// In this demo routine, all of the security data is set to unprotected (0x00)
-// and it returns.
-// This function always returns PASS. The flag return is reserving
-// functionality for non-demo versions.
-// ****************************************************************************
-signed char fLoadSecurityData(unsigned char bBankNum)
-{
- // >>> The following call is for demo use only. <<<
- // Function LoadArrayWithSecurityData fills buffer for demo
-// LoadArrayWithSecurityData(0,SECURITY_BYTES_PER_BANK, 0x00);
- LoadArrayWithSecurityData(0, SECURITY_BYTES_PER_BANK, 0xFF); //PTJ: 0x1B (00 01 10 11) is more interesting security data than 0x00 for testing purposes
-
- // Note:
- // Error checking should be added for the final version as noted above.
- // For demo use this function just returns PASS.
- return (PASS);
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// fSDATACheck()
-// Check SDATA pin for high or low logic level and return value to calling
-// routine.
-// Returns:
-// 0 if the pin was low.
-// 1 if the pin was high.
-// ****************************************************************************
-unsigned char fSDATACheck(void)
-{
- gpio_direction_input(_3_TOUCH_SDA_28V);
- if (gpio_get_value(_3_TOUCH_SDA_28V))
- return (1);
- else
- return (0);
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SCLKHigh()
-// Set the SCLK pin High
-// ****************************************************************************
-void SCLKHigh(void)
-{
- gpio_direction_output(_3_TOUCH_SCL_28V, 1);
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SCLKLow()
-// Make Clock pin Low
-// ****************************************************************************
-void SCLKLow(void)
-{
- gpio_direction_output(_3_TOUCH_SCL_28V, 0);
-}
-
-#ifndef RESET_MODE // Only needed for power cycle mode
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SetSCLKHiZ()
-// Set SCLK pin to HighZ drive mode.
-// ****************************************************************************
-void SetSCLKHiZ(void)
-{
- gpio_direction_input(_3_TOUCH_SCL_28V);
-}
-#endif
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SetSCLKStrong()
-// Set SCLK to an output (Strong drive mode)
-// ****************************************************************************
-void SetSCLKStrong(void)
-{
- //gpio_direction_output(_3_TOUCH_SCL_28V, 1);
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SetSDATAHigh()
-// Make SDATA pin High
-// ****************************************************************************
-void SetSDATAHigh(void)
-{
- gpio_direction_output(_3_TOUCH_SDA_28V, 1);
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SetSDATALow()
-// Make SDATA pin Low
-// ****************************************************************************
-void SetSDATALow(void)
-{
- gpio_direction_output(_3_TOUCH_SDA_28V, 0);
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SetSDATAHiZ()
-// Set SDATA pin to an input (HighZ drive mode).
-// ****************************************************************************
-void SetSDATAHiZ(void)
-{
- gpio_direction_input(_3_TOUCH_SDA_28V); // ENA-> DIS
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SetSDATAStrong()
-// Set SDATA for transmission (Strong drive mode) -- as opposed to being set to
-// High Z for receiving data.
-// ****************************************************************************
-void SetSDATAStrong(void)
-{
- //gpio_direction_output(_3_TOUCH_SDA_28V, 1);
-}
-
-#ifdef RESET_MODE
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SetXRESStrong()
-// Set external reset (XRES) to an output (Strong drive mode).
-// ****************************************************************************
-void SetXRESStrong(void)
-{
- //gpio_tlmm_config(EXT_TSP_RST);
- //gpio_out(EXT_TSP_RST, GPIO_HIGH_VALUE);
- //clk_busy_wait(1000);
- //clk_busy_wait(1000);
- //clk_busy_wait(1000);
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// AssertXRES()
-// Set XRES pin High
-// ****************************************************************************
-void AssertXRES(void)
-{
-#if 0
- gpio_tlmm_config(EXT_TSP_RST);
- gpio_out(EXT_TSP_RST, GPIO_HIGH_VALUE);
- clk_busy_wait(1000);
- clk_busy_wait(1000);
- clk_busy_wait(1000);
-#endif
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// DeassertXRES()
-// Set XRES pin low.
-// ****************************************************************************
-void DeassertXRES(void)
-{
- //gpio_out(EXT_TSP_RST, GPIO_LOW_VALUE);
-}
-#else
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// SetTargetVDDStrong()
-// Set VDD pin (PWR) to an output (Strong drive mode).
-// ****************************************************************************
-void SetTargetVDDStrong(void)
-{
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// ApplyTargetVDD()
-// Provide power to the target PSoC's Vdd pin through a GPIO.
-// ****************************************************************************
-void ApplyTargetVDD(void)
-{
- int ret;
-
- gpio_direction_input(_3_TOUCH_SDA_28V);
- gpio_direction_input(_3_TOUCH_SCL_28V);
- gpio_direction_output(_3_GPIO_TOUCH_EN, 1);
-
- /* enable ldo */
- ret = touchkey_ldo_on(1);
- if (ret == 0)
- printk(KERN_ERR "[Touchkey]regulator get fail!!!\n");
-
- mdelay(1);
-}
-
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// RemoveTargetVDD()
-// Remove power from the target PSoC's Vdd pin.
-// ****************************************************************************
-void RemoveTargetVDD(void)
-{
- gpio_direction_output(_3_GPIO_TOUCH_EN, 0);
-
- touchkey_ldo_on(0);
-}
-#endif
-
-#ifdef USE_TP
-// ********************* LOW-LEVEL ISSP SUBROUTINE SECTION ********************
-// ****************************************************************************
-// **** PROCESSOR SPECIFIC ****
-// ****************************************************************************
-// **** USER ATTENTION REQUIRED ****
-// ****************************************************************************
-// A "Test Point" sets a GPIO pin of the host processor high or low.
-// This GPIO pin can be observed with an oscilloscope to verify the timing of
-// key programming steps. TPs have been added in main() that set Port 0, pin 1
-// high during bulk erase, during each block write and during security write.
-// The timing of these programming steps should be verified as correct as part
-// of the validation process of the final program.
-// ****************************************************************************
-void InitTP(void)
-{
-}
-
-void SetTPHigh(void)
-{
-}
-
-void SetTPLow(void)
-{
-}
-
-void ToggleTP(void)
-{
-}
-#endif
-#endif //(PROJECT_REV_)
-//end of file ISSP_Drive_Routines.c
diff --git a/drivers/input/keyboard/cypressbln/issp_errors.h b/drivers/input/keyboard/cypressbln/issp_errors.h
deleted file mode 100644
index e6f0673..0000000
--- a/drivers/input/keyboard/cypressbln/issp_errors.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// filename: ISSP_Errors.h
-#include "issp_revision.h"
-#ifdef PROJECT_REV_304
-/* Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress� product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-
---------------------------------------------------------------------------*/
-#ifndef INC_ISSP_ERRORS
-#define INC_ISSP_ERRORS
-
-// The following are defines for error messages from the ISSP program.
-#define PASS 0
-// PASS is used to indicate that a function completed successfully.
-#define ERROR -1
-// ERROR is a generic failure used within lower level functions before the
-// error is reported. This should not be seen as an error that is reported
-// from main.
-#define INIT_ERROR 1
-// INIT_ERROR means a step in chip initialization failed.
-#define SiID_ERROR 2
-// SiID_ERROR means that the Silicon ID check failed. This happens if the
-// target part does not match the device type that the ISSP program is
-// configured for.
-#define ERASE_ERROR 3
-// ERASE_ERROR means that the bulk erase step failed.
-#define BLOCK_ERROR 4
-// BLOCK_ERROR means that a step in programming a Flash block or the verify
-// of the block failed.
-#define VERIFY_ERROR 5
-// VERIFY_ERROR means that the checksum verification failed.
-#define SECURITY_ERROR 6
-// SECURITY_ERROR means that the write of the security information failed.
-#define STATUS_ERROR 7
-
-#endif //(INC_ISSP_ERRORS)
-#endif //(PROJECT_REV_)
-//end of file ISSP_Errors.h
diff --git a/drivers/input/keyboard/cypressbln/issp_extern.h b/drivers/input/keyboard/cypressbln/issp_extern.h
deleted file mode 100644
index fad9122..0000000
--- a/drivers/input/keyboard/cypressbln/issp_extern.h
+++ /dev/null
@@ -1,99 +0,0 @@
-#include "issp_revision.h"
-#ifdef PROJECT_REV_304
-/* Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress� product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-*/
-
-#ifndef INC_ISSP_EXTERN
-#define INC_ISSP_EXTERN
-
-#include "issp_directives.h"
-
-extern signed char fXRESInitializeTargetForISSP(void);
-extern signed char fPowerCycleInitializeTargetForISSP(void);
-extern signed char fEraseTarget(void);
-extern unsigned int iLoadTarget(void);
-extern void ReStartTarget(void);
-extern signed char fVerifySiliconID(void);
-extern signed char fAccTargetBankChecksum(unsigned int *);
-extern void SetBankNumber(unsigned char);
-extern signed char fProgramTargetBlock(unsigned char, unsigned char);
-extern signed char fVerifyTargetBlock(unsigned char, unsigned char);
-extern signed char fVerifySetup(unsigned char, unsigned char);
-extern signed char fReadByteLoop(void); /*PTJ: read bytes after VERIFY-SETUP*/
-extern signed char fSecureTargetFlash(void);
-
-extern signed char fReadStatus(void); /*PTJ: READ-STATUS*/
-extern signed char fReadCalRegisters(void);
-extern signed char fReadWriteSetup(void); /*PTJ: READ-WRITE-SETUP*/
-extern signed char fReadSecurity(void); /*PTJ: READ-SECURITY*/
-
-extern signed char fSyncDisable(void); /*PTJ: SYNC-DISABLE rev 307*/
-extern signed char fSyncEnable(void); /*PTJ: SYNC-ENABLE rev 307*/
-
-extern void InitTargetTestData(void);
-extern void LoadArrayWithSecurityData(unsigned char, unsigned char,
- unsigned char);
-
-extern void LoadProgramData(unsigned char, unsigned char);
-extern signed char fLoadSecurityData(unsigned char);
-extern void Delay(unsigned char);
-extern unsigned char fSDATACheck(void);
-extern void SCLKHigh(void);
-extern void SCLKLow(void);
-#ifndef RESET_MODE /*only needed when power cycle mode*/
-extern void SetSCLKHiZ(void);
-#endif
-extern void SetSCLKStrong(void);
-extern void SetSDATAHigh(void);
-extern void SetSDATALow(void);
-extern void SetSDATAHiZ(void);
-extern void SetSDATAStrong(void);
-extern void AssertXRES(void);
-extern void DeassertXRES(void);
-extern void SetXRESStrong(void);
-extern void ApplyTargetVDD(void);
-extern void RemoveTargetVDD(void);
-extern void SetTargetVDDStrong(void);
-
-extern unsigned char fIsError;
-
-#ifdef USE_TP
-extern void InitTP(void);
-extern void SetTPHigh(void);
-extern void SetTPLow(void);
-extern void ToggleTP(void);
-#endif
-
-extern int ISSP_main(void);
-
-#endif /*(INC_ISSP_EXTERN)*/
-#endif /*(PROJECT_REV_)*/
diff --git a/drivers/input/keyboard/cypressbln/issp_main.c b/drivers/input/keyboard/cypressbln/issp_main.c
deleted file mode 100644
index c53e67c..0000000
--- a/drivers/input/keyboard/cypressbln/issp_main.c
+++ /dev/null
@@ -1,916 +0,0 @@
-// filename: main.c
-#include "issp_revision.h"
-#ifdef PROJECT_REV_304
-/* Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress��?product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-
----------------------------------------------------------------------------*/
-
-/* ############################################################################
- ################### CRITICAL PROJECT CONSTRAINTS ########################
- ############################################################################
-
- ISSP programming can only occur within a temperature range of 5C to 50C.
- - This project is written without temperature compensation and using
- programming pulse-widths that match those used by programmers such as the
- Mini-Prog and the ISSP Programmer.
- This means that the die temperature of the PSoC device cannot be outside
- of the above temperature range.
- If a wider temperature range is required, contact your Cypress Semi-
- conductor FAE or sales person for assistance.
-
- The project can be configured to program devices at 5V or at 3.3V.
- - Initialization of the device is different for different voltages. The
- initialization is hardcoded and can only be set for one voltage range.
- The supported voltages ranges are 3.3V (3.0V to 3.6V) and 5V (4.75V to
- 5.25V). See the device datasheet for more details. If varying voltage
- ranges must be supported, contact your Cypress Semiconductor FAE or sales
- person for assistance.
- - ISSP programming for the 2.7V range (2.7V to 3.0V) is not supported.
-
- This program does not support programming all PSoC Devices
- - It does not support obsoleted PSoC devices. A list of devices that are
- not supported is shown here:
- CY8C22x13 - not supported
- CY8C24x23 - not supported (CY8C24x23A is supported)
- CY8C25x43 - not supported
- CY8C26x43 - not supported
- - It does not suport devices that have not been released for sale at the
- time this version was created. If you need to ISSP program a newly released
- device, please contact Cypress Semiconductor Applications, your FAE or
- sales person for assistance.
- The CY8C20x23 devices are not supported at the time of this release.
-
- ############################################################################
- ##########################################################################*/
-
-/* This program uses information found in Cypress Semiconductor application
-// notes "Programming - In-System Serial Programming Protocol", AN2026. The
-// version of this application note that applies to the specific PSoC that is
-// being In-System Serial Programmed should be read and and understood when
-// using this program. (http://www.cypress.com)
-
-// This project is included with releases of PSoC Programmer software. It is
-// important to confirm that the latest revision of this software is used when
-// it is used. The revision of this copy can be found in the Project History
-// table below.
-*/
-
-/*/////////////////////////////////////////////////////////////////////////////
-// PROJECT HISTORY
-// date revision author description
-// -------- -------- ------ -----------------------------------------------
-// 7/23/08 3.04 ptj 1. CPU clock speed set to to 12MHz (default) after
-// TSYNC is disabled. Previously, it was being set
-// to 3MHz on accident. This affects the following
-// mnemonics:
-// ID_SETUP_1,
-// VERIFY_SETUP,
-// ERASE,
-// SECURE,
-// CHECKSUM_SETUP,
-// PROGRAM_AND_VERIFY,
-// ID_SETUP_2,
-// SYNC_DISABLE
-//
-// 6/06/08 3.03 ptj 1. The Verify_Setup section can tell when flash
-// is fully protected. bTargetStatus[0] shows a
-// 01h when flash is "W" Full Protection
-// 7/23/08 2. READ-ID-WORD updated to read Revision ID from
-// Accumulator A and X, registers T,F0h and T,F3h
-//
-// 5/30/08 3.02 ptj 1. All vectors work.
-// 2. Main function will execute the
-// following programming sequence:
-// . id setup 1
-// . id setup 2
-// . erase
-// . program and verify
-// . verify (although not necessary)
-// . secure flash
-// . read security
-// . checksum
-//
-// 05/28/08 3.01 ptj TEST CODE - NOT COMPLETE
-// 1. The sequence surrounding PROGRAM-AND-VERIFY was
-// improved and works according to spec.
-// 2. The sequence surroudning VERIFY-SETUP was devel-
-// oped and improved.
-// 3. TSYNC Enable is used to in a limited way
-// 4. Working Vectors: ID-SETUP-1, ID-SETUP-2, ERASE,
-// PROGRAM-AND-VERIFY, SECURE, VERIFY-SETUP,
-// CHECKSUM-SETUP
-// 5. Un-tested Vectors: READ-SECURITY
-//
-// 05/23/08 3.00 ptj TEST CODE - NOT COMPLETE
-// 1. This code is a test platform for the development
-// of the Krypton (cy8c20x66) Programming Sequence.
-// See 001-15870 rev *A. This code works on "rev B"
-// silicon.
-// 2. Host is Hydra 29000, Target is Krypton "rev B"
-// 3. Added Krypton device support
-// 4. TYSNC Enable/Disable is not used.
-// 5. Working Vectors: ID-SETUP-1, ID-SETUP-2, ERASE,
-// PROGRAM-AND-VERIFY, SECURE
-// 6. Non-working Vectors: CHECKSUM-SETUP
-// 7. Un-tested Vectors: READ-SECURITY, VERIFY-SETUP
-// 8. Other minor (non-SROM) vectors not listed.
-//
-// 09/23/07 2.11 dkn 1. Added searchable comments for the HSSP app note.
-// 2. Added new device vectors.
-// 3. Verified write and erase pulsewidths.
-// 4. Modified some functions for easier porting to
-// other processors.
-//
-// 09/23/06 2.10 mwl 1. Added #define SECURITY_BYTES_PER_BANK to
-// file issp_defs.h. Modified function
-// fSecureTargetFlashMain() in issp_routines.c
-// to use new #define. Modified function
-// fLoadSecurityData() in issp_driver_routines.c
-// to accept a bank number. Modified the secure
-// data loop in main.c to program multiple banks.
-//
-// 2. Created function fAccTargetBankChecksum to
-// read and add the target bank checksum to the
-// referenced accumulator. This allows the
-// checksum loop in main.c to function at the
-// same level of abstraction as the other
-// programming steps. Accordingly, modified the
-// checksum loop in main.c. Deleted previous
-// function fVerifyTargetChecksum().
-//
-// 09/08/06 2.00 mwl 1. Array variable abTargetDataOUT was not
-// getting intialized anywhere and compiled as a
-// one-byte array. Modified issp_driver_routines.c
-// line 44 to initialize with TARGET_DATABUFF_LEN.
-//
-
-// 2. Function void LoadProgramDataunsigned char
-// bBlockNum) in issp_driver_routines.c had only
-// one parameter bBlockNum but was being called
-// from function main() with two parameters,
-// LoadProgramData(bBankCounter, (unsigned char)
-// iBlockCounter). Modified function
-// LoadProgramData() to accept both parameters,
-// and in turn modified InitTargetTestData() to
-// accept and use both as well.
-//
-// 3. Corrected byte set_bank_number[1]
-// inissp_vectors.h. Was 0xF2, correct value is
-// 0xE2.
-//
-// 4. Corrected the logic to send the SET_BANK_NUM
-// vectors per the AN2026B flow chart.The previous
-// code version was sending once per block, but
-// should have been once per bank. Removed the
-// conditionally-compiled bank setting code blocks
-// from the top of fProgramTargetBlock() and
-// fVerifyTargetBlock() int issp_routines.c and
-// created a conditionally-compiled subroutine in
-// that same file called SetBankNumber(). Two
-// conditionally-compiled calls to SetBankNumber()
-// were added to main.c().
-//
-// 5. Corrected CY8C29x66 NUM_BANKS and
-// BLOCKS_PER_BANK definitions in ISSP_Defs.h.
-// Was 2 and 256 respectively, correct values are
-// 4 and 128.
-//
-// 6. Modified function fVerifyTargetChecksum()
-// in issp_routines.c to read and accumulate multiple
-// banks of checksums as required for targets
-// CY8C24x94 and CY8C29x66. Would have kept same
-// level of abstraction as other multi-bank functions
-// in main.c, but this implementation impacted the
-// code the least.
-//
-// 7. Corrected byte checksum_v[26] of
-// CHECKSUM_SETUP_24_29 in issp_vectors.h. Was 0x02,
-// correct value is 0x04.
-//
-// 06/30/06 1.10 jvy Added support for 24x94 and 29x66 devices.
-// 06/09/06 1.00 jvy Changed CPU Clk to 12MHz (from 24MHz) so the
-// host can run from 3.3V.
-// Simplified init of security data.
-// 06/05/06 0.06 jvy Version #ifdef added to each file to make sure
-// all of the file are from the same revision.
-// Added flags to prevent multiple includes of H
-// files.
-// Changed pre-determined data for demo to be
-// unique for each block.
-// Changed block verify to check all blocks after
-// block programming has been completed.
-// Added SetSCLKHiZ to explicitly set the Clk to
-// HighZ before power cycle acquire.
-// Fixed wrong vectors in setting Security.
-// Fixed wrong vectors in Block program.
-// Added support for pods
-// 06/05/06 0.05 jvy Comments from code review. First copy checked
-// into perforce. Code has been updated enough to
-// compile, by implementing some comments and
-// fixing others.
-// 06/04/06 0.04 jvy made code more efficient in bReceiveByte(), and
-// SendVector() by re-arranging so that local vars
-// could be eliminated.
-// added defines for the delays used in the code.
-// 06/02/06 0.03 jvy added number of Flash block adjustment to
-// programming. added power cycle programming
-// mode support. This is the version initially
-// sent out for peer review.
-// 06/02/06 0.02 jvy added framework for multiple chip support from
-// one source code set using compiler directives.
-// added timeout to high-low trasition detection.
-// added multiple error message to allow tracking
-// of failures.
-// 05/30/06 0.01 jvy initial version,
-// created from DBD's issp_27xxx_v3 program.
-/////////////////////////////////////////////////////////////////////////////*/
-
-/* (((((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))
- PSoC In-System Serial Programming (ISSP) Template
- This PSoC Project is designed to be used as a template for designs that
- require PSoC ISSP Functions.
-
- This project is based on the AN2026 series of Application Notes. That app
- note should be referenced before any modifications to this project are made.
-
- The subroutines and files were created in such a way as to allow easy cut &
- paste as needed. There are no customer-specific functions in this project.
- This demo of the code utilizes a PSoC as the Host.
-
- Some of the subroutines could be merged, or otherwise reduced, but they have
- been written as independently as possible so that the specific steps involved
- within each function can easily be seen. By merging things, some code-space
- savings could be realized.
-
- As is, and with all features enabled, the project consumes approximately 3500
- bytes of code space, and 19-Bytes of RAM (not including stack usage). The
- Block-Verify requires a 64-Byte buffer for read-back verification. This same
- buffer could be used to hold the (actual) incoming program data.
-
- Please refer to the compiler-directives file "directives.h" to see the various
- features.
-
- The pin used in this project are assigned as shown below. The HOST pins are
- arbitrary and any 3 pins could be used (the masks used to control the pins
- must be changed). The TARGET pins cannot be changed, these are fixed function
- pins on the PSoC.
- The PWR pin is used to provide power to the target device if power cycle
- programming mode is used. The compiler directive RESET_MODE in ISSP_directives.h
- is used to select the programming mode. This pin could control the enable on
- a voltage regulator, or could control the gate of a FET that is used to turn
- the power to the PSoC on.
- The TP pin is a Test Point pin that can be used signal from the host processor
- that the program has completed certain tasks. Predefined test points are
- included that can be used to observe the timing for bulk erasing, block
- programming and security programming.
-
- SIGNAL HOST TARGET
- ---------------------
- SDATA P1.7 P1.0
- SCLK P1.6 P1.1
- XRES P2.0 XRES
- PWR P2.3 Vdd
- TP P0.7 n/a
-
- For test & demonstration, this project generates the program data internally.
- It does not take-in the data from an external source such as I2C, UART, SPI,
- etc. However, the program was written in such a way to be portable into such
- designs. The spirit of this project was to keep it stripped to the minimum
- functions required to do the ISSP functions only, thereby making a portable
- framework for integration with other projects.
-
- The high-level functions have been written in C in order to be portable to
- other processors. The low-level functions that are processor dependent, such
- as toggling pins and implementing specific delays, are all found in the file
- ISSP_Drive_Routines.c. These functions must be converted to equivalent
- functions for the HOST processor. Care must be taken to meet the timing
- requirements when converting to a new processor. ISSP timing information can
- be found in Application Note AN2026. All of the sections of this program
- that need to be modified for the host processor have "PROCESSOR_SPECIFIC" in
- the comments. By performing a "Find in files" using "PROCESSOR_SPECIFIC" these
- sections can easily be identified.
-
- The variables in this project use Hungarian notation. Hungarian prepends a
- lower case letter to each variable that identifies the variable type. The
- prefixes used in this program are defined below:
- b = byte length variable, signed char and unsigned char
- i = 2-byte length variable, signed int and unsigned int
- f = byte length variable used as a flag (TRUE = 0, FALSE != 0)
- ab = an array of byte length variables
-
- After this program has been ported to the desired host processor the timing
- of the signals must be confirmed. The maximum SCLK frequency must be checked
- as well as the timing of the bulk erase, block write and security write
- pulses.
-
- The maximum SCLK frequency for the target device can be found in the device
- datasheet under AC Programming Specifications with a Symbol of "Fsclk".
- An oscilloscope should be used to make sure that no half-cycles (the high
- time or the low time) are shorter than the half-period of the maximum
- freqency. In other words, if the maximum SCLK frequency is 8MHz, there can be
- no high or low pulses shorter than 1/(2*8MHz), or 62.5 nsec.
-
- The test point (TP) functions, enabled by the define USE_TP, provide an output
- from the host processor that brackets the timing of the internal bulk erase,
- block write and security write programming pulses. An oscilloscope, along with
- break points in the PSoC ICE Debugger should be used to verify the timing of
- the programming. The Application Note, "Host-Sourced Serial Programming"
- explains how to do these measurements and should be consulted for the expected
- timing of the erase and program pulses.
-
- ############################################################################
- ############################################################################
-
-(((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))) */
-
-/*----------------------------------------------------------------------------
-// C main line
-//----------------------------------------------------------------------------
-*/
-#include <linux/module.h>
-
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/sched.h>
-#include <linux/pm.h>
-#include <linux/sysctl.h>
-#include <linux/proc_fs.h>
-#include <linux/delay.h>
-#include <linux/input.h>
-#include <mach/regs-gpio.h>
-#include <plat/gpio-cfg.h>
-#include <asm/gpio.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
-//#include <m8c.h> // part specific constants and macros
-//#include "PSoCAPI.h" // PSoC API definitions for all User Modules
-// ------ Declarations Associated with ISSP Files & Routines -------
-// Add these to your project as needed.
-#include "issp_extern.h"
-#include "issp_directives.h"
-#include "issp_defs.h"
-#include "issp_errors.h"
-#include "u1-cypress-gpio.h"
-/* ------------------------------------------------------------------------- */
-
-/* enable ldo11 */
-extern int touchkey_ldo_on(bool on);
-
-unsigned char bBankCounter;
-unsigned int iBlockCounter;
-unsigned int iChecksumData;
-unsigned int iChecksumTarget;
-
-
-//////I2C
-
-#define EXT_I2C_SCL_HIGH \
- do { \
- int delay_count; \
- gpio_direction_output(_3_TOUCH_SCL_28V, 1); \
- gpio_direction_input(_3_TOUCH_SCL_28V); \
- delay_count = 100000; \
- while(delay_count--) \
- { \
- if(gpio_get_value(_3_TOUCH_SCL_28V)) \
- break; \
- udelay(1); \
- } \
- } while(0);
-#define EXT_I2C_SCL_LOW gpio_direction_output(_3_TOUCH_SCL_28V, 0);
-#define EXT_I2C_SDA_HIGH gpio_direction_output(_3_TOUCH_SDA_28V, 1);
-#define EXT_I2C_SDA_LOW gpio_direction_output(_3_TOUCH_SDA_28V, 0);
-#define TRUE 1
-#define FALSE 0
-
-static void EXT_I2C_LOW(u32 delay)
-{
- EXT_I2C_SDA_LOW;
- //udelay(delay);
- EXT_I2C_SCL_HIGH;
- //udelay(delay);
- EXT_I2C_SCL_LOW;
- //udelay(delay);
-}
-
-static void EXT_I2C_HIGH(u32 delay)
-{
- EXT_I2C_SDA_HIGH;
- //udelay(delay);
- EXT_I2C_SCL_HIGH;
- //udelay(delay);
- EXT_I2C_SCL_LOW;
- //udelay(delay);
-}
-
-static void EXT_I2C_START(u32 delay)
-{
- EXT_I2C_SDA_HIGH;
- EXT_I2C_SCL_HIGH;
- //udelay(delay);
- EXT_I2C_SDA_LOW;
- //udelay(delay);
- EXT_I2C_SCL_LOW;
- //udelay(delay);
-
-}
-
-static void EXT_I2C_END(u32 delay)
-{
- EXT_I2C_SDA_LOW;
- EXT_I2C_SCL_HIGH;
- //udelay(delay);
- EXT_I2C_SDA_HIGH;
-}
-
-static int EXT_I2C_ACK(u32 delay)
-{
- u32 ack;
-
- /* SDA -> Input */
- gpio_direction_input(_3_TOUCH_SDA_28V);
-
- udelay(delay);
- EXT_I2C_SCL_HIGH;
- //udelay(delay);
- ack = gpio_get_value(_3_TOUCH_SDA_28V);
- EXT_I2C_SCL_LOW;
- //udelay(delay);
- if (ack)
- printk("EXT_I2C No ACK\n");
-
- return ack;
-}
-
-static void EXT_I2C_NACK(u32 delay)
-{
- EXT_I2C_SDA_HIGH;
- EXT_I2C_SCL_HIGH;
- //udelay(delay);
- EXT_I2C_SCL_LOW;
- //udelay(delay);
-}
-
-static void EXT_I2C_SEND_ACK(u32 delay)
-{
- gpio_direction_output(_3_TOUCH_SDA_28V, 0);
- EXT_I2C_SCL_HIGH;
- //udelay(delay);
- EXT_I2C_SCL_LOW;
- //udelay(delay);
-
-}
-
-#define EXT_I2C_DELAY 1
-//============================================================
-//
-// Porting section 6. I2C function calling
-//
-// Connect baseband i2c function
-//
-// Warning 1. !!!! Burst mode is not supported. Transfer 1 byte Only.
-//
-// Every i2c packet has to
-// " START > Slave address > One byte > STOP " at download mode.
-//
-// Warning 2. !!!! Check return value of i2c function.
-//
-// _i2c_read_(), _i2c_write_() must return
-// TRUE (1) if success,
-// FALSE(0) if failed.
-//
-// If baseband i2c function returns different value, convert return value.
-// ex> baseband_return = baseband_i2c_read( slave_addr, pData, cLength );
-// return ( baseband_return == BASEBAND_RETURN_VALUE_SUCCESS );
-//
-//
-// Warning 3. !!!! Check Slave address
-//
-// Slave address is '0x7F' at download mode. ( Diffrent with Normal touch working mode )
-// '0x7F' is original address,
-// If shift << 1 bit, It becomes '0xFE'
-//
-//============================================================
-
-static int
-_i2c_read_(unsigned char SlaveAddr, unsigned char *pData, unsigned char cLength)
-{
- unsigned int i;
- int delay_count = 10000;
-
- EXT_I2C_START(EXT_I2C_DELAY);
-
- SlaveAddr = SlaveAddr << 1;
- for (i = 8; i > 1; i--) {
- if ((SlaveAddr >> (i - 1)) & 0x1)
- EXT_I2C_HIGH(EXT_I2C_DELAY);
- else
- EXT_I2C_LOW(EXT_I2C_DELAY);
- }
-
- EXT_I2C_HIGH(EXT_I2C_DELAY); //readwrite
-
- if (EXT_I2C_ACK(EXT_I2C_DELAY)) {
- EXT_I2C_END(EXT_I2C_DELAY);
- return FALSE;
- }
-
- udelay(10);
- gpio_direction_input(_3_TOUCH_SCL_28V);
- delay_count = 100000;
- while (delay_count--) {
- if (gpio_get_value(_3_TOUCH_SCL_28V))
- break;
- udelay(1);
- }
- while (cLength--) {
- *pData = 0;
- for (i = 8; i > 0; i--) {
- //udelay(EXT_I2C_DELAY);
- EXT_I2C_SCL_HIGH;
- //udelay(EXT_I2C_DELAY);
- *pData |=
- (!!(gpio_get_value(_3_TOUCH_SDA_28V)) << (i - 1));
- //udelay(EXT_I2C_DELAY);
- EXT_I2C_SCL_LOW;
- //udelay(EXT_I2C_DELAY);
- }
-
- if (cLength) {
- EXT_I2C_SEND_ACK(EXT_I2C_DELAY);
- udelay(10);
- pData++;
- gpio_direction_input(_3_TOUCH_SDA_28V);
- gpio_direction_input(_3_TOUCH_SCL_28V);
- delay_count = 100000;
- while (delay_count--) {
- if (gpio_get_value(_3_TOUCH_SCL_28V))
- break;
- udelay(1);
- }
- } else
- EXT_I2C_NACK(EXT_I2C_DELAY);
- }
-
- EXT_I2C_END(EXT_I2C_DELAY);
-
- return (TRUE);
-
-}
-
-#define TOUCHKEY_ADDRESS 0x20
-
-int get_touchkey_firmware(char *version)
-{
- int retry = 3;
- while (retry--) {
- if (_i2c_read_(TOUCHKEY_ADDRESS, version, 3))
- return 0;
-
- }
- return (-1);
- //printk("%s F/W version: 0x%x, Module version:0x%x\n",__FUNCTION__, version[1],version[2]);
-}
-
-/* ========================================================================= */
-// ErrorTrap()
-// Return is not valid from main for PSOC, so this ErrorTrap routine is used.
-// For some systems returning an error code will work best. For those, the
-// calls to ErrorTrap() should be replaced with a return(bErrorNumber). For
-// other systems another method of reporting an error could be added to this
-// function -- such as reporting over a communcations port.
-/* ========================================================================= */
-void ErrorTrap(unsigned char bErrorNumber)
-{
-#ifndef RESET_MODE
- // Set all pins to highZ to avoid back powering the PSoC through the GPIO
- // protection diodes.
- SetSCLKHiZ();
- SetSDATAHiZ();
- // If Power Cycle programming, turn off the target
- RemoveTargetVDD();
-#endif
- printk("\r\nErrorTrap: errorNumber: %d\n", bErrorNumber);
-
- // TODO: write retry code or some processing.
- return;
-// while (1);
-}
-
-/* ========================================================================= */
-/* MAIN LOOP */
-/* Based on the diagram in the AN2026 */
-/* ========================================================================= */
-
-int ISSP_main(void)
-{
- unsigned long flags;
-
- // -- This example section of commands show the high-level calls to -------
- // -- perform Target Initialization, SilcionID Test, Bulk-Erase, Target ---
- // -- RAM Load, FLASH-Block Program, and Target Checksum Verification. ----
-
- // >>>> ISSP Programming Starts Here <<<<
- // Acquire the device through reset or power cycle
- s3c_gpio_setpull(_3_TOUCH_SCL_28V, S3C_GPIO_PULL_NONE);
- s3c_gpio_setpull(_3_TOUCH_SDA_28V, S3C_GPIO_PULL_NONE);
- gpio_direction_output(_3_GPIO_TOUCH_EN, 0);
- /* disable ldo11 */
- touchkey_ldo_on(0);
- msleep(1);
-#ifdef RESET_MODE
- gpio_tlmm_config(LED_26V_EN);
- gpio_tlmm_config(EXT_TSP_SCL);
- gpio_tlmm_config(EXT_TSP_SDA);
- gpio_tlmm_config(LED_RST);
-
- gpio_out(LED_RST, GPIO_LOW_VALUE);
- clk_busy_wait(10);
-
- gpio_out(LED_26V_EN, GPIO_HIGH_VALUE);
- for (temp = 0; temp < 16; temp++) {
- clk_busy_wait(1000);
- dog_kick();
- }
-
- // Initialize the Host & Target for ISSP operations
- printk("fXRESInitializeTargetForISSP Start\n");
-
- //INTLOCK();
- local_save_flags(flags);
- local_irq_disable();
- if (fIsError = fXRESInitializeTargetForISSP()) {
- ErrorTrap(fIsError);
- return fIsError;
- }
- //INTFREE();
-#else
- //INTLOCK();
- local_irq_save(flags);
- // Initialize the Host & Target for ISSP operations
- if ((fIsError = fPowerCycleInitializeTargetForISSP())) {
- ErrorTrap(fIsError);
- return fIsError;
- }
- //INTFREE();
-#endif /* RESET_MODE */
-
-#if 0 // issp_test_2010 block
- printk("fXRESInitializeTargetForISSP END\n");
-
- // Run the SiliconID Verification, and proceed according to result.
- printk("fVerifySiliconID START\n");
-#endif
-
- //INTLOCK();
- fVerifySiliconID(); // .. error // issp_test_20100709 unblock
-#if 0
- if (fIsError = fVerifySiliconID()) {
- ErrorTrap(fIsError);
- return fIsError;
- }
-#endif
-
- //INTFREE();
- local_irq_restore(flags);
- //printk("fVerifySiliconID END\n"); // issp_test_2010 block
-
- // Bulk-Erase the Device.
- //printk("fEraseTarget START\n"); // issp_test_2010 block
- //INTLOCK();
- local_irq_save(flags);
- if ((fIsError = fEraseTarget())) {
- ErrorTrap(fIsError);
- return fIsError;
- }
- //INTFREE();
- local_irq_restore(flags);
- //printk("fEraseTarget END\n"); // issp_test_2010 block
-
- //==============================================================//
- // Program Flash blocks with predetermined data. In the final application
- // this data should come from the HEX output of PSoC Designer.
- //printk("Program Flash Blocks Start\n");
-
- iChecksumData = 0; // Calculte the device checksum as you go
- for (bBankCounter = 0; bBankCounter < NUM_BANKS; bBankCounter++) //PTJ: NUM_BANKS should be 1 for Krypton
- {
- local_irq_save(flags);
- for (iBlockCounter = 0; iBlockCounter < BLOCKS_PER_BANK;
- iBlockCounter++) {
- //printk("Program Loop : iBlockCounter %d \n",iBlockCounter);
- //INTLOCK();
- // local_irq_save(flags);
-
- //PTJ: READ-WRITE-SETUP used here to select SRAM Bank 1, and TSYNC Enable
-#ifdef CY8C20x66
- if ((fIsError = fSyncEnable())) {
- ErrorTrap(fIsError);
- return fIsError;
- }
- if ((fIsError = fReadWriteSetup())) { // send write command - swanhan
- ErrorTrap(fIsError);
- return fIsError;
- }
-#endif
-
- iChecksumData += iLoadTarget(); //PTJ: this loads the Krypton
-
- //dog_kick();
- if ((fIsError =
- fProgramTargetBlock(bBankCounter,
- (unsigned char)iBlockCounter))) {
- ErrorTrap(fIsError);
- return fIsError;
- }
-#ifdef CY8C20x66 //PTJ: READ-STATUS after PROGRAM-AND-VERIFY
- if ((fIsError = fReadStatus())) {
- ErrorTrap(fIsError);
- return fIsError;
- }
-#endif
- //INTFREE();
- //local_irq_restore(flags);
- }
- local_irq_restore(flags);
- }
-
- //printk("\r\n Program Flash Blocks End\n");
-
-#if 0 // verify check pass or check.
- printk("\r\n Verify Start", 0, 0, 0);
- //=======================================================//
- //PTJ: Doing Verify
- //PTJ: this code isnt needed in the program flow because we use PROGRAM-AND-VERIFY (ProgramAndVerify SROM Func)
- //PTJ: which has Verify built into it.
- // Verify included for completeness in case host desires to do a stand-alone verify at a later date.
- for (bBankCounter = 0; bBankCounter < NUM_BANKS; bBankCounter++) {
- for (iBlockCounter = 0; iBlockCounter < BLOCKS_PER_BANK;
- iBlockCounter++) {
- printk("Verify Loop: iBlockCounter %d", iBlockCounter,
- 0, 0);
- INTLOCK();
-
- //PTJ: READ-WRITE-SETUP used here to select SRAM Bank 1, and TSYNC Enable
-#ifdef CY8C20x66
- if (fIsError = fReadWriteSetup()) {
- ErrorTrap(fIsError);
- }
-#endif
-
- dog_kick();
-
- if (fIsError =
- fVerifySetup(bBankCounter,
- (unsigned char)iBlockCounter)) {
- ErrorTrap(fIsError);
- }
-#ifdef CY8C20x66 //PTJ: READ-STATUS after VERIFY-SETUP
- if (fIsError = fSyncEnable()) { //PTJ: 307, added for tsync enable testing
- ErrorTrap(fIsError);
- }
- if (fIsError = fReadStatus()) {
- ErrorTrap(fIsError);
- }
- //PTJ: READ-WRITE-SETUP used here to select SRAM Bank 1, and TSYNC Enable
- if (fIsError = fReadWriteSetup()) {
- ErrorTrap(fIsError);
- }
- if (fIsError = fSyncDisable()) { //PTJ: 307, added for tsync enable testing
- ErrorTrap(fIsError);
- }
-#endif
- INTFREE();
- }
- }
- printk("Verify End", 0, 0, 0);
-#endif /* #if 1 */
-#if 1 /* security start */
- //=======================================================//
- // Program security data into target PSoC. In the final application this
- // data should come from the HEX output of PSoC Designer.
- //printk("Program security data START\n");
- //INTLOCK();
- local_irq_save(flags);
- for (bBankCounter = 0; bBankCounter < NUM_BANKS; bBankCounter++) {
- //PTJ: READ-WRITE-SETUP used here to select SRAM Bank 1
-#ifdef CY8C20x66
- if ((fIsError = fSyncEnable())) { //PTJ: 307, added for tsync enable testing.
- ErrorTrap(fIsError);
- return fIsError;
- }
- if ((fIsError = fReadWriteSetup())) {
- ErrorTrap(fIsError);
- return fIsError;
- }
-#endif
- // Load one bank of security data from hex file into buffer
- if ((fIsError = fLoadSecurityData(bBankCounter))) {
- ErrorTrap(fIsError);
- return fIsError;
- }
- // Secure one bank of the target flash
- if ((fIsError = fSecureTargetFlash())) {
- ErrorTrap(fIsError);
- return fIsError;
- }
- }
- //INTFREE();
- local_irq_restore(flags);
-
- //printk("Program security data END\n");
-
- //==============================================================//
- //PTJ: Do READ-SECURITY after SECURE
-
- //Load one bank of security data from hex file into buffer
- //loads abTargetDataOUT[] with security data that was used in secure bit stream
- //INTLOCK();
- local_irq_save(flags);
- if ((fIsError = fLoadSecurityData(bBankCounter))) {
- ErrorTrap(fIsError);
- return fIsError;
- }
-#ifdef CY8C20x66
- if ((fIsError = fReadSecurity())) {
- ErrorTrap(fIsError);
- return fIsError;
- }
-#endif
- //INTFREE();
- local_irq_restore(flags);
- //printk("Load security data END\n");
-#endif /* security end */
-
- //=======================================================//
- //PTJ: Doing Checksum after READ-SECURITY
- //INTLOCK();
- local_irq_save(flags);
- iChecksumTarget = 0;
- for (bBankCounter = 0; bBankCounter < NUM_BANKS; bBankCounter++) {
- if ((fIsError = fAccTargetBankChecksum(&iChecksumTarget))) {
- ErrorTrap(fIsError);
- return fIsError;
- }
- }
-
- //INTFREE();
- local_irq_restore(flags);
-
- //printk("Checksum : iChecksumTarget (0x%X)\n", (unsigned char)iChecksumTarget);
- //printk ("Checksum : iChecksumData (0x%X)\n", (unsigned char)iChecksumData);
-
- if ((unsigned short)(iChecksumTarget & 0xffff) !=
- (unsigned short)(iChecksumData & 0xffff)) {
- ErrorTrap(VERIFY_ERROR);
- return fIsError;
- }
- //printk("Doing Checksum END\n");
-
- // *** SUCCESS ***
- // At this point, the Target has been successfully Initialize, ID-Checked,
- // Bulk-Erased, Block-Loaded, Block-Programmed, Block-Verified, and Device-
- // Checksum Verified.
-
- // You may want to restart Your Target PSoC Here.
- ReStartTarget(); //Touch IC Reset.
-
- //printk("ReStartTarget\n");
-
- return 0;
-}
-
-// end of main()
-
-#endif //(PROJECT_REV_) end of file main.c
diff --git a/drivers/input/keyboard/cypressbln/issp_revision.h b/drivers/input/keyboard/cypressbln/issp_revision.h
deleted file mode 100644
index ca1990c..0000000
--- a/drivers/input/keyboard/cypressbln/issp_revision.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* filename: ISSP_Revision.h
- Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress� product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-
---------------------------------------------------------------------------*/
-#ifndef INC_ISSP_REVISION
-#define INC_ISSP_REVISION
-// The PROJECT_REV_xyz is used to make sure that the files in the project
-// are all from the same revision of the program. Each file starts with an
-// ifdef that will prevent the file from being compiled if it is not the
-// correct revision
-// Set the revision to 3.04
-#define PROJECT_REV_304
-
-#endif //(INC_ISSP_REVISION)
-#include <linux/module.h>
-
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/i2c.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/sched.h>
-#include <linux/pm.h>
-#include <linux/sysctl.h>
-#include <linux/proc_fs.h>
-#include <linux/delay.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <mach/regs-gpio.h>
-#include <plat/gpio-cfg.h>
-#include <asm/gpio.h>
-#include <linux/miscdevice.h>
-#include <asm/uaccess.h>
-#include <linux/earlysuspend.h>
-#include <asm/io.h>
-//end of file ISSP_Revision.h
diff --git a/drivers/input/keyboard/cypressbln/issp_routines.c b/drivers/input/keyboard/cypressbln/issp_routines.c
deleted file mode 100644
index 0186e2b..0000000
--- a/drivers/input/keyboard/cypressbln/issp_routines.c
+++ /dev/null
@@ -1,1044 +0,0 @@
-// filename: ISSP_Routines.c
-#include "issp_revision.h"
-#ifdef PROJECT_REV_304
-/* Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress?product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-
---------------------------------------------------------------------------*/
-#include <linux/module.h>
-
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/i2c.h>
-#include <linux/interrupt.h>
-#include <linux/irq.h>
-#include <linux/sched.h>
-#include <linux/pm.h>
-#include <linux/sysctl.h>
-#include <linux/proc_fs.h>
-#include <linux/delay.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <mach/regs-gpio.h>
-#include <plat/gpio-cfg.h>
-#include <asm/gpio.h>
-#include <linux/miscdevice.h>
-#include <asm/uaccess.h>
-#include <linux/earlysuspend.h>
-#include <asm/io.h>
-#include <linux/hrtimer.h>
-//mhsong #include <m8c.h> // part specific constants and macros
-//mhsong #include "PSoCAPI.h" // PSoC API definitions for all User Modules
-#include "issp_defs.h"
-#include "issp_vectors.h"
-#include "issp_extern.h"
-#include "issp_errors.h"
-#include "issp_directives.h"
-#include "issp_delays.h"
-
-unsigned char bTargetDataIN;
-unsigned char abTargetDataOUT[TARGET_DATABUFF_LEN];
-
-unsigned char bTargetAddress;
-unsigned char bTargetDataPtr = 0;
-unsigned char bTargetID[10];
-unsigned char bTargetStatus[10]; //PTJ: created to support READ-STATUS in fReadStatus()
-
-unsigned char fIsError;
-
-/* ((((((((((((((((((((( LOW-LEVEL ISSP SUBROUTINE SECTION ))))))))))))))))))))
- (( The subroutines in this section use functions from the C file ))
- (( ISSP_Drive_Routines.c. The functions in that file interface to the ))
- (( processor specific hardware. So, these functions should work as is, if ))
- (( the routines in ISSP_Drive_Routines.c are correctly converted. ))
- (((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))*/
-
-// ============================================================================
-// RunClock()
-// Description:
-// Run Clock without sending/receiving bits. Use this when transitioning from
-// write to read and read to write "num_cycles" is number of SCLK cycles, not
-// number of counter cycles.
-//
-// SCLK cannot run faster than the specified maximum frequency of 8MHz. Some
-// processors may need to have delays added after setting SCLK low and setting
-// SCLK high in order to not exceed this specification. The maximum frequency
-// of SCLK should be measured as part of validation of the final program
-//
-// ============================================================================
-void RunClock(unsigned int iNumCycles)
-{
- int i;
-
- for (i = 0; i < iNumCycles; i++) {
- SCLKLow();
- SCLKHigh();
- }
- // function exits with CLK high.
-}
-
-// ============================================================================
-// bReceiveBit()
-// Clocks the SCLK pin (high-low-high) and reads the status of the SDATA pin
-// after the rising edge.
-//
-// SCLK cannot run faster than the specified maximum frequency of 8MHz. Some
-// processors may need to have delays added after setting SCLK low and setting
-// SCLK high in order to not exceed this specification. The maximum frequency
-// of SCLK should be measured as part of validation of the final program
-//
-// Returns:
-// 0 if SDATA was low
-// 1 if SDATA was high
-// ============================================================================
-unsigned char bReceiveBit(void)
-{
- SCLKLow();
- SCLKHigh();
- if (fSDATACheck()) {
- return (1);
- } else {
- return (0);
- }
-}
-
-// ============================================================================
-// bReceiveByte()
-// Calls ReceiveBit 8 times to receive one byte.
-// Returns:
-// The 8-bit values recieved.
-// ============================================================================
-unsigned char bReceiveByte(void)
-{
- unsigned char b;
- unsigned char bCurrByte = 0x00;
-
- for (b = 0; b < 8; b++) {
- bCurrByte = (bCurrByte << 1) + bReceiveBit();
- }
- return (bCurrByte);
-}
-
-// ============================================================================
-// SendByte()
-// This routine sends up to one byte of a vector, one bit at a time.
-// bCurrByte the byte that contains the bits to be sent.
-// bSize the number of bits to be sent. Valid values are 1 to 8.
-//
-// SCLK cannot run faster than the specified maximum frequency of 8MHz. Some
-// processors may need to have delays added after setting SCLK low and setting
-// SCLK high in order to not exceed this specification. The maximum frequency
-// of SCLK should be measured as part of validation of the final program
-//
-// There is no returned value.
-// ============================================================================
-void SendByte(unsigned char bCurrByte, unsigned char bSize)
-{
- unsigned char b = 0;
-
- for (b = 0; b < bSize; b++) {
- if (bCurrByte & 0x80) {
- // Send a '1'
- SetSDATAHigh();
- SCLKHigh();
- SCLKLow();
- } else {
- // Send a '0'
- SetSDATALow();
- SCLKHigh();
- SCLKLow();
- }
- bCurrByte = bCurrByte << 1;
- }
-}
-
-// ============================================================================
-// SendVector()
-// This routine sends the vector specifed. All vectors constant strings found
-// in ISSP_Vectors.h. The data line is returned to HiZ after the vector is
-// sent.
-// bVect a pointer to the vector to be sent.
-// nNumBits the number of bits to be sent.
-// bCurrByte scratch var to keep the byte to be sent.
-//
-// There is no returned value.
-// ============================================================================
-void SendVector(const unsigned char *bVect, unsigned int iNumBits)
-{
- SetSDATAStrong();
- while (iNumBits > 0) {
- if (iNumBits >= 8) {
- SendByte(*(bVect), 8);
- iNumBits -= 8;
- bVect++;
- } else {
- SendByte(*(bVect), iNumBits);
- iNumBits = 0;
- }
- }
- SetSDATALow(); // issp_test_20100709 add
- SetSDATAHiZ();
-}
-
-// ============================================================================
-// fDetectHiLoTransition()
-// Waits for transition from SDATA = 1 to SDATA = 0. Has a 100 msec timeout.
-// TRANSITION_TIMEOUT is a loop counter for a 100msec timeout when waiting for
-// a high-to-low transition. This is used in the polling loop of
-// fDetectHiLoTransition(). The timing of the while(1) loops can be calculated
-// and the number of loops is counted, using iTimer, to determine when 100
-// msec has passed.
-//
-//// SCLK cannot run faster than the specified maximum frequency of 8MHz. Some
-// processors may need to have delays added after setting SCLK low and setting
-// SCLK high in order to not exceed this specification. The maximum frequency
-// of SCLK should be measured as part of validation of the final program
-//
-// Returns:
-// 0 if successful
-// -1 if timed out.
-// ============================================================================
-signed char fDetectHiLoTransition(void)
-{
- // nTimer breaks out of the while loops if the wait in the two loops totals
- // more than 100 msec. Making this static makes the loop run a faster.
- // This is really a processor/compiler dependency and it not needed.
- static unsigned int iTimer;
-
- // NOTE:
- // These loops look unconventional, but it is necessary to check SDATA_PIN
- // as shown because the transition can be missed otherwise, due to the
- // length of the SDATA Low-High-Low after certain commands.
-
- // Generate clocks for the target to pull SDATA High
- //dog_kick();
- iTimer = TRANSITION_TIMEOUT;
- printk(KERN_DEBUG
- "Generate clocks for the target to pull SDATA High\n");
- while (1) {
- SCLKLow();
- if (fSDATACheck()) // exit once SDATA goes HI
- break;
- SCLKHigh();
- // If the wait is too long then timeout
- if (iTimer-- == 0) {
- return (ERROR);
- }
- }
- //dog_kick();
- // Generate Clocks and wait for Target to pull SDATA Low again
- iTimer = TRANSITION_TIMEOUT; // reset the timeout counter
- printk(KERN_DEBUG
- "Generate Clocks and wait for Target to pull SDATA Low again\n");
- while (1) {
- SCLKLow(); //issp_test_20100709 unblock
- if (!fSDATACheck()) { // exit once SDATA returns LOW
- break;
- }
- SCLKHigh(); //issp_test_20100709 unblock
- // If the wait is too long then timeout
- if (iTimer-- == 0) {
- return (ERROR);
- }
- }
- printk("fDetectHiLoTransition OUT!!!!\n");
- return (PASS);
-}
-
-/* ((((((((((((((((((((( HIGH-LEVEL ISSP ROUTINE SECTION ))))))))))))))))))))))
- (( These functions are mostly made of calls to the low level routines ))
- (( above. This should isolate the processor-specific changes so that ))
- (( these routines do not need to be modified. ))
- (((((((((((((((((((((((((((((((((((())))))))))))))))))))))))))))))))))))))))*/
-
-#ifdef RESET_MODE
-// ============================================================================
-// fXRESInitializeTargetForISSP()
-// Implements the intialization vectors for the device.
-// Returns:
-// 0 if successful
-// INIT_ERROR if timed out on handshake to the device.
-// ============================================================================
-signed char fXRESInitializeTargetForISSP(void)
-{
- // Configure the pins for initialization
- SetSDATAHiZ();
- SetSCLKStrong();
- SCLKLow();
- // Cycle reset and put the device in programming mode when it exits reset
- AssertXRES();
- DeassertXRES();
- // !!! NOTE:
- // The timing spec that requires that the first Init-Vector happen within
- // 1 msec after the reset/power up. For this reason, it is not advisable
- // to separate the above RESET_MODE or POWER_CYCLE_MODE code from the
- // Init-Vector instructions below. Doing so could introduce excess delay
- // and cause the target device to exit ISSP Mode.
-
- //PTJ: Send id_setup_1 instead of init1_v
- //PTJ: both send CA Test Key and do a Calibrate1 SROM function
- SendVector(id_setup_1, num_bits_id_setup_1);
- if (fIsError = fDetectHiLoTransition()) {
-// TX8SW_CPutString("\r\n fDetectHiLoTransition Error");
- printk("\r\n fDetectHiLoTransition Error\n");
- return (INIT_ERROR);
- }
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
-
- // NOTE: DO NOT not wait for HiLo on SDATA after vector Init-3
- // it does not occur (per spec).
- return (PASS);
-}
-#else //else = the part is power cycle programmed
-
-// ============================================================================
-// fPowerCycleInitializeTargetForISSP()
-// Implements the intialization vectors for the device.
-// The first time fDetectHiLoTransition is called the Clk pin is highZ because
-// the clock is not needed during acquire.
-// Returns:
-// 0 if successful
-// INIT_ERROR if timed out on handshake to the device.
-// ============================================================================
-signed char fPowerCycleInitializeTargetForISSP(void)
-{
- // unsigned char n;
-
- // Set all pins to highZ to avoid back powering the PSoC through the GPIO
- // protection diodes.
- SetSCLKHiZ();
- SetSDATAHiZ();
-
- // Turn on power to the target device before other signals
- SetTargetVDDStrong();
- ApplyTargetVDD();
- // wait 1msec for the power to stabilize
-#if 0
- for (n = 0; n < 10; n++) {
- Delay(DELAY100us);
- }
-#endif
- // Set SCLK to high Z so there is no clock and wait for a high to low
- // transition on SDAT. SCLK is not needed this time.
- SetSCLKHiZ();
-// printk(KERN_DEBUG "fDetectHiLoTransition\n");
- if ((fIsError = fDetectHiLoTransition())) {
- return (INIT_ERROR);
- }
- // Configure the pins for initialization
-// SetSDATAHiZ(); // issp_test_20100709 block
- SetSCLKStrong();
- SCLKLow(); //PTJ: DO NOT SET A BREAKPOINT HERE AND EXPECT SILICON ID TO PASS!
-
- // !!! NOTE:
- // The timing spec that requires that the first Init-Vector happen within
- // 1 msec after the reset/power up. For this reason, it is not advisable
- // to separate the above RESET_MODE or POWER_CYCLE_MODE code from the
- // Init-Vector instructions below. Doing so could introduce excess delay
- // and cause the target device to exit ISSP Mode.
-
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end); //PTJ: rev308, added to match spec
-// printk("SendVector(id_setup_1)\n",0,0,0);
- SendVector(id_setup_1, num_bits_id_setup_1);
- if ((fIsError = fDetectHiLoTransition())) {
- return (INIT_ERROR);
- }
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
-
- // NOTE: DO NOT not wait for HiLo on SDATA after vector Init-3
- // it does not occur (per spec).
- return (PASS);
-}
-#endif
-
-// ============================================================================
-// fVerifySiliconID()
-// Returns:
-// 0 if successful
-// Si_ID_ERROR if timed out on handshake to the device.
-// ============================================================================
-signed char fVerifySiliconID(void)
-{
- SendVector(id_setup_2, num_bits_id_setup_2);
- printk("fVerifySiliconID: SendVector id_stup2 END\n");
-
- if ((fIsError = fDetectHiLoTransition())) {
- printk("fVerifySiliconID(): fDetectHiLoTransition Error\n");
- return (SiID_ERROR);
- }
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
- SendVector(tsync_enable, num_bits_tsync_enable);
- printk
- ("fVerifySiliconID: SendVector(wait_and_poll_end) (tsync_enable) END\n");
-
- //Send Read ID vector and get Target ID
- SendVector(read_id_v, 11); // Read-MSB Vector is the first 11-Bits
- RunClock(2); // Two SCLK cycles between write & read
- bTargetID[0] = bReceiveByte();
- RunClock(1);
- SendVector(read_id_v + 2, 12); // 1+11 bits starting from the 3rd byte
-
- RunClock(2); // Read-LSB Command
- bTargetID[1] = bReceiveByte();
-
- RunClock(1);
- SendVector(read_id_v + 4, 1); // 1 bit starting from the 5th byte
-
- //read Revision ID from Accumulator A and Accumulator X
- SendVector(read_id_v + 5, 11); //11 bits starting from the 6th byte
- RunClock(2);
- bTargetID[2] = bReceiveByte(); //Read from Acc.X
- RunClock(1);
- SendVector(read_id_v + 7, 12); //1+11 bits starting from the 8th byte
-
- RunClock(2);
- bTargetID[3] = bReceiveByte(); //Read from Acc.A
-
- RunClock(1);
- SendVector(read_id_v + 4, 1); //1bit starting from the 5th byte,
-
- SendVector(tsync_disable, num_bits_tsync_disable);
-
- // Print READ-ID
- /*
- TX8SW_CPutString("\r\n Silicon-ID : ");
- TX8SW_PutChar(' ');
- TX8SW_PutSHexByte(bTargetID[0]);
- TX8SW_PutChar(' ');
- TX8SW_PutSHexByte(bTargetID[1]);
- TX8SW_PutChar(' ');
- TX8SW_PutSHexByte(bTargetID[2]);
- TX8SW_PutChar(' ');
- TX8SW_PutSHexByte(bTargetID[3]);
- TX8SW_PutChar(' ');
- */
-#if 0 // issp_test_20100709 block
- printk("issp_routines.c: ID0:0x%X, ID1:0x%X, ID2: 0x%X, ID2: 0x%X\n",
- bTargetID[0], bTargetID[1], bTargetID[2], bTargetID[3]);
-
- if ((bTargetID[0] != target_id_v[0]) || (bTargetID[1] != target_id_v[1])
- || (bTargetID[2] != target_id_v[2])
- || (bTargetID[3] != target_id_v[3])) {
- return (SiID_ERROR);
- } else {
- return (PASS);
- }
-#else
- return (PASS);
-
-#endif
-}
-
-// PTJ: =======================================================================
-// fReadStatus()
-// Returns:
-// 0 if successful
-// _____ if timed out on handshake to the device.
-// ============================================================================
-signed char fReadStatus(void)
-{
- SendVector(tsync_enable, num_bits_tsync_enable); //PTJ:
-
- //Send Read ID vector and get Target ID
- SendVector(read_id_v, 11); // Read-MSB Vector is the first 11-Bits
- RunClock(2); // Two SCLK cycles between write & read
- bTargetStatus[0] = bReceiveByte();
- RunClock(1);
- //SendVector(read_id_v+2, 12); // 12 bits starting from the 3rd character
-
- //RunClock(2); // Read-LSB Command
- //bTargetStatus[1] = bReceiveByte();
-
- //RunClock(1);
- SendVector(read_id_v + 4, 1); // 1 bit starting from the 5th character
-
- SendVector(tsync_disable, num_bits_tsync_disable);
-
- if (bTargetStatus[0] == target_status00_v) {
- return (PASS); //PTJ: Status = 00 means Success, the SROM function did what it was supposed to
- }
- if (bTargetStatus[0] == target_status01_v) {
- return (STATUS_ERROR); //PTJ: Status = 01 means that function is not allowed because of block level protection, for test with verify_setup (VERIFY-SETUP)
- }
- if (bTargetStatus[0] == target_status03_v) {
- return (STATUS_ERROR); //PTJ: Status = 03 is fatal error, SROM halted
- }
- if (bTargetStatus[0] == target_status04_v) {
- return (STATUS_ERROR); //PTJ: Status = 04 means there was a checksum faliure with either the smart write code checksum, or the smart write paramters checksum, for test with PROGRAM-AND-VERIFY
- }
- if (bTargetStatus[0] == target_status06_v) {
- return (STATUS_ERROR); //PTJ: Status = 06 means that Calibrate1 failed, for test with id_setup_1 (ID-SETUP-1)
- } else {
- return (STATUS_ERROR);
- }
-}
-
-// PTJ: =======================================================================
-// fReadCalRegisters()
-// PTJ: use this to read some cal registers that should be loaded by Calibrate1 in id_setup_1
-// Returns:
-// 0 if successful
-// _____ if timed out on handshake to the device.
-// ============================================================================
-signed char fReadCalRegisters(void)
-{
- SendVector(tsync_enable, num_bits_tsync_enable);
-
- SendVector(Switch_Bank1, 22);
-
- SendVector(read_IMOtrim, 11); // Read-MSB Vector is the first 11-Bits
- RunClock(2); // Two SCLK cycles between write & read
- bTargetStatus[0] = bReceiveByte();
- RunClock(1);
- // Set SDATA to Strong Drive here because SendByte() does not
- SetSDATAStrong();
- SendByte(read_reg_end, 1);
-
- SendVector(read_SPCtrim, 11); // Read-MSB Vector is the first 11-Bits
- RunClock(2); // Two SCLK cycles between write & read
- bTargetStatus[1] = bReceiveByte();
- RunClock(1);
- // Set SDATA to Strong Drive here because SendByte() does not
- SetSDATAStrong();
- SendByte(read_reg_end, 1);
-
- SendVector(read_VBGfinetrim, 11); // Read-MSB Vector is the first 11-Bits
- RunClock(2); // Two SCLK cycles between write & read
- bTargetStatus[2] = bReceiveByte();
- RunClock(1);
- // Set SDATA to Strong Drive here because SendByte() does not
- SetSDATAStrong();
- SendByte(read_reg_end, 1);
-
- SendVector(Switch_Bank0, 22);
-
- SendVector(tsync_disable, num_bits_tsync_disable);
-
- if (bTargetStatus[0] == target_status00_v) {
- return (PASS); //PTJ: Status = 00 means Success, the SROM function did what it was supposed to
- }
- return PASS;
-}
-
-// PTJ: =======================================================================
-// fReadWriteSetup()
-// PTJ: The READ-WRITE-SETUP vector will enable TSYNC and switches the device
-// to SRAM bank1 for PROGRAM-AND-VERIFY, SECURE and VERIFY-SETUP.
-// Returns:
-// 0 if successful
-// _____ if timed out on handshake to the device.
-// ============================================================================
-signed char fReadWriteSetup(void)
-{
- SendVector(read_write_setup, num_bits_read_write_setup);
- return (PASS); //PTJ: is there anything else that should be done?
-}
-
-// PTJ: =======================================================================
-// fSyncEnable()
-// PTJ: The SYNC-ENABLE vector will enable TSYNC
-//
-// Returns:
-// 0 if successful
-// _____ if timed out on handshake to the device.
-// ============================================================================
-signed char fSyncEnable(void)
-{
- SendVector(tsync_enable, num_bits_tsync_enable); //PTJ: 307 for tsync enable testing
- return (PASS); //PTJ: is there anything else that should be done?
-}
-
-// PTJ: =======================================================================
-// fSyncDisable()
-// PTJ: The SYNC-ENABLE vector will enable TSYNC
-//
-// Returns:
-// 0 if successful
-// _____ if timed out on handshake to the device.
-// ============================================================================
-signed char fSyncDisable(void)
-{
- SendVector(tsync_disable, num_bits_tsync_disable); //PTJ: 307 for tsync enable testing
- return (PASS);
-}
-
-// ============================================================================
-// fEraseTarget()
-// Perform a bulk erase of the target device.
-// Returns:
-// 0 if successful
-// ERASE_ERROR if timed out on handshake to the device.
-// ============================================================================
-signed char fEraseTarget(void)
-{
- SendVector(erase, num_bits_erase);
- if ((fIsError = fDetectHiLoTransition())) {
-// TX8SW_CPutString("\r\n fDetectHiLoTransition");
- //printk("\r\n fDetectHiLoTransition\n"); // issp_test_2010 block
- return (ERASE_ERROR);
- }
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
- return (PASS);
-}
-
-extern unsigned int iBlockCounter;
-// ============================================================================
-// LoadTarget()
-// Transfers data from array in Host to RAM buffer in the target.
-// Returns the checksum of the data.
-// ============================================================================
-unsigned int iLoadTarget(void)
-{
- unsigned char bTemp;
- unsigned int iChecksumData = 0;
-
- // Set SDATA to Strong Drive here because SendByte() does not
- SetSDATAStrong();
-
- // Transfer the temporary RAM array into the target.
- // In this section, a 128-Byte array was specified by #define, so the entire
- // 128-Bytes are written in this loop.
- bTargetAddress = 0x00;
- bTargetDataPtr = 0x00;
-
- while (bTargetDataPtr < TARGET_DATABUFF_LEN) {
- bTemp = abTargetDataOUT[bTargetDataPtr];
- iChecksumData += bTemp;
-
- SendByte(write_byte_start, 4); //PTJ: we need to be able to write 128 bytes from address 0x80 to 0xFF
- SendByte(bTargetAddress, 7); //PTJ: we need to be able to write 128 bytes from address 0x80 to 0xFF
- SendByte(bTemp, 8);
- SendByte(write_byte_end, 3);
-
- // !!!NOTE:
- // SendByte() uses MSbits, so inc by '2' to put the 0..128 address into
- // the seven MSBit locations.
- //
- // This can be confusing, but check the logic:
- // The address is only 7-Bits long. The SendByte() subroutine will
- // send however-many bits, BUT...always reads them bits from left-to-
- // right. So in order to pass a value of 0..128 as the address using
- // SendByte(), we have to left justify the address by 1-Bit.
- // This can be done easily by incrementing the address each time by
- // '2' rather than by '1'.
-
- bTargetAddress += 2; //PTJ: inc by 2 in order to support a 128 byte address space, MSB~1 for address
- bTargetDataPtr++;
- }
-
- return (iChecksumData);
-}
-
-#ifdef MULTI_BANK
-// ============================================================================
-// SetBankNumber()
-// Set the bank number in the target device.
-// Returns:
-// none
-// ============================================================================
-void SetBankNumber(unsigned char bBankNumber)
-{
- // Send the bank-select vector.
- SendVector(set_bank_number, 33);
-
- // Set the drive here because SendByte() does not.
- SetSDATAStrong();
- SendByte(bBankNumber, 8);
- SendVector(set_bank_number_end, 25);
-}
-#endif
-
-// ============================================================================
-// fProgramTargetBlock()
-// Program one block with data that has been loaded into a RAM buffer in the
-// target device.
-// Returns:
-// 0 if successful
-// BLOCK_ERROR if timed out on handshake to the device.
-// ============================================================================
-signed char fProgramTargetBlock(unsigned char bBankNumber,
- unsigned char bBlockNumber)
-{
-
- SendVector(tsync_enable, num_bits_tsync_enable);
-
- SendVector(set_block_num, num_bits_set_block_num);
-
- // Set the drive here because SendByte() does not.
- SetSDATAStrong();
- SendByte(bBlockNumber, 8);
- SendByte(set_block_num_end, 3);
-
- SendVector(tsync_disable, num_bits_tsync_disable); //PTJ:
-
- // Send the program-block vector.
- SendVector(program_and_verify, num_bits_program_and_verify); //PTJ: PROGRAM-AND-VERIFY
- // wait for acknowledge from target.
- if ((fIsError = fDetectHiLoTransition())) {
- return (BLOCK_ERROR);
- }
- // Send the Wait-For-Poll-End vector
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
- return (PASS);
-
- //PTJ: Don't do READ-STATUS here because that will
- //PTJ: require that we return multiple error values, if error occurs
-}
-
-// ============================================================================
-// fAddTargetBankChecksum()
-// Reads and adds the target bank checksum to the referenced accumulator.
-// Returns:
-// 0 if successful
-// VERIFY_ERROR if timed out on handshake to the device.
-// ============================================================================
-signed char fAccTargetBankChecksum(unsigned int *pAcc)
-{
- unsigned int wCheckSumData;
-
- SendVector(checksum_setup, num_bits_checksum_setup); //PTJ:CHECKSUM-SETUP, it is taking 100ms > time > 200ms to complete the checksum
- if ((fIsError = fDetectHiLoTransition())) { //100ms is default
- return (VERIFY_ERROR);
- }
-
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
-
- SendVector(tsync_enable, num_bits_tsync_enable);
-
- //Send Read Checksum vector and get Target Checksum
- SendVector(read_checksum_v, 11); // first 11-bits is ReadCKSum-MSB
- RunClock(2); // Two SCLKs between write & read
- bTargetDataIN = bReceiveByte();
- wCheckSumData = bTargetDataIN << 8;
-
- RunClock(1); // See Fig. 6
- SendVector(read_checksum_v + 2, 12); // 12 bits starting from 3rd character
- RunClock(2); // Read-LSB Command
- bTargetDataIN = bReceiveByte();
- wCheckSumData |= (bTargetDataIN & 0xFF);
- RunClock(1);
- SendVector(read_checksum_v + 3, 1); // Send the final bit of the command //PTJ: read_checksum_v may have to change if TSYNC needs to be enabled
-
- SendVector(tsync_disable, num_bits_tsync_disable);
-
- *pAcc = wCheckSumData;
-
- return (PASS);
-}
-
-// ============================================================================
-// ReStartTarget()
-// After programming, the target PSoC must be reset to take it out of
-// programming mode. This routine performs a reset.
-// ============================================================================
-void ReStartTarget(void)
-{
-#ifdef RESET_MODE
- // Assert XRES, then release, then disable XRES-Enable
- AssertXRES();
- Delay(XRES_CLK_DELAY);
- DeassertXRES();
-#else
- // Set all pins to highZ to avoid back powering the PSoC through the GPIO
- // protection diodes.
- SetSCLKHiZ();
- SetSDATAHiZ();
- // Cycle power on the target to cause a reset
- RemoveTargetVDD();
- mdelay(300);
- ApplyTargetVDD();
-#endif
-}
-
-// ============================================================================
-// fVerifySetup()
-// Verify the block just written to. This can be done byte-by-byte before the
-// protection bits are set.
-// Returns:
-// 0 if successful
-// BLOCK_ERROR if timed out on handshake to the device.
-// ============================================================================
-signed char fVerifySetup(unsigned char bBankNumber, unsigned char bBlockNumber)
-{
- SendVector(tsync_enable, num_bits_tsync_enable);
-
- SendVector(set_block_num, num_bits_set_block_num);
-
- //Set the drive here because SendByte() does not
- SetSDATAStrong();
- SendByte(bBlockNumber, 8);
- SendByte(set_block_num_end, 3); //PTJ:
-
- SendVector(tsync_disable, num_bits_tsync_disable); //PTJ:
-
- SendVector(verify_setup, num_bits_my_verify_setup); //PTJ:
- if ((fIsError = fDetectHiLoTransition())) {
- return (BLOCK_ERROR);
- }
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
-
- return (PASS);
-}
-
-// ============================================================================
-// fReadByteLoop()
-// Reads the data back from Target SRAM and compares it to expected data in
-// Host SRAM
-// Returns:
-// 0 if successful
-// BLOCK_ERROR if timed out on handshake to the device.
-// ============================================================================
-
-signed char fReadByteLoop(void)
-{
- bTargetAddress = 0;
- bTargetDataPtr = 0;
-
- while (bTargetDataPtr < TARGET_DATABUFF_LEN) {
- //Send Read Byte vector and then get a byte from Target
- SendVector(read_byte_v, 4);
- // Set the drive here because SendByte() does not
- SetSDATAStrong();
- SendByte(bTargetAddress, 7);
-
- RunClock(2); // Run two SCLK cycles between writing and reading
- SetSDATAHiZ(); // Set to HiZ so Target can drive SDATA
- bTargetDataIN = bReceiveByte();
-
- RunClock(1);
- SendVector(read_byte_v + 1, 1); // Send the ReadByte Vector End
-
- // Test the Byte that was read from the Target against the original
- // value (already in the 128-Byte array "abTargetDataOUT[]"). If it
- // matches, then bump the address & pointer,loop-back and continue.
- // If it does NOT match abort the loop and return and error.
- if (bTargetDataIN != abTargetDataOUT[bTargetDataPtr]) {
-#ifdef TX_ON
- UART_PutCRLF();
- UART_CPutString("bTargetDataIN : ");
- UART_PutHexByte(bTargetDataIN);
- UART_CPutString(" abTargetDataOUT : ");
- UART_PutHexByte(abTargetDataOUT[bTargetDataPtr]);
-#endif
- return (BLOCK_ERROR);
- }
-
- bTargetDataPtr++;
- // Increment the address by 2 to accomodate 7-Bit addressing
- // (puts the 7-bit address into MSBit locations for "SendByte()").
- bTargetAddress += 2;
-
- }
-
- return (PASS);
-}
-
-// ============================================================================
-// fVerifyTargetBlock()
-// Verify the block just written to. This can be done byte-by-byte before the
-// protection bits are set.
-// Returns:
-// 0 if successful
-// BLOCK_ERROR if timed out on handshake to the device.
-// ============================================================================
-signed char fVerifyTargetBlock(unsigned char bBankNumber,
- unsigned char bBlockNumber)
-{
- SendVector(set_block_number, 11);
-
- //Set the drive here because SendByte() does not
- SetSDATAStrong();
- SendByte(bBlockNumber, 8);
- SendByte(set_block_number_end, 3);
-
- SendVector(verify_setup_v, num_bits_verify_setup);
- if ((fIsError = fDetectHiLoTransition())) {
- return (BLOCK_ERROR);
- }
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
-
- bTargetAddress = 0;
- bTargetDataPtr = 0;
-
- while (bTargetDataPtr < TARGET_DATABUFF_LEN) {
- //Send Read Byte vector and then get a byte from Target
- SendVector(read_byte_v, 4); //PTJ 308: this was changed from sending the first 5 bits to sending the first 4
- // Set the drive here because SendByte() does not
- SetSDATAStrong();
- SendByte(bTargetAddress, 6);
-
- RunClock(2); // Run two SCLK cycles between writing and reading
- SetSDATAHiZ(); // Set to HiZ so Target can drive SDATA
- bTargetDataIN = bReceiveByte();
-
- RunClock(1);
- SendVector(read_byte_v + 1, 1); // Send the ReadByte Vector End
-
- // Test the Byte that was read from the Target against the original
- // value (already in the 128-Byte array "abTargetDataOUT[]"). If it
- // matches, then bump the address & pointer,loop-back and continue.
- // If it does NOT match abort the loop and return an error.
- if (bTargetDataIN != abTargetDataOUT[bTargetDataPtr])
- return (BLOCK_ERROR);
-
- bTargetDataPtr++;
- // Increment the address by four to accomodate 6-Bit addressing
- // (puts the 6-bit address into MSBit locations for "SendByte()").
- bTargetAddress += 4;
- }
- return (PASS);
-}
-
-// ============================================================================
-// fSecureTargetFlash()
-// Before calling, load the array, abTargetDataOUT, with the desired security
-// settings using LoadArrayWithSecurityData(StartAddress,Length,SecurityType).
-// The can be called multiple times with different SecurityTypes as needed for
-// particular Flash Blocks. Or set them all the same using the call below:
-// LoadArrayWithSecurityData(0,SECURITY_BYTES_PER_BANK, 0);
-// Returns:
-// 0 if successful
-// SECURITY_ERROR if timed out on handshake to the device.
-// ============================================================================
-signed char fSecureTargetFlash(void)
-{
- unsigned char bTemp;
-
- // Transfer the temporary RAM array into the target
- bTargetAddress = 0x00;
- bTargetDataPtr = 0x00;
-
- SetSDATAStrong();
- while (bTargetDataPtr < SECURITY_BYTES_PER_BANK) {
- bTemp = abTargetDataOUT[bTargetDataPtr];
- SendByte(write_byte_start, 4);
- SendByte(bTargetAddress, 7);
- SendByte(bTemp, 8);
- SendByte(write_byte_end, 3);
-
- // SendBytes() uses MSBits, so increment the address by '2' to put
- // the 0..n address into the seven MSBit locations
- bTargetAddress += 2; //PTJ: inc by 2 in order to support a 128 byte address space
- bTargetDataPtr++;
- }
-
- SendVector(secure, num_bits_secure); //PTJ:
- if ((fIsError = fDetectHiLoTransition())) {
- return (SECURITY_ERROR);
- }
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
- return (PASS);
-}
-
-// ============================================================================
-// PTJ: fReadSecurity()
-// This reads from SM0 with Read Supervisory SPC command.
-// Need to have SPC Test Mode enabled before using these commands?
-// Returns:
-// 0 if successful
-// __________ if timed out on handshake to the device.
-// ============================================================================
-signed char fReadSecurity(void)
-{
- SendVector(ReadSecuritySetup, num_bits_ReadSecuritySetup);
-// SendVector(SPCTestMode_enable, num_bits_SPCTestMode_enable);
-
- bTargetAddress = 0x00;
- while (bTargetAddress < (SECURITY_BYTES_PER_BANK * 2)) { //PTJ: we do SECURITY_BYTES_PER_BANK * 2 because we bTargetAddress += 2
-
- //PTJ: TSYNC Enable
- SendVector(tsync_enable, num_bits_tsync_enable);
-
- SendVector(read_security_pt1, num_bits_read_security_pt1); //PTJ:
- // Set the drive here because SendByte() does not.
- SetSDATAStrong();
- SendByte(bTargetAddress, 7); //PTJ: hardcode MSb of address as 0 in bit stream
- SendVector(read_security_pt1_end,
- num_bits_read_security_pt1_end);
-
- //PTJ: TSYNC Disable
- SendVector(tsync_disable, num_bits_tsync_disable);
-
- SendVector(read_security_pt2, num_bits_read_security_pt2);
-
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
-
- SendVector(read_security_pt3, num_bits_read_security_pt3);
-
- SetSDATAStrong();
- SendByte(bTargetAddress, 7);
-
- SendVector(read_security_pt3_end,
- num_bits_read_security_pt3_end);
-
- SendVector(wait_and_poll_end, num_bits_wait_and_poll_end);
-
- bTargetAddress += 2;
- }
-
- bTargetAddress = 0x00;
- bTargetDataPtr = 0x00;
-
- SendVector(tsync_enable, num_bits_tsync_enable); //PTJ: 307, added for tsync testing
- while (bTargetAddress < (SECURITY_BYTES_PER_BANK * 2)) { //PTJ: we do SECURITY_BYTES_PER_BANK * 2 because we bTargetAddress += 2
-
- //Send Read Byte vector and then get a byte from Target
- SendVector(read_byte_v, 4);
- // Set the drive here because SendByte() does not
- SetSDATAStrong();
- SendByte(bTargetAddress, 7);
-
- RunClock(2); // Run two SCLK cycles between writing and reading
- SetSDATAHiZ(); // Set to HiZ so Target can drive SDATA
- bTargetDataIN = bReceiveByte();
-
- RunClock(1);
- SendVector(read_byte_v + 1, 1); // Send the ReadByte Vector End
-
- // Test the Byte that was read from the Target against the original
- // value (already in the 128-Byte array "abTargetDataOUT[]"). If it
- // matches, then bump the address & pointer,loop-back and continue.
- // If it does NOT match abort the loop and return and error.
- if (bTargetDataIN != abTargetDataOUT[bTargetDataPtr])
-// return(BLOCK_ERROR);
-
- // Increment the address by two to accomodate 7-Bit addressing
- // (puts the 7-bit address into MSBit locations for "SendByte()").
- bTargetDataPtr++;
- bTargetAddress += 2;
- }
-
- SendVector(tsync_disable, num_bits_tsync_disable); //PTJ: 307, added for tsync testing
- return (PASS);
-}
-
-#endif //(PROJECT_REV_)
-// end of file ISSP_Routines.c
diff --git a/drivers/input/keyboard/cypressbln/issp_vectors.h b/drivers/input/keyboard/cypressbln/issp_vectors.h
deleted file mode 100644
index 35d5ef1..0000000
--- a/drivers/input/keyboard/cypressbln/issp_vectors.h
+++ /dev/null
@@ -1,1146 +0,0 @@
-// filename: ISSP_Vectors.h
-#include "issp_revision.h"
-#ifdef PROJECT_REV_304
-/* Copyright 2006-2007, Cypress Semiconductor Corporation.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
-CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
-OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONRTACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND,EXPRESS OR IMPLIED,
- WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- Cypress reserves the right to make changes without further notice to the
- materials described herein. Cypress does not assume any liability arising
- out of the application or use of any product or circuit described herein.
- Cypress does not authorize its products for use as critical components in
- life-support systems where a malfunction or failure may reasonably be
- expected to result in significant injury to the user. The inclusion of
- Cypress� product in a life-support systems application implies that the
- manufacturer assumes all risk of such use and in doing so indemnifies
- Cypress against all charges.
-
- Use may be limited by and subject to the applicable Cypress software
- license agreement.
-
------------------------------------------------------------------------------*/
-#ifndef INC_ISSP_VECTORS
-#define INC_ISSP_VECTORS
-
-#include "issp_directives.h"
-
-#define HEX_DEFINE
-// ------------------------- PSoC CY8C20x66 Devices ---------------------------
-
-#ifdef CY8C20236 /// 2009.03.26. kimc
-unsigned char target_id_v[] = { 0x00, 0xb3, 0x52, 0x21 }; //ID for CY8C20236
-#endif
-#ifdef CY8C20246 /// 2009.03.26. kimc
-unsigned char target_id_v[] = { 0x00, 0xAA, 0x52, 0x21 }; //ID for CY8C20246
-#endif
-#ifdef CY8C20266
-unsigned char target_id_v[] = { 0x00, 0x96, 0x52, 0x21 }; //ID for CY8C20266
-#endif
-#ifdef CY8C20366
-unsigned char target_id_v[] = { 0x00, 0x97, 0x52, 0x21 }; //ID for CY8C20366
-#endif
-#ifdef CY8C20466
-unsigned char target_id_v[] = { 0x00, 0x98, 0x52, 0x21 }; //ID for CY8C20466
-#endif
-#ifdef CY8C20566
-unsigned char target_id_v[] = { 0x00, 0x99, 0x52, 0x21 }; //ID for CY8C20566
-#endif
-#ifdef CY8C20666
-unsigned char target_id_v[] = { 0x00, 0x9c, 0x52, 0x21 }; //ID for CY8C20666
-#endif
-#ifdef CY8C20066
-unsigned char target_id_v[] = { 0x00, 0x9a, 0x52, 0x21 }; //ID for CY8C20066
-#endif
-#ifdef CY8C200661
-unsigned char target_id_v[] = { 0x00, 0x9b, 0x52, 0x21 }; //ID for CY8C200661
-#endif
-
-#ifdef CY8C20x66
-unsigned char target_status00_v = 0x00; //PTJ: Status = 00 means Success, the SROM function did what it was supposed to
-unsigned char target_status01_v = 0x01; //PTJ: Status = 01 means that function is not allowed because of block level protection, for test with verify_setup (VERIFY-SETUP)
-unsigned char target_status03_v = 0x03; //PTJ: Status = 03 is fatal error, SROM halted
-unsigned char target_status04_v = 0x04; //PTJ: Status = 04 means that ___ for test with ___ (PROGRAM-AND-VERIFY)
-unsigned char target_status06_v = 0x06; //PTJ: Status = 06 means that Calibrate1 failed, for test with id_setup_1 (ID-SETUP-1)
-#endif
-
-/*************** CY8CTMA30x, CY8CTMG30x, CY8CTST30x series by KIMC, 2009.08.11 ***********************************/
-// ------------------------- PSoC CY8CTMA30x, CY8CTMG30x, CY8CTST30x Devices ---------------------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CY8CTST300_36 // CY8CTST300_36LQXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x06, 0x71, 0x70, 0x11 };
-#endif
-#ifdef CY8CTST300_48 // CY8CTST300_48LTXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x06, 0x72, 0x70, 0x11 };
-#endif
-#ifdef CY8CTST300_49 // CY8CTST300_49FNXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x06, 0x73, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA300_36 // CY8CTMA300_36LQXI // 2009.08.11, Test OK.
-unsigned char target_id_v[] = { 0x05, 0x71, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA300_48 // CY8CTMA300_48LTXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x72, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA300_49 // CY8CTMA300_49FNXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x73, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMG300_36 // CY8CTMG300_36LQXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x07, 0x71, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMG300_48 // CY8CTMG300_48LTXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x07, 0x72, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMG300_49 // CY8CTMG300_49FNXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x07, 0x73, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMG300B_36 // CY8CTMG300B_36LQXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x07, 0x75, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA300B_36 // CY8CTMA300B_36LQXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x74, 0x70, 0x11 };
-#endif
-#ifdef CY8CTST300B_36 // CY8CTST300B_36LQXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x06, 0x74, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA301_36 // CY8CTMA301_36LQXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x75, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA301_48 // CY8CTMA301_48LTXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x76, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA301D_36 // CY8CTMA301D_36LQXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x77, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA301D_48 // CY8CTMA301D_48LTXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x78, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA300D_36 // CY8CTMA300D_36LQXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x79, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA300D_48 // CY8CTMA300D_48LTXI // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x80, 0x70, 0x11 };
-#endif
-#ifdef CY8CTMA300D_49 // CY8CTMA300D_49FNXIT // 2009.08.11, not tested.
-unsigned char target_id_v[] = { 0x05, 0x81, 0x70, 0x11 };
-#endif
-/********************************************************************************************************/
-
-/*************** CY8CTMG/TST series modified by KJHW, 2009.08.14 ***********************************/
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CY8CTMG110
-unsigned char target_id_v[] = { 0x07, 0x38 }; //ID for CY8CTMG110
-
-unsigned char target_status00_v = 0x00; //PTJ: Status = 00 means Success, the SROM function did what it was supposed to
-unsigned char target_status01_v = 0x01; //PTJ: Status = 01 means that function is not allowed because of block level protection, for test with verify_setup (VERIFY-SETUP)
-unsigned char target_status03_v = 0x03; //PTJ: Status = 03 is fatal error, SROM halted
-unsigned char target_status04_v = 0x04; //PTJ: Status = 04 means that ___ for test with ___ (PROGRAM-AND-VERIFY)
-unsigned char target_status06_v = 0x06; //PTJ: Status = 06 means that Calibrate1 failed, for test with id_setup_1 (ID-SETUP-1)
-#endif
-
-#ifdef CY8CTST200_24PIN
-unsigned char target_id_v[] = { 0x06, 0x6D, 0x52, 0x21 }; //ID for CY8CTST200
-#endif
-#ifdef CY8CTST200_32PIN
-unsigned char target_id_v[] = { 0x06, 0x6E, 0x52, 0x21 }; //ID for CY8CTST200
-#endif
-#ifdef CY8CTMG200_24PIN
-unsigned char target_id_v[] = { 0x07, 0x6D, 0x52, 0x21 }; //ID for CY8CTMG200
-#endif
-#ifdef CY8CTMG200_32PIN
-unsigned char target_id_v[] = { 0x07, 0x6E, 0x52, 0x21 }; //ID for CY8CTMG200
-#endif
-
-/********************************************************************************************************/
-
-// ------------------------- PSoC CY8C21x23 Devices ---------------------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CY8C21123
-unsigned char target_id_v[] = { 0x00, 0x17 }; //ID for CY8C21123
-#endif
-#ifdef CY8C21223
-unsigned char target_id_v[] = { 0x00, 0x18 }; //ID for CY8C21223
-#endif
-#ifdef CY8C21323
-unsigned char target_id_v[] = { 0x00, 0x19 }; //ID for CY8C2132
-#endif
-#ifdef CY8C21002
-unsigned char target_id_v[] = { 0x00, 0x3F }; //ID for CY8C21x23 ICE pod
-#endif
-
-// ------------------------- PSoC CY8C21x34 Devices ---------------------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CY8C21234
-unsigned char target_id_v[] = { 0x00, 0x36 }; //ID for CY8C21234
-#endif
-#ifdef CY8C21334
-unsigned char target_id_v[] = { 0x00, 0x37 }; //ID for CY8C21334
-#endif
-#ifdef CY8C21434
-unsigned char target_id_v[] = { 0x00, 0x38 }; //ID for CY8C21434
-#endif
-#ifdef CY8C21534
-unsigned char target_id_v[] = { 0x00, 0x40 }; //ID for CY8C21534
-#endif
-#ifdef CY8C21634
-unsigned char target_id_v[] = { 0x00, 0x49 }; //ID for CY8C21634
-#endif
-#ifdef CY8C21001
-unsigned char target_id_v[] = { 0x00, 0x39 }; //ID for CY8C21x34 ICE pod
-#endif
-
-// ------------------------- PSoC CY8C24x23A Devices --------------------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CY8C24123A
-unsigned char target_id_v[] = { 0x00, 0x32 }; //ID for CY8C24123A
-#endif
-#ifdef CY8C24223A
-unsigned char target_id_v[] = { 0x00, 0x33 }; //ID for CY8C24223A
-#endif
-#ifdef CY8C24423A
-unsigned char target_id_v[] = { 0x00, 0x34 }; //ID for CY8C24423A
-#endif
-#ifdef CY8C24000A
-unsigned char target_id_v[] = { 0x00, 0x35 }; //ID for CY8C24x23A ICE pod
-#endif
-
-// ------------------------- PSoC CY8C24x94 Devices ---------------------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CY8C24794
-unsigned char target_id_v[] = { 0x00, 0x1D }; //ID for CY8C24794
-#endif
-#ifdef CY8C24894
-unsigned char target_id_v[] = { 0x00, 0x1F }; //ID for CY8C24894
-#endif
-#ifdef CY8C24994
-unsigned char target_id_v[] = { 0x00, 0x59 }; //ID for CY8C24994
-#endif
-#ifdef CY8C24094
-unsigned char target_id_v[] = { 0x00, 0x1B }; //ID for CY8C24094
-#endif
-
-// ------------------------- PSoC CY8C27x43 Devices ---------------------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CY8C27143
-unsigned char target_id_v[] = { 0x00, 0x09 }; //ID for CY8C27143
-#endif
-#ifdef CY8C27243
-unsigned char target_id_v[] = { 0x00, 0x0A }; //ID for CY8C27243
-#endif
-#ifdef CY8C27443
-unsigned char target_id_v[] = { 0x00, 0x0B }; //ID for CY8C27443
-#endif
-#ifdef CY8C27543
-unsigned char target_id_v[] = { 0x00, 0x0C }; //ID for CY8C27543
-#endif
-#ifdef CY8C27643
-unsigned char target_id_v[] = { 0x00, 0x0D }; //ID for CY8C27643
-#endif
-#ifdef CY8C27002
-unsigned char target_id_v[] = { 0x00, 0x0E }; //ID for CY8C27x43 ICE pod
-#endif
-
-// ------------------------- PSoC CY8C29x66 Devices ---------------------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CY8C29466
-unsigned char target_id_v[] = { 0x00, 0x2A }; //ID for CY8C29466
-#endif
-#ifdef CY8C29566
-unsigned char target_id_v[] = { 0x00, 0x2B }; //ID for CY8C29566
-#endif
-#ifdef CY8C29666
-unsigned char target_id_v[] = { 0x00, 0x2C }; //ID for CY8C29666
-#endif
-#ifdef CY8C29866
-unsigned char target_id_v[] = { 0x00, 0x2D }; //ID for CY8C29866
-#endif
-#ifdef CY8C29002
-unsigned char target_id_v[] = { 0x00, 0x2E }; //ID for CY8C29002
-#endif
-
-// --------- CY8C20x66 Vectors ------------------------------------------------
-// ----------------------------------------------------------------------------
-#ifdef TSYNC
-const unsigned int num_bits_tsync_enable = 110;
-const unsigned char tsync_enable[] = {
-#ifdef HEX_DEFINE
- 0xDE, 0xE2, 0x1F, 0x7F, 0x02, 0x7D, 0xC4, 0x09,
- 0xF7, 0x00, 0x1F, 0xDE, 0xE0, 0x1C
-#else
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01111111, 0 b00000010,
- 0 b01111101, 0 b11000100, 0 b00001001,
- 0 b11110111, 0 b00000000, 0 b00011111, 0 b11011110, 0 b11100000,
- 0 b00011100
-#endif
-};
-
-const unsigned int num_bits_tsync_disable = 110;
-const unsigned char tsync_disable[] = {
-#ifdef HEX_DEFINE
- 0xDE, 0xE2, 0x1F, 0x71, 0x00, 0x7D, 0xFC, 0x01,
- 0xF7, 0x00, 0x1F, 0xDE, 0xE0, 0x1C
-#else
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01110001, 0 b00000000,
- 0 b01111101, 0 b11111100, 0 b00000001,
- 0 b11110111, 0 b00000000, 0 b00011111, 0 b11011110, 0 b11100000,
- 0 b00011100
-#endif
-};
-#endif
-
-#ifdef CY8CTMx30x
-#ifdef ID_SETUP_1
-const unsigned int num_bits_id_setup_1 = 616; //KIMC, 2009.08.11, PTJ: id_setup_1 with TSYNC enabled for MW and disabled for IOW
-const unsigned char id_setup_1[] = {
- 0 b11001010, 0 b00000000, 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00000000, 0 b00000000, 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00001101, 0 b11101110, 0 b00100001, 0 b11110111, 0 b11110000,
- 0 b00100111, 0 b11011100, 0 b01000000,
- 0 b10011111, 0 b01110000, 0 b00000001, 0 b11111101, 0 b11101110,
- 0 b00000001, 0 b11100111, 0 b11000001,
- 0 b11010111, 0 b10011111, 0 b00100000, 0 b01111110, 0 b00111111,
- 0 b10011101, 0 b01111000, 0 b11110110,
- 0 b00100001, 0 b11110111, 0 b10111000, 0 b10000111, 0 b11011111,
- 0 b11000000, 0 b00011111, 0 b01110001,
- 0 b00000000, 0 b01111101, 0 b11000000, 0 b00000111, 0 b11110111,
- 0 b10111000, 0 b00000111, 0 b11011110,
- 0 b10000000, 0 b01111111, 0 b01111010, 0 b10000000, 0 b01111101,
- 0 b11101100, 0 b00000001, 0 b11110111,
- 0 b10000000, 0 b01001111, 0 b11011111, 0 b00000000, 0 b00011111,
- 0 b01111100, 0 b10100000, 0 b01111101,
- 0 b11110100, 0 b01100001, 0 b11110111, 0 b11111000, 0 b10010111
-};
-#endif
-#else
-#ifdef ID_SETUP_1
-const unsigned int num_bits_id_setup_1 = 594; //PTJ: id_setup_1 with TSYNC enabled for MW and disabled for IOW
-const unsigned char id_setup_1[] = {
-#ifdef HEX_DEFINE
- 0xCA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0D, 0xEE, 0x21, 0xF7, 0xF0, 0x27, 0xDC, 0x40,
- 0x9F, 0x70, 0x01, 0xFD, 0xEE, 0x01, /*0x21, */ 0xE7, 0xC1,
- 0xD7, 0x9F, 0x20, 0x7E, 0x7D, 0x88, 0x7D, 0xEE,
- 0x21, 0xF7, 0xF0, 0x07, 0xDC, 0x40, 0x1F, 0x70,
- 0x01, 0xFD, 0xEE, 0x01, 0xF7, 0xA0, 0x1F, 0xDE,
- 0xA0, 0x1F, 0x7B, 0x00, 0x7D, 0xE0, 0x13, 0xF7,
- 0xC0, 0x07, 0xDF, 0x28, 0x1F, 0x7D, 0x18, 0x7D,
- 0xFE, 0x25, 0xC0
-#else
- 0 b11001010, 0 b00000000, 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00000000, 0 b00000000, 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00001101, 0 b11101110, 0 b00100001, 0 b11110111, 0 b11110000,
- 0 b00100111, 0 b11011100, 0 b01000000,
- 0 b10011111, 0 b01110000, 0 b00000001, 0 b11111101, 0 b11101110,
- 0 b00100001, 0 b11100111, 0 b11000001,
- 0 b11010111, 0 b10011111, 0 b00100000, 0 b01111110, 0 b01111101,
- 0 b10001000, 0 b01111101, 0 b11101110,
- 0 b00100001, 0 b11110111, 0 b11110000, 0 b00000111, 0 b11011100,
- 0 b01000000, 0 b00011111, 0 b01110000,
- 0 b00000001, 0 b11111101, 0 b11101110, 0 b00000001, 0 b11110111,
- 0 b10100000, 0 b00011111, 0 b11011110,
- 0 b10100000, 0 b00011111, 0 b01111011, 0 b00000000, 0 b01111101,
- 0 b11100000, 0 b00010011, 0 b11110111,
- 0 b11000000, 0 b00000111, 0 b11011111, 0 b00101000, 0 b00011111,
- 0 b01111101, 0 b00011000, 0 b01111101,
- 0 b11111110, 0 b00100101, 0 b11000000
-#endif
-};
-#endif
-#endif
-
-#ifdef SET_BLOCK_NUM
-const unsigned int num_bits_set_block_num = 11; //PTJ:
-const unsigned char set_block_num[] = {
-#ifdef HEX_DEFINE
- 0x9f, 0x40, 0x1c
-#else
- 0 b11011110, 0 b11100000, 0 b00011110, 0 b01111101, 0 b00000000,
- 0 b01110000
-#endif
-};
-
-const unsigned int num_bits_set_block_num_end = 3; //PTJ: this selects the first three bits of set_block_num_end
-const unsigned char set_block_num_end = 0xE0;
-#endif
-
-#ifdef READ_WRITE_SETUP
-const unsigned int num_bits_read_write_setup = 66; //PTJ:
-const unsigned char read_write_setup[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xf0, 0x1f, 0x78, 0x00, 0x7d, 0xa0, 0x03,
- 0xc0
-#else
- 0 b11011110, 0 b11110000, 0 b00011111, 0 b01111000, 0 b00000000,
- 0 b01111101, 0 b10100000, 0 b00000011,
- 0 b11000000
-#endif
-};
-#endif
-
-#ifdef VERIFY_SETUP
-const unsigned int num_bits_my_verify_setup = 440;
-const unsigned char verify_setup[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe2, 0x1f, 0x7f, 0x02, 0x7d, 0xc4, 0x09,
- 0xf7, 0x00, 0x1f, 0x9f, 0x07, 0x5e, 0xfc, 0x81,
- 0xf9, 0xf7, 0x01, 0xf7, 0xf0, 0x07, 0xdc, 0x40,
- 0x1f, 0x70, 0x01, 0xfd, 0xee, 0x01, 0xf6, 0xa8,
- 0x0f, 0xde, 0x80, 0x7f, 0x7a, 0x80, 0x7d, 0xec,
- 0x01, 0xf7, 0x80, 0x0f, 0xdf, 0x00, 0x1f, 0x7c,
- 0xa0, 0xfd, 0xf4, 0x61, 0xf7, 0xf8, 0x97
-#else
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01111111, 0 b00000010,
- 0 b01111101, 0 b11000100, 0 b00001001,
- 0 b11110111, 0 b00000000, 0 b00011111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b11111001, 0 b11110111, 0 b00000001, 0 b11110111, 0 b11110000,
- 0 b00000111, 0 b11011100, 0 b01000000,
- 0 b00011111, 0 b01110000, 0 b00000001, 0 b11111101, 0 b11101110,
- 0 b00000001, 0 b11110110, 0 b10101000,
- 0 b00001111, 0 b11011110, 0 b10000000, 0 b01111111, 0 b01111010,
- 0 b10000000, 0 b01111101, 0 b11101100,
- 0 b00000001, 0 b11110111, 0 b10000000, 0 b00001111, 0 b11011111,
- 0 b00000000, 0 b00011111, 0 b01111100,
- 0 b10100000, 0 b01111101, 0 b11110100, 0 b01100001, 0 b11110111,
- 0 b11111000, 0 b10010111
-#endif
-};
-#endif
-
-#ifdef ERASE
-const unsigned int num_bits_erase = 396; //PTJ: erase with TSYNC Enable and Disable
-const unsigned char erase[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe2, 0x1f, 0x7f, 0x02, 0x7d, 0xc4, 0x09,
- 0xf7, 0x00, 0x1f, 0x9f, 0x07, 0x5e, 0x7c, 0x85,
- 0xfd, 0xfc, 0x01, 0xf7, 0x10, 0x07, 0xdc, 0x00,
- 0x7f, 0x7b, 0x80, 0x7d, 0xe0, 0x0b, 0xf7, 0xa0,
- 0x1f, 0xd7, 0xa0, 0x1f, 0x7b, 0x04, 0x7d, 0xf0,
- 0x01, 0xf7, 0xc9, 0x87, 0xdf, 0x48, 0x1f, 0x7f,
- 0x89, 0x70
-#else
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01111111, 0 b00000010,
- 0 b01111101, 0 b11000100, 0 b00001001,
- 0 b11110111, 0 b00000000, 0 b00011111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000101,
- 0 b11111101, 0 b11111100, 0 b00000001, 0 b11110111, 0 b00010000,
- 0 b00000111, 0 b11011100, 0 b00000000,
- 0 b01111111, 0 b01111011, 0 b10000000, 0 b01111101, 0 b11100000,
- 0 b00001011, 0 b11110111, 0 b10100000,
- 0 b00011111, 0 b11011110, 0 b10100000, 0 b00011111, 0 b01111011,
- 0 b00000100, 0 b01111101, 0 b11110000,
- 0 b00000001, 0 b11110111, 0 b11001001, 0 b10000111, 0 b11011111,
- 0 b01001000, 0 b00011111, 0 b01111111,
- 0 b10001001, 0 b01110000
-#endif
-};
-#endif
-
-#ifdef SECURE
-const unsigned int num_bits_secure = 440; //PTJ: secure with TSYNC Enable and Disable
-const unsigned char secure[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe2, 0x1f, 0x7f, 0x02, 0x7d, 0xc4, 0x09,
- 0xf7, 0x00, 0x1f, 0x9f, 0x07, 0x5e, 0x7c, 0x81,
- 0xf9, 0xf7, 0x01, 0xf7, 0xf0, 0x07, 0xdc, 0x40,
- 0x1f, 0x70, 0x01, 0xfd, 0xee, 0x01, 0xf6, 0xa0,
- 0x0f, 0xde, 0x80, 0x7f, 0x7a, 0x80, 0x7d, 0xec,
- 0x01, 0xf7, 0x80, 0x27, 0xdf, 0x00, 0x1f, 0x7c,
- 0xa0, 0x7d, 0xf4, 0x61, 0xf7, 0xf8, 0x97
-#else
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01111111, 0 b00000010,
- 0 b01111101, 0 b11000100, 0 b00001001,
- 0 b11110111, 0 b00000000, 0 b00011111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b11111001, 0 b11110111, 0 b00000001, 0 b11110111, 0 b11110000,
- 0 b00000111, 0 b11011100, 0 b01000000,
- 0 b00011111, 0 b01110000, 0 b00000001, 0 b11111101, 0 b11101110,
- 0 b00000001, 0 b11110110, 0 b10100000,
- 0 b00001111, 0 b11011110, 0 b10000000, 0 b01111111, 0 b01111010,
- 0 b10000000, 0 b01111101, 0 b11101100,
- 0 b00000001, 0 b11110111, 0 b10000000, 0 b00100111, 0 b11011111,
- 0 b00000000, 0 b00011111, 0 b01111100,
- 0 b10100000, 0 b01111101, 0 b11110100, 0 b01100001, 0 b11110111,
- 0 b11111000, 0 b10010111
-#endif
-};
-#endif
-
-#ifdef READ_SECURITY
-const unsigned int num_bits_ReadSecuritySetup = 88; //PTJ: READ-SECURITY-SETUP
-const unsigned char ReadSecuritySetup[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe2, 0x1f, 0x60, 0x88, 0x7d, 0x84, 0x21,
- 0xf7, 0xb8, 0x07
-#else
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01100000, 0 b10001000,
- 0 b01111101, 0 b10000100, 0 b00100001,
- 0 b11110111, 0 b10111000, 0 b00000111
-#endif
-};
-
-const unsigned int num_bits_read_security_pt1 = 78; //PTJ: This sends the beginning of the Read Supervisory command
-const unsigned char read_security_pt1[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe2, 0x1f, 0x72, 0x87, 0x7d, 0xca, 0x01,
- 0xf7, 0x28
-#else
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01110010, 0 b10000111,
- 0 b01111101, 0 b11001010, 0 b00000001,
- 0 b11110111, 0 b00101000
-#endif
-};
-
-const unsigned int num_bits_read_security_pt1_end = 25; //PTJ: this finishes the Address Low command and sends the Address High command
-const unsigned char read_security_pt1_end[] = {
-#ifdef HEX_DEFINE
- 0xfb, 0x94, 0x03, 0x80
-#else
- 0 b11111011, 0 b10010100, 0 b00000011, 0 b10000000
-#endif
-};
-
-const unsigned int num_bits_read_security_pt2 = 198; //PTJ: load the test queue with the op code for MOV 1,E5h register into Accumulator A
-const unsigned char read_security_pt2[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe0, 0x1f, 0x7a, 0x01, 0xfd, 0xea, 0x01,
- 0xf7, 0xb0, 0x07, 0xdf, 0x0b, 0xbf, 0x7c, 0xf2,
- 0xfd, 0xf4, 0x61, 0xf7, 0xb8, 0x87, 0xdf, 0xe2,
- 0x5c
-#else
- 0 b11011110, 0 b11100000, 0 b00011111, 0 b01111010, 0 b00000001,
- 0 b11111101, 0 b11101010, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b00000111, 0 b11011111, 0 b00001011,
- 0 b10111111, 0 b01111100, 0 b11110010,
- 0 b11111101, 0 b11110100, 0 b01100001, 0 b11110111, 0 b10111000,
- 0 b10000111, 0 b11011111, 0 b11100010,
- 0 b01011100
-#endif
-};
-
-const unsigned int num_bits_read_security_pt3 = 122; //PTJ:
-const unsigned char read_security_pt3[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe0, 0x1f, 0x7a, 0x01, 0xfd, 0xea, 0x01,
- 0xf7, 0xb0, 0x07, 0xdf, 0x0a, 0x7f, 0x7c, 0xc0
-#else
- 0 b11011110, 0 b11100000, 0 b00011111, 0 b01111010, 0 b00000001,
- 0 b11111101, 0 b11101010, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b00000111, 0 b11011111, 0 b00001010,
- 0 b01111111, 0 b01111100, 0 b11000000
-#endif
-};
-
-const unsigned int num_bits_read_security_pt3_end = 47; //PTJ:
-const unsigned char read_security_pt3_end[] = {
-#ifdef HEX_DEFINE
- 0xfb, 0xe8, 0xc3, 0xef, 0xf1, 0x2e
-#else
- 0 b11111011, 0 b11101000, 0 b11000011, 0 b11101111, 0 b11110001,
- 0 b00101110
-#endif
-};
-
-#endif
-
-// --------- CY8C20x66 Checksum Setup Vector ----------------------------------
-// ----------------------------------------------------------------------------
-#ifdef CHECKSUM_SETUP
-const unsigned int num_bits_checksum_setup = 418; //PTJ: Checksum with TSYNC Enable and Disable
-const unsigned char checksum_setup[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe2, 0x1f, 0x7f, 0x02, 0x7d, 0xc4, 0x09,
- 0xf7, 0x00, 0x1f, 0x9f, 0x07, 0x5e, 0x7c, 0x81,
- 0xf9, 0xf4, 0x01, 0xf7, 0xf0, 0x07, 0xdc, 0x40,
- 0x1f, 0x70, 0x01, 0xfd, 0xee, 0x01, 0xf7, 0xa0,
- 0x1f, 0xde, 0xa0, 0x1f, 0x7b, 0x00, 0x7d, 0xe0,
- 0x0f, 0xf7, 0xc0, 0x07, 0xdf, 0x28, 0x1f, 0x7d,
- 0x18, 0x7d, 0xfe, 0x25, 0xc0
-#else
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01111111, 0 b00000010,
- 0 b01111101, 0 b11000100, 0 b00001001,
- 0 b11110111, 0 b00000000, 0 b00011111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b11111001, 0 b11110100, 0 b00000001, 0 b11110111, 0 b11110000,
- 0 b00000111, 0 b11011100, 0 b01000000,
- 0 b00011111, 0 b01110000, 0 b00000001, 0 b11111101, 0 b11101110,
- 0 b00000001, 0 b11110111, 0 b10100000,
- 0 b00011111, 0 b11011110, 0 b10100000, 0 b00011111, 0 b01111011,
- 0 b00000000, 0 b01111101, 0 b11100000,
- 0 b00001111, 0 b11110111, 0 b11000000, 0 b00000111, 0 b11011111,
- 0 b00101000, 0 b00011111, 0 b01111101,
- 0 b00011000, 0 b01111101, 0 b11111110, 0 b00100101, 0 b11000000
-#endif
-};
-#endif
-
-// --------- CY8C21x23, CY8C21x34 & CY8C27x43 Checksum Setup Vectors ----------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CHECKSUM_SETUP_21_27
-const unsigned int num_bits_checksum = 286;
-const unsigned char checksum_v[] = {
-#ifdef HEX_DEFINE
- 0xDE, 0xE0, 0x1F, 0x7B, 0x00, 0x79, 0xF0, 0x75,
- 0xE7, 0xC8, 0x1F, 0xDE, 0xA0, 0x1F, 0x7A, 0x01,
- 0xF9, 0xF7, 0x01, 0xF7, 0xC9, 0x87, 0xDF, 0x48,
- 0x1E, 0x7D, 0x00, 0x7D, 0xE0, 0x0F, 0xF7, 0xC0,
- 0x07, 0xDF, 0xE2, 0x5C
-#else
- 0 b11011110, 0 b11100000, 0 b00011111, 0 b01111011, 0 b00000000,
- 0 b01111001, 0 b11110000, 0 b01110101,
- 0 b11100111, 0 b11001000, 0 b00011111, 0 b11011110, 0 b10100000,
- 0 b00011111, 0 b01111010, 0 b00000001,
- 0 b11111001, 0 b11110111, 0 b00000001, 0 b11110111, 0 b11001001,
- 0 b10000111, 0 b11011111, 0 b01001000,
- 0 b00011110, 0 b01111101, 0 b00000000, 0 b01111101, 0 b11100000,
- 0 b00001111, 0 b11110111, 0 b11000000,
- 0 b00000111, 0 b11011111, 0 b11100010, 0 b01011100
-#endif
-};
-#endif
-
-// -------------- CY8C24x23 & CY8C24x23A Checksum Setup Vectors ---------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CHECKSUM_SETUP_24_24A
-const unsigned int num_bits_checksum = 286;
-const unsigned char checksum_v[] = {
-#ifdef HEX_DEFINE
- 0xDE, 0xE0, 0x1F, 0x7B, 0x00, 0x79, 0xF0, 0x75,
- 0xE7, 0xC8, 0x1F, 0xDE, 0xA0, 0x1F, 0x7A, 0x01,
- 0xF9, 0xF7, 0x01, 0xF7, 0xC9, 0x87, 0xDF, 0x48,
- 0x1E, 0x7D, 0x20, 0x7D, 0xE0, 0x0F, 0xF7, 0xC0,
- 0x07, 0xDF, 0xE2, 0x5C
-#else
- 0 b11011110, 0 b11100000, 0 b00011111, 0 b01111011, 0 b00000000,
- 0 b01111001, 0 b11110000, 0 b01110101,
- 0 b11100111, 0 b11001000, 0 b00011111, 0 b11011110, 0 b10100000,
- 0 b00011111, 0 b01111010, 0 b00000001,
- 0 b11111001, 0 b11110111, 0 b00000001, 0 b11110111, 0 b11001001,
- 0 b10000111, 0 b11011111, 0 b01001000,
- 0 b00011110, 0 b01111101, 0 b00100000, 0 b01111101, 0 b11100000,
- 0 b00001111, 0 b11110111, 0 b11000000,
- 0 b00000111, 0 b11011111, 0 b11100010, 0 b01011100
-#endif
-};
-#endif
-
-// -------------- CY8C24x94 & CY8C29x66 Checksum Setup Vectors ----------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef CHECKSUM_SETUP_24_29
-const unsigned int num_bits_checksum = 286;
-const unsigned char checksum_v[] = {
-#ifdef HEX_DEFINE
- 0xDE, 0xE0, 0x1F, 0x7B, 0x00, 0x79, 0xF0, 0x75,
- 0xE7, 0xC8, 0x1F, 0xDE, 0xA0, 0x1F, 0x7A, 0x01,
- 0xF9, 0xF6, 0x01, 0xF7, 0xC9, 0x87, 0xDF, 0x48,
- 0x1E, 0x7D, 0x40, 0x7D, 0xE0, 0x0F, 0xF7, 0xC0,
- 0x07, 0xDF, 0xE2, 0x5C
-#else
- 0 b11011110, 0 b11100000, 0 b00011111, 0 b01111011, 0 b00000000,
- 0 b01111001, 0 b11110000, 0 b01110101,
- 0 b11100111, 0 b11001000, 0 b00011111, 0 b11011110, 0 b10100000,
- 0 b00011111, 0 b01111010, 0 b00000001,
- 0 b11111001, 0 b11110110, 0 b00000001, 0 b11110111, 0 b11001001,
- 0 b10000111, 0 b11011111, 0 b01001000,
- 0 b00011110, 0 b01111101, 0 b00100000, 0 b01111101, 0 b11100000,
- 0 b00001111, 0 b11110111, 0 b11000000,
- 0 b00000111, 0 b11011111, 0 b11100010, 0 b01011100
-#endif
-};
-#endif
-
-// ---- CY8C20x66 Program Block Vector ----------------------------------------
-//
-// ----------------------------------------------------------------------------
-#ifdef PROGRAM_AND_VERIFY
-const unsigned int num_bits_program_and_verify = 440; //KIMC, PTJ: length of program_block[], not including zero padding at end
-const unsigned char program_and_verify[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe2, 0x1f, 0x7f, 0x02, 0x7d, 0xc4, 0x09,
- 0xf7, 0x00, 0x1f, 0x9f, 0x07, 0x5e, 0x7c, 0x81,
- 0xf9, 0xf7, 0x01, 0xf7, 0xf0, 0x07, 0xdc, 0x40,
- 0x1f, 0x70, 0x01, 0xfd, 0xee, 0x01, 0xf6, 0xa0,
- 0x0f, 0xde, 0x80, 0x7f, 0x7a, 0x80, 0x7d, 0xec,
- 0x01, 0xf7, 0x80, 0x57, 0xdf, 0x00, 0x1f, 0x7c,
- 0xa0, 0x7d, 0xf4, 0x61, 0xf7, 0xf8, 0x97
-#else
- 0 b00011011110, 0 b11100010, 0 b00011111, 0 b01111111, 0 b00000010,
- 0 b01111101, 0 b11000100, 0 b00001001,
- 0 b00011110111, 0 b00000000, 0 b00011111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b00011111001, 0 b11110111, 0 b00000001, 0 b11110111, 0 b11110000,
- 0 b00000111, 0 b11011100, 0 b01000000,
- 0 b00000011111, 0 b01110000, 0 b00000001, 0 b11111101, 0 b11101110,
- 0 b00000001, 0 b11110110, 0 b10100000,
- 0 b00000001111, 0 b11011110, 0 b10000000, 0 b01111111, 0 b01111010,
- 0 b10000000, 0 b01111101, 0 b11101100,
- 0 b00000000001, 0 b11110111, 0 b10000000, 0 b01010111, 0 b11011111,
- 0 b00000000, 0 b00011111, 0 b01111100,
- 0 b00010100000, 0 b01111101, 0 b11110100, 0 b01100001, 0 b11110111,
- 0 b11111000, 0 b10010111
-#endif
-};
-#endif
-
-// ---- CY8C21xxx, CY8C24x23A, CY8C24x94 & CY8C29x66 Program Block Vectors ----
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef PROGRAM_BLOCK_21_24_29
-const unsigned int num_bits_program_block = 308;
-const unsigned char program_block[] = {
-#ifdef HEX_DEFINE
- 0x9F, 0x8A, 0x9E, 0x7F, 0x2B, 0x7D, 0xEE, 0x01,
- 0xF7, 0xB0, 0x07, 0x9F, 0x07, 0x5E, 0x7C, 0x81,
- 0xFD, 0xEA, 0x01, 0xF7, 0xA0, 0x1F, 0x9F, 0x70,
- 0x1F, 0x7C, 0x98, 0x7D, 0xF4, 0x81, 0xF7, 0x80,
- 0x17, 0xDF, 0x00, 0x1F, 0x7F, 0x89, 0x70
-#else
- 0 b10011111, 0 b10001010, 0 b10011110, 0 b01111111, 0 b00101011,
- 0 b01111101, 0 b11101110, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b00000111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b11111101, 0 b11101010, 0 b00000001, 0 b11110111, 0 b10100000,
- 0 b00011111, 0 b10011111, 0 b01110000,
- 0 b00011111, 0 b01111100, 0 b10011000, 0 b01111101, 0 b11110100,
- 0 b10000001, 0 b11110111, 0 b10000000,
- 0 b00010111, 0 b11011111, 0 b00000000, 0 b00011111, 0 b01111111,
- 0 b10001001, 0 b01110000
-#endif
-};
-#endif
-
-// --------------------- CY8C27x43 Program Block Vectors-----------------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-#ifdef PROGRAM_BLOCK_27
-const unsigned int num_bits_program_block = 308;
-
-const unsigned char program_block[] = {
-#ifdef HEX_DEFINE
- 0x9F, 0x82, 0xBE, 0x7F, 0x2B, 0x7D, 0xEE, 0x01,
- 0xF7, 0xB0, 0x07, 0x9F, 0x07, 0x5E, 0x7C, 0x81,
- 0xFD, 0xEA, 0x01, 0xF7, 0xA0, 0x1F, 0x9F, 0x70,
- 0x1F, 0x7C, 0x98, 0x7D, 0xF4, 0x81, 0xF7, 0x80,
- 0x17, 0xDF, 0x00, 0x1F, 0x7F, 0x89, 0x70
-#else
- 0 b10011111, 0 b10000010, 0 b10111110, 0 b01111111, 0 b00101011,
- 0 b01111101, 0 b11101110, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b00000111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b11111101, 0 b11101010, 0 b00000001, 0 b11110111, 0 b10100000,
- 0 b00011111, 0 b10011111, 0 b01110000,
- 0 b00011111, 0 b01111100, 0 b10011000, 0 b01111101, 0 b11110100,
- 0 b10000001, 0 b11110111, 0 b10000000,
- 0 b00010111, 0 b11011111, 0 b00000000, 0 b00011111, 0 b01111111,
- 0 b10001001, 0 b01110000
-#endif
-};
-#endif
-
-// ----------------------------- General PSoC Vectors--------------------------
-// Modifying these tables is NOT recommendended. Doing so will all but
-// guarantee an ISSP error, unless updated vectors have been recommended or
-// provided by Cypress Semiconductor.
-// ----------------------------------------------------------------------------
-const unsigned int num_bits_init1 = 396;
-const unsigned char init1_v[] = {
-#ifdef HEX_DEFINE
- 0xCA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x0D, 0xEE, 0x01, 0xF7, 0xB0, 0x07, 0x9F, 0x07,
- 0x5E, 0x7C, 0x81, 0xFD, 0xEA, 0x01, 0xF7, 0xA0,
- 0x1F, 0x9F, 0x70, 0x1F, 0x7C, 0x98, 0x7D, 0xF4,
- 0x81, 0xF7, 0x80, 0x4F, 0xDF, 0x00, 0x1F, 0x7F,
- 0x89, 0x70
-#else
- 0 b11001010, 0 b00000000, 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00000000, 0 b00000000, 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00000000, 0 b00000000, 0 b00000000,
- 0 b00001101, 0 b11101110, 0 b00000001, 0 b11110111, 0 b10110000,
- 0 b00000111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001, 0 b11111101, 0 b11101010,
- 0 b00000001, 0 b11110111, 0 b10100000,
- 0 b00011111, 0 b10011111, 0 b01110000, 0 b00011111, 0 b01111100,
- 0 b10011000, 0 b01111101, 0 b11110100,
- 0 b10000001, 0 b11110111, 0 b10000000, 0 b01001111, 0 b11011111,
- 0 b00000000, 0 b00011111, 0 b01111111,
- 0 b10001001, 0 b01110000
-#endif
-};
-
-const unsigned int num_bits_init2 = 286;
-const unsigned char init2_v[] = {
-#ifdef HEX_DEFINE
- 0xDE, 0xE0, 0x1F, 0x7B, 0x00, 0x79, 0xF0, 0x75,
- 0xE7, 0xC8, 0x1F, 0xDE, 0xA0, 0x1F, 0x7A, 0x01,
- 0xF9, 0xF7, 0x01, 0xF7, 0xC9, 0x87, 0xDF, 0x48,
- 0x1E, 0x7D, 0x00, 0xFD, 0xE0, 0x0D, 0xF7, 0xC0,
- 0x07, 0xDF, 0xE2, 0x5C
-#else
- 0 b11011110, 0 b11100000, 0 b00011111, 0 b01111011, 0 b00000000,
- 0 b01111001, 0 b11110000, 0 b01110101,
- 0 b11100111, 0 b11001000, 0 b00011111, 0 b11011110, 0 b10100000,
- 0 b00011111, 0 b01111010, 0 b00000001,
- 0 b11111001, 0 b11110111, 0 b00000001, 0 b11110111, 0 b11001001,
- 0 b10000111, 0 b11011111, 0 b01001000,
- 0 b00011110, 0 b01111101, 0 b00000000, 0 b11111101, 0 b11100000,
- 0 b00001101, 0 b11110111, 0 b11000000,
- 0 b00000111, 0 b11011111, 0 b11100010, 0 b01011100
-#endif
-};
-
-const unsigned int num_bits_init3_5v = 836;
-const unsigned char init3_5v[] = {
-#ifdef HEX_DEFINE
- 0xDE, 0xE0, 0x1F, 0x7A, 0x01, 0xFD, 0xEA, 0x01,
- 0xF7, 0xB0, 0x47, 0xDF, 0x0A, 0x3F, 0x7C, 0xFE,
- 0x7D, 0xF4, 0x61, 0xF7, 0xF8, 0x97, 0x00, 0x00,
- 0x03, 0x7B, 0x80, 0x7D, 0xE8, 0x07, 0xF7, 0xA8,
- 0x07, 0xDE, 0xC1, 0x1F, 0x7C, 0x30, 0x7D, 0xF3,
- 0xD5, 0xF7, 0xD1, 0x87, 0xDE, 0xE2, 0x1F, 0x7F,
- 0x89, 0x70, 0x00, 0x00, 0x37, 0xB8, 0x07, 0xDE,
- 0x80, 0x7F, 0x7A, 0x80, 0x7D, 0xEC, 0x11, 0xF7,
- 0xC2, 0x8F, 0xDF, 0x3F, 0xBF, 0x7D, 0x18, 0x7D,
- 0xFE, 0x25, 0xC0, 0x00, 0x00, 0xDE, 0xE0, 0x1F,
- 0x7A, 0x01, 0xFD, 0xEA, 0x01, 0xF7, 0xB0, 0x47,
- 0xDF, 0x0C, 0x1F, 0x7C, 0xF4, 0x7D, 0xF4, 0x61,
- 0xF7, 0xB8, 0x87, 0xDF, 0xE2, 0x5C, 0x00, 0x00,
- 0x00
-#else
- 0 b11011110, 0 b11100000, 0 b00011111, 0 b01111010, 0 b00000001,
- 0 b11111101, 0 b11101010, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b01000111, 0 b11011111, 0 b00001010,
- 0 b00111111, 0 b01111100, 0 b11111110,
- 0 b01111101, 0 b11110100, 0 b01100001, 0 b11110111, 0 b11111000,
- 0 b10010111, 0 b00000000, 0 b00000000,
- 0 b00000011, 0 b01111011, 0 b10000000, 0 b01111101, 0 b11101000,
- 0 b00000111, 0 b11110111, 0 b10101000,
- 0 b00000111, 0 b11011110, 0 b11000001, 0 b00011111, 0 b01111100,
- 0 b00110000, 0 b01111101, 0 b11110011,
- 0 b11010101, 0 b11110111, 0 b11010001, 0 b10000111, 0 b11011110,
- 0 b11100010, 0 b00011111, 0 b01111111,
- 0 b10001001, 0 b01110000, 0 b00000000, 0 b00000000, 0 b00110111,
- 0 b10111000, 0 b00000111, 0 b11011110,
- 0 b10000000, 0 b01111111, 0 b01111010, 0 b10000000, 0 b01111101,
- 0 b11101100, 0 b00010001, 0 b11110111,
- 0 b11000010, 0 b10001111, 0 b11011111, 0 b00111111, 0 b10111111,
- 0 b01111101, 0 b00011000, 0 b01111101,
- 0 b11111110, 0 b00100101, 0 b11000000, 0 b00000000, 0 b00000000,
- 0 b11011110, 0 b11100000, 0 b00011111,
- 0 b01111010, 0 b00000001, 0 b11111101, 0 b11101010, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b01000111,
- 0 b11011111, 0 b00001100, 0 b00011111, 0 b01111100, 0 b11110100,
- 0 b01111101, 0 b11110100, 0 b01100001,
- 0 b11110111, 0 b10111000, 0 b10000111, 0 b11011111, 0 b11100010,
- 0 b01011100, 0 b00000000, 0 b00000000,
- 0 b00000000
-#endif
-};
-
-const unsigned int num_bits_init3_3v = 836;
-const unsigned char init3_3v[] = {
-#ifdef HEX_DEFINE
- 0xDE, 0xE0, 0x1F, 0x7A, 0x01, 0xFD, 0xEA, 0x01,
- 0xF7, 0xB0, 0x47, 0xDF, 0x0A, 0x3F, 0x7C, 0xFC,
- 0x7D, 0xF4, 0x61, 0xF7, 0xF8, 0x97, 0x00, 0x00,
- 0x03, 0x7B, 0x80, 0x7D, 0xE8, 0x07, 0xF7, 0xA8,
- 0x07, 0xDE, 0xC1, 0x1F, 0x7C, 0x30, 0x7D, 0xF3,
- 0xD5, 0xF7, 0xD1, 0x87, 0xDE, 0xE2, 0x1F, 0x7F,
- 0x89, 0x70, 0x00, 0x00, 0x37, 0xB8, 0x07, 0xDE,
- 0x80, 0x7F, 0x7A, 0x80, 0x7D, 0xEC, 0x11, 0xF7,
- 0xC2, 0x8F, 0xDF, 0x3F, 0x3F, 0x7D, 0x18, 0x7D,
- 0xFE, 0x25, 0xC0, 0x00, 0x00, 0xDE, 0xE0, 0x1F,
- 0x7A, 0x01, 0xFD, 0xEA, 0x01, 0xF7, 0xB0, 0x47,
- 0xDF, 0x0C, 0x1F, 0x7C, 0xF4, 0x7D, 0xF4, 0x61,
- 0xF7, 0xB8, 0x87, 0xDF, 0xE2, 0x5C, 0x00, 0x00,
- 0x00
-#else
- 0 b11011110, 0 b11100000, 0 b00011111, 0 b01111010, 0 b00000001,
- 0 b11111101, 0 b11101010, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b01000111, 0 b11011111, 0 b00001010,
- 0 b00111111, 0 b01111100, 0 b11111100,
- 0 b01111101, 0 b11110100, 0 b01100001, 0 b11110111, 0 b11111000,
- 0 b10010111, 0 b00000000, 0 b00000000,
- 0 b00000011, 0 b01111011, 0 b10000000, 0 b01111101, 0 b11101000,
- 0 b00000111, 0 b11110111, 0 b10101000,
- 0 b00000111, 0 b11011110, 0 b11000001, 0 b00011111, 0 b01111100,
- 0 b00110000, 0 b01111101, 0 b11110011,
- 0 b11010101, 0 b11110111, 0 b11010001, 0 b10000111, 0 b11011110,
- 0 b11100010, 0 b00011111, 0 b01111111,
- 0 b10001001, 0 b01110000, 0 b00000000, 0 b00000000, 0 b00110111,
- 0 b10111000, 0 b00000111, 0 b11011110,
- 0 b10000000, 0 b01111111, 0 b01111010, 0 b10000000, 0 b01111101,
- 0 b11101100, 0 b00010001, 0 b11110111,
- 0 b11000010, 0 b10001111, 0 b11011111, 0 b00111111, 0 b00111111,
- 0 b01111101, 0 b00011000, 0 b01111101,
- 0 b11111110, 0 b00100101, 0 b11000000, 0 b00000000, 0 b00000000,
- 0 b11011110, 0 b11100000, 0 b00011111,
- 0 b01111010, 0 b00000001, 0 b11111101, 0 b11101010, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b01000111,
- 0 b11011111, 0 b00001100, 0 b00011111, 0 b01111100, 0 b11110100,
- 0 b01111101, 0 b11110100, 0 b01100001,
- 0 b11110111, 0 b10111000, 0 b10000111, 0 b11011111, 0 b11100010,
- 0 b01011100, 0 b00000000, 0 b00000000,
- 0 b00000000
-#endif
-};
-
-#if 0 //
-const unsigned int num_bits_id_setup = 330;
-const unsigned char id_setup_v[] = {
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01110000, 0 b00000001,
- 0 b01111101, 0 b11101110, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b00000111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b11111101, 0 b11101010, 0 b00000001, 0 b11110111, 0 b10100000,
- 0 b00011111, 0 b10011111, 0 b01110000,
- 0 b00011111, 0 b01111100, 0 b10011000, 0 b01111101, 0 b11110100,
- 0 b10000001, 0 b11100111, 0 b11010000,
- 0 b00000111, 0 b11011110, 0 b00000000, 0 b11011111, 0 b01111100,
- 0 b00000000, 0 b01111101, 0 b11111110,
- 0 b00100101, 0 b11000000
-};
-#endif
-#ifdef ID_SETUP_2
-const unsigned int num_bits_id_setup_2 = 418; //PTJ: id_setup_2 with TSYNC Disable (TSYNC enabled before with SendVector(tsync_enable....)
-const unsigned char id_setup_2[] = {
-#ifdef HEX_DEFINE
- 0xde, 0xe2, 0x1f, 0x7f, 0x02, 0x7d, 0xc4, 0x09,
- 0xf7, 0x00, 0x1f, 0x9f, 0x07, 0x5e, 0x7c, 0x81,
- 0xf9, 0xf4, 0x01, 0xf7, 0xf0, 0x07, 0xdc, 0x40,
- 0x1f, 0x70, 0x01, 0xfd, 0xee, 0x01, 0xf7, 0xa0,
- 0x1f, 0xde, 0xa0, 0x1f, 0x7b, 0x00, 0x7d, 0xe0,
- 0x0d, 0xf7, 0xc0, 0x07, 0xdf, 0x28, 0x1f, 0x7d,
- 0x18, 0x7d, 0xfe, 0x25, 0xc0
-#else
- 0 b11011110, 0 b11100010, 0 b00011111, 0 b01111111, 0 b00000010,
- 0 b01111101, 0 b11000100, 0 b00001001,
- 0 b11110111, 0 b00000000, 0 b00011111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b11111001, 0 b11110100, 0 b00000001, 0 b11110111, 0 b11110000,
- 0 b00000111, 0 b11011100, 0 b01000000,
- 0 b00011111, 0 b01110000, 0 b00000001, 0 b11111101, 0 b11101110,
- 0 b00000001, 0 b11110111, 0 b10100000,
- 0 b00011111, 0 b11011110, 0 b10100000, 0 b00011111, 0 b01111011,
- 0 b00000000, 0 b01111101, 0 b11100000,
- 0 b00001101, 0 b11110111, 0 b11000000, 0 b00000111, 0 b11011111,
- 0 b00101000, 0 b00011111, 0 b01111101,
- 0 b00011000, 0 b01111101, 0 b11111110, 0 b00100101, 0 b11000000
-#endif
-};
-#endif
-
-const unsigned int num_bits_erase_all = 308;
-const unsigned char erase_all_v[] = {
-#ifdef HEX_DEFINE
- 0x9F, 0x82, 0xBE, 0x7F, 0x2B, 0x7D, 0xEE, 0x01,
- 0xF7, 0xB0, 0x07, 0x9F, 0x07, 0x5E, 0x7C, 0x81,
- 0xFD, 0xEA, 0x01, 0xF7, 0xA0, 0x1F, 0x9F, 0x70,
- 0x1F, 0x7C, 0x98, 0x7D, 0xF4, 0x81, 0xF7, 0x80,
- 0x2F, 0xDF, 0x00, 0x1F, 0x7F, 0x89, 0x70
-#else
- 0 b10011111, 0 b10000010, 0 b10111110, 0 b01111111, 0 b00101011,
- 0 b01111101, 0 b11101110, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b00000111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b11111101, 0 b11101010, 0 b00000001, 0 b11110111, 0 b10100000,
- 0 b00011111, 0 b10011111, 0 b01110000,
- 0 b00011111, 0 b01111100, 0 b10011000, 0 b01111101, 0 b11110100,
- 0 b10000001, 0 b11110111, 0 b10000000,
- 0 b00101111, 0 b11011111, 0 b00000000, 0 b00011111, 0 b01111111,
- 0 b10001001, 0 b01110000
-#endif
-};
-
-const unsigned char read_id_v[] = {
-#ifdef HEX_DEFINE
- 0xBF, 0x00, 0xDF, 0x90, 0x00, 0xFE, 0x60, 0xFF, 0x00
-#else
- 0 b10111111, 0 b00000000, 0 b11011111, 0 b10010000, 0 b00000000,
- 0 b11111110, 0 b0110000, 0 b11111111, 0 b00000000
-#endif
-};
-
-const unsigned char Switch_Bank1[] = //PTJ: use this to switch between register banks
-{
-#ifdef HEX_DEFINE
- 0xde, 0xe2, 0x1c
-#else
- 0 b11011110, 0 b11100010, 0 b00011100
-#endif
-};
-
-const unsigned char Switch_Bank0[] = //PTJ: use this to switch between register banks
-{
-#ifdef HEX_DEFINE
- 0xde, 0xe0, 0x1c
-#else
- 0 b11011110, 0 b11100000, 0 b00011100
-#endif
-};
-
-const unsigned char read_IMOtrim[] = //PTJ: read the 1,E8h register after id__setup_1 to see if the cal data was loaded properly.
-{
-#ifdef HEX_DEFINE
- 0xfd, 0x00, 0x10
-#else
- 0 b11111101, 0 b00000000, 0 b00010000
-#endif
-};
-
-const unsigned char read_SPCtrim[] = //PTJ: read the 1,E7h register after id__setup_1 to see if the cal data was loaded properly.
-{
-#ifdef HEX_DEFINE
- 0xfc, 0xe0, 0x10
-#else
- 0 b11111100, 0 b11100000, 0 b00010000
-#endif
-};
-
-const unsigned char read_VBGfinetrim[] = //PTJ: read the 1,D7h register after id__setup_1 to see if the cal data was loaded properly.
-{
-#ifdef HEX_DEFINE
- 0xfa, 0xe0, 0x08
-#else
- 0 b11111010, 0 b11100000, 0 b0001000
-#endif
-};
-
-const unsigned char read_reg_end = 0x80; //PTJ: this is the final '1' after a MR command
-
-const unsigned char write_byte_start = 0x90; //PTJ: this is set to SRAM 0x80
-const unsigned char write_byte_end = 0xE0;
-
-const unsigned char set_block_number[] = { 0x9F, 0x40, 0xE0 };
-
-const unsigned char set_block_number_end = 0xE0;
-#ifdef MULTI_BANK
-const unsigned char set_bank_number[] = { 0xDE, 0xE2, 0x1F, 0x7D, 0x00 };
-const unsigned char set_bank_number_end[] = { 0xFB, 0xDC, 0x03, 0x80 };
-#endif
-
-// const unsigned char num_bits_wait_and_poll_end = 40; //PTJ 308: commented out
-const unsigned char num_bits_wait_and_poll_end = 30; //PTJ 308: added to match spec
-const unsigned char wait_and_poll_end[] = {
-// 0x00, 0x00, 0x00, 0x00, 0x00 //PTJ 308: commented out
- 0x00, 0x00, 0x00, 0x00 //PTJ 308: added to match spec
-}; // forty '0's per the spec
-
-const unsigned char read_checksum_v[] = {
-#ifdef HEX_DEFINE
- 0xBF, 0x20, 0xDF, 0x80, 0x80
-#else
- 0 b10111111, 0 b00100000, 0 b11011111, 0 b10000000, 0 b10000000
-#endif
-};
-
-const unsigned char read_byte_v[] = {
-#ifdef HEX_DEFINE
- 0xB0, 0x80
-#else
- 0 b10110000, 0 b10000000
-#endif
-};
-
-const unsigned int num_bits_verify_setup = 264;
-const unsigned char verify_setup_v[] = {
-#ifdef HEX_DEFINE
- 0xDE, 0xE0, 0x1F, 0x7B, 0x00, 0x79, 0xF0, 0x75,
- 0xE7, 0xC8, 0x1F, 0xDE, 0xA0, 0x1F, 0x7A, 0x01,
- 0xF9, 0xF7, 0x01, 0xF7, 0xC9, 0x87, 0xDF, 0x48,
- 0x1F, 0x78, 0x00, 0xFD, 0xF0, 0x01, 0xF7, 0xF8,
- 0x97
-#else
- 0 b11011110, 0 b11100000, 0 b00011111, 0 b01111011, 0 b00000000,
- 0 b01111001, 0 b11110000, 0 b01110101,
- 0 b11100111, 0 b11001000, 0 b00011111, 0 b11011110, 0 b10100000,
- 0 b00011111, 0 b01111010, 0 b00000001,
- 0 b11111001, 0 b11110111, 0 b00000001, 0 b11110111, 0 b11001001,
- 0 b10000111, 0 b11011111, 0 b01001000,
- 0 b00011111, 0 b01111000, 0 b00000000, 0 b11111101, 0 b11110000,
- 0 b00000001, 0 b11110111, 0 b11111000,
- 0 b10010111
-#endif
-};
-
-const unsigned int num_bits_security = 308;
-const unsigned char security_v[] = {
-#ifdef HEX_DEFINE
- 0x9F, 0x8A, 0x9E, 0x7F, 0x2B, 0x7D, 0xEE, 0x01,
- 0xF7, 0xB0, 0x07, 0x9F, 0x07, 0x5E, 0x7C, 0x81,
- 0xFD, 0xEA, 0x01, 0xF7, 0xA0, 0x1F, 0x9F, 0x70,
- 0x1F, 0x7C, 0x98, 0x7D, 0xF4, 0x81, 0xF7, 0x80,
- 0x27, 0xDF, 0x00, 0x1F, 0x7F, 0x89, 0x70
-#else
- 0 b10011111, 0 b10001010, 0 b10011110, 0 b01111111, 0 b00101011,
- 0 b01111101, 0 b11101110, 0 b00000001,
- 0 b11110111, 0 b10110000, 0 b00000111, 0 b10011111, 0 b00000111,
- 0 b01011110, 0 b01111100, 0 b10000001,
- 0 b11111101, 0 b11101010, 0 b00000001, 0 b11110111, 0 b10100000,
- 0 b00011111, 0 b10011111, 0 b01110000,
- 0 b00011111, 0 b01111100, 0 b10011000, 0 b01111101, 0 b11110100,
- 0 b10000001, 0 b11110111, 0 b10000000,
- 0 b00100111, 0 b11011111, 0 b00000000, 0 b00011111, 0 b01111111,
- 0 b10001001, 0 b01110000
-#endif
-};
-
-#endif //(INC_ISSP_VECTORS)
-#endif //(PROJECT_REV_)
-//end of file ISSP_Vectors.h