Main

Files at this revision

API Documentation at this revision

Comitter:
chinetion
Date:
Tue Dec 08 18:33:16 2015 +0000
Parent:
1:0b8836a7cd96
Commit message:
last

Changed in this revision

user.h Show annotated file Show diff for this revision Revisions of this file
diff -r 0b8836a7cd96 -r 8441bd03d9bc user.h
--- a/user.h	Fri Dec 04 09:32:15 2015 +0000
+++ b/user.h	Tue Dec 08 18:33:16 2015 +0000
@@ -11,6 +11,8 @@
         char getpos();
         void savenum(char);
         char getnum();
+        void saveprice(int32_t);
+        int32_t getprice();
     private:  
         EEPROM rom;
 };
@@ -38,6 +40,14 @@
     rom.read(1005,pos);wait_ms(10); 
     return (char)pos;
 }
+void USER::saveprice(int32_t price){
+    rom.write(1010,price);wait_ms(10); 
+}
+int32_t USER::getprice(){
+    int32_t price;
+    rom.read(1010,price);wait_ms(10); 
+    return price;
+}
 void USER::rfid(int8_t id,char *rfid){
     uint32_t  _id = id/2*((id-1)*96);
     rom.read(_id,rfid,16);