IAP class library for LPC1768, LPC11U24, LPC1114, LPC812 and LPC824
Dependents: MakerBotServer SystemManagement IAP_testing Arch_Pro_TCPSocket ... more
Diff: IAP.cpp
- Revision:
- 8:1d79b2bb1131
- Parent:
- 7:c8bf974ecb33
- Child:
- 9:26095608ac1a
diff -r c8bf974ecb33 -r 1d79b2bb1131 IAP.cpp
--- a/IAP.cpp Tue Mar 10 04:19:23 2015 +0000
+++ b/IAP.cpp Thu Aug 16 06:11:23 2018 +0000
@@ -25,6 +25,8 @@
* revision 3.0 09-Jan-2015 LPC812 and LPC824 support added
* revision 3.1 13-Jan-2015 LPC1114 support added
* revision 3.1.1 16-Jan-2015 Target MCU name changed for better compatibility across the platforms
+ * revision 3.1.2 10-Mar-2015 merged with pull requests. reinvoke_isp() added and modified read_serial() to return a pointer.
+ * revision 3.1.3 16-Aug-2018 "write_page" function added for LPC81X/LPC82X
*/
#include "mbed.h"
@@ -218,4 +220,10 @@
return ( (int)IAP_result[ 0 ] );
}
+int IAP::write_page( char *source_addr, int target_page )
+{
+ prepare( target_page / (LPC8XX_SCTR_SIZE / LPC8XX_PAGE_SIZE), target_page / (LPC8XX_SCTR_SIZE / LPC8XX_PAGE_SIZE) );
+ return ( write( source_addr, (char *)(target_page * LPC8XX_PAGE_SIZE), LPC8XX_PAGE_SIZE ) );
+}
+
#endif
IAP (In-Application Programming)