I2C boot loader with Blinky code Should test it with Freescale boards fingers crossed should work

Dependencies:   mbed

Fork of I2Cboot_betav1_02 by Siva ram

Revision:
8:771e674458bd
Parent:
7:00b148a7e11d
Child:
9:91fb9341d36c
--- a/main.cpp	Sun May 24 23:02:35 2015 +0000
+++ b/main.cpp	Mon May 25 13:36:12 2015 +0000
@@ -46,18 +46,18 @@
 //! This variable will be set to the starting address of the binary will be
 //! programmed into to device.
 //
-//*****************************************************************************
+
 static uint32_t g_ui32DownloadAddress;
 
-//*****************************************************************************
+
 //
 //! This variable will be set to the start execution address for the binary
 //! that is downloaded.
 //
-//*****************************************************************************
+
 static uint32_t g_ui32StartAddress;
 
-//*****************************************************************************
+
 
 
 uint32_t g_ui32DataSize;
@@ -148,7 +148,7 @@
     return(I2CSendData(&ui8Ack, 1));
 }
 
-//****************************************************************************
+
 //
 //! NakPacket() sends a No Acknowledge packet.
 //!
@@ -158,7 +158,7 @@
 //! \return The function returns zero to indicated success while any non-zero
 //! value indicates a failure.
 //
-//****************************************************************************
+
 int32_t
 NakPacket(void)
 {
@@ -168,7 +168,7 @@
     return(I2CSendData(&ui8Nak, 1));
 }
 
-//*****************************************************************************
+
 //
 //! GetPacket() receives a data packet.
 //!
@@ -181,7 +181,7 @@
 //! \returns The function returns zero to indicated success while any non-zero
 //! value indicates a failure.
 //
-//*****************************************************************************
+
 int32_t
 GetPacket(uint8_t *pui8Data, uint8_t *pui8Size)
 {
@@ -224,7 +224,7 @@
     return(AckPacket());
 }
 
-//*****************************************************************************
+
 //
 //! CheckSum() Calculates an 8 bit checksum
 //!
@@ -236,7 +236,7 @@
 //!
 //! \return The function returns the calculated checksum.
 //
-//*****************************************************************************
+
 uint8_t
 CheckSum(uint8_t *pui8Data, uint8_t ui8Size)
 {
@@ -252,7 +252,7 @@
     return(ui8CheckSum);
 }
 
-//*****************************************************************************
+
 //
 //! SendPacket() sends a data packet.
 //!
@@ -266,7 +266,7 @@
 //! \returns The function returns zero to indicated success while any non-zero
 //!     value indicates a failure.
 //
-//*****************************************************************************
+
 int32_t
 SendPacket(uint8_t *pui8Data, uint8_t ui8Size, bool bAck)
 {
@@ -487,5 +487,8 @@
         pc.printf("\b\b\b\b\b\b\b\b");
     } while (ui32TransferLength);
     pc.printf("00000000\n");
+    
+    g_pui8Buffer[0] = COMMAND_RESET;
+    SendPacket(g_pui8Buffer, 1, 0);
 
 }
\ No newline at end of file