Dependencies:   LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI

Revision:
35:bda112796505
Child:
39:b069cf6be013
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Tick/Tick.cpp	Thu May 16 18:03:02 2019 +0000
@@ -0,0 +1,33 @@
+#include "Tick.h"
+
+int GLOBAL_VALEUR_TICK; //Valeur facile d'accès à incrémanter grâce au ticker
+Ticker timer; //
+
+void T_incermment(){
+    GLOBAL_VALEUR_TICK++;
+}
+
+int T_checkValue(){
+    if(GLOBAL_VALEUR_TICK){
+        GLOBAL_VALEUR_TICK--;
+        return 1;
+    }else{
+        return 0;
+    }
+}
+
+int* T_initialise(int tempsS){
+    int* ret=&GLOBAL_VALEUR_TICK;
+    *ret=0;
+    timer.attach(&T_incermment,tempsS);
+    return ret;
+}
+
+void T_test(){
+    GLOBAL_VALEUR_TICK=0;
+    timer.attach(&T_incermment,2);
+    while(1){
+        BS_displayChiffre100Clean(35,25,GLOBAL_VALEUR_TICK,5,LCD_COLOR_RED,LCD_COLOR_WHITE);
+        wait(0.1);
+    }
+}
\ No newline at end of file