From 58322505930b372bf2fa1b34317f745e7e09c5b2 Mon Sep 17 00:00:00 2001 From: P L Sai Krishna Date: Wed, 8 Oct 2014 15:16:12 +0530 Subject: [PATCH] iicps: modified the eeprom interrupt and polled examples. This patch removes the multiple initialisations for readbuffer in eeprom interrupt and polled examples. Signed-off-by: P L Sai Krishna --- .../drivers/iicps/examples/xiicps_eeprom_intr_example.c | 7 +------ .../drivers/iicps/examples/xiicps_eeprom_polled_example.c | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_intr_example.c b/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_intr_example.c index 132f43b0..18e0eb4a 100755 --- a/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_intr_example.c +++ b/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_intr_example.c @@ -63,6 +63,7 @@ * the IIC EEPROM. * Updated to use usleep instead of delay loop * 1.04a hk 09/03/13 Removed GPIO code to pull MUX out of reset - CR#722425. +* 2.3 sk 10/07/14 Removed multiple initializations for read buffer. * * * @@ -246,7 +247,6 @@ int IicPsEepromIntrExample(void) } else { WriteBuffer[0] = (u8) (Address >> 8); WriteBuffer[1] = (u8) (Address); - ReadBuffer[Index] = 0; } for (Index = 0; Index < PAGE_SIZE; Index++) { @@ -277,8 +277,6 @@ int IicPsEepromIntrExample(void) if (ReadBuffer[Index] != WriteBuffer[Index + sizeof(Address)]) { return XST_FAILURE; } - - ReadBuffer[Index] = 0; } /* @@ -289,7 +287,6 @@ int IicPsEepromIntrExample(void) } else { WriteBuffer[0] = (u8) (Address >> 8); WriteBuffer[1] = (u8) (Address); - ReadBuffer[Index] = 0; } for (Index = 0; Index < PAGE_SIZE; Index++) { @@ -320,8 +317,6 @@ int IicPsEepromIntrExample(void) if (ReadBuffer[Index] != WriteBuffer[Index + sizeof(Address)]) { return XST_FAILURE; } - - ReadBuffer[Index] = 0; } return XST_SUCCESS; diff --git a/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_polled_example.c b/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_polled_example.c index d97d49d4..0e38b9ae 100755 --- a/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_polled_example.c +++ b/XilinxProcessorIPLib/drivers/iicps/examples/xiicps_eeprom_polled_example.c @@ -63,6 +63,7 @@ * the IIC EEPROM. * Updated to use usleep instead of delay loop * 1.04a hk 09/03/13 Removed GPIO code to pull MUX out of reset - CR#722425. +* 2.3 sk 10/07/14 Removed multiple initializations for read buffer. * * ******************************************************************************/ @@ -217,7 +218,6 @@ int IicPsEepromPolledExample(void) } else { WriteBuffer[0] = (u8) (Address >> 8); WriteBuffer[1] = (u8) (Address); - ReadBuffer[Index] = 0; } for (Index = 0; Index < PAGE_SIZE; Index++) { @@ -248,8 +248,6 @@ int IicPsEepromPolledExample(void) if (ReadBuffer[Index] != WriteBuffer[Index + sizeof(Address)]) { return XST_FAILURE; } - - ReadBuffer[Index] = 0; } /* @@ -260,7 +258,6 @@ int IicPsEepromPolledExample(void) } else { WriteBuffer[0] = (u8) (Address >> 8); WriteBuffer[1] = (u8) (Address); - ReadBuffer[Index] = 0; } for (Index = 0; Index < PAGE_SIZE; Index++) { @@ -291,8 +288,6 @@ int IicPsEepromPolledExample(void) if (ReadBuffer[Index] != WriteBuffer[Index + sizeof(Address)]) { return XST_FAILURE; } - - ReadBuffer[Index] = 0; } return XST_SUCCESS;