CVS: libraries/include/mspgcc flash.h,1.1,1.2

Chris Liechti <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/libraries/include/mspgcc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5975/libraries/include/mspgcc

Modified Files:
	flash.h 
Log Message:
fix newlines
add missing prototype

Index: flash.h
===================================================================
RCS file: /cvsroot/mspgcc/libraries/include/mspgcc/flash.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- flash.h	22 Aug 2005 11:24:00 -0000	1.1
+++ flash.h	23 Aug 2005 18:04:34 -0000	1.2
@@ -37,4 +37,28 @@
  */
 void flash_write(void *dst, const void *src, unsigned int size);
 
+/**
+ * Copy a memory block to the flash. Like memcpy but with Flash controller
+ * enabled. This function works with 16 Bit moves, the source and destiantion
+ * pointers must be even!
+ *
+ * This function modifies FCTL1 and FCTL3.
+ *
+ * @note
+ *      FCTL2 has to be set up by the user. It is not altered by this
+ *      function. It contains the clock settings.
+ *
+ * Examples:
+ *    int intvar = 1234;
+ *    flash_write_word((void *)0x1000, &intvar, sizeof(int));
+ *
+ *    struct { ... } somestructure;
+ *    flash_write_word((void *)0x1000, &somestructure, sizeof(somestructure));
+ *
+ * @param dst           [in] the memory is written here (even addresses only!)
+ * @param src           [in] the memory that is read (even addresses only!)
+ * @param size          [in] number of bytes to copy (even sizes only!)
+ */
+void flash_write_word(void *dst, const void *src, unsigned int size);
+
 #endif //MSPGCC_FLASH_H



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.