IAP class library for LPC1768, LPC11U24, LPC1114, LPC812 and LPC824

Dependents:   MakerBotServer SystemManagement IAP_testing Arch_Pro_TCPSocket ... more

Files at this revision

API Documentation at this revision

Comitter:
sam_grove
Date:
Mon Sep 29 23:03:30 2014 +0000
Parent:
5:7484398d50ea
Child:
7:c8bf974ecb33
Commit message:
Update read_serial to return an address to the 128bit serial rather than just 32 bits.

Changed in this revision

IAP.cpp Show annotated file Show diff for this revision Revisions of this file
IAP.h Show annotated file Show diff for this revision Revisions of this file
--- a/IAP.cpp	Tue Oct 22 17:23:53 2013 +0000
+++ b/IAP.cpp	Mon Sep 29 23:03:30 2014 +0000
@@ -101,13 +101,13 @@
  *  @see       read_ID()
  */
 
-int IAP::read_serial( void ) {
+int *IAP::read_serial( void ) {
     IAP_command[ 0 ]    = IAPCommand_Read_device_serial_number;
     
     iap_entry( IAP_command, IAP_result );
     
     //  return ( (int)IAP_result[ 0 ] );
-    return ( (int)IAP_result[ 1 ] );    //  to return the number itself (this command always returns CMD_SUCCESS)
+    return ( (int *)&IAP_result[ 1 ] );    //  to return the number itself (this command always returns CMD_SUCCESS)
 }
 
 
--- a/IAP.h	Tue Oct 22 17:23:53 2013 +0000
+++ b/IAP.h	Mon Sep 29 23:03:30 2014 +0000
@@ -258,7 +258,7 @@
     IAP() : iap_entry( reinterpret_cast<IAP_call>(IAP_LOCATION) ), cclk_kHz( SystemCoreClock / 1000 ) {}
     int reinvoke_isp( void );
     int read_ID( void );
-    int read_serial( void );
+    int *read_serial( void );
     int blank_check( int start, int end );
     int erase( int start, int end );
     int prepare( int start, int end );