remove writable attrs that are unreachable anyway
authorEugene Crosser <crosser@average.org>
Sun, 24 Jan 2016 13:28:16 +0000 (16:28 +0300)
committerEugene Crosser <crosser@average.org>
Sun, 24 Jan 2016 13:28:16 +0000 (16:28 +0300)
msp430/Pulsecounter-Prog.c
msp430/Pulsecounter.ems

index ced5632fa253abca6f0cf3b09e1e998b960bbc87..11c704b70f34c05eca71ac6ade732c7d2a8a7e4e 100644 (file)
@@ -6,7 +6,6 @@ static void tickHandler(void);
 static int32_t cold = 0;
 static int32_t hot  = 0;
 static bool connected = false;
-static bool updatable = false;
 
 void main() {
     Hal_init();
@@ -22,7 +21,6 @@ static void gpioHandler(uint8_t id) {
     switch (id) {
     case 0:
         /* Pulsecounter_accept(true); */
-        updatable = true;
         if (connected) {
             Pulsecounter_coldTick_indicate();
             Hal_delay(100);
@@ -78,7 +76,6 @@ static void tickHandler(void) {
         Hal_delay(50);
         Hal_greenLedOff();
     }
-    updatable = false;
     /* Pulsecounter_accept(false); */
 }
 
@@ -98,7 +95,6 @@ void Pulsecounter_connectHandler(void) {
 
 void Pulsecounter_disconnectHandler(void) {
     connected = false;
-    updatable = false;
     Hal_greenLedOn();
     Hal_delay(100);
     Hal_greenLedOff();
@@ -116,27 +112,3 @@ void Pulsecounter_coldTick_fetch(Pulsecounter_coldTick_t* const output) {
 void Pulsecounter_hotTick_fetch(Pulsecounter_hotTick_t* const output) {
     *output = hot;
 }
-
-void Pulsecounter_coldSet_store(Pulsecounter_coldSet_t* const input) {
-    Hal_greenLedOn();
-    Hal_delay(100);
-    Hal_greenLedOff();
-    Hal_delay(100);
-    Hal_greenLedOn();
-    Hal_delay(100);
-    Hal_greenLedOff();
-    // if (updatable)
-        cold = *input;
-}
-
-void Pulsecounter_hotSet_store(Pulsecounter_hotSet_t* const input) {
-    Hal_redLedOn();
-    Hal_delay(100);
-    Hal_redLedOff();
-    Hal_delay(100);
-    Hal_redLedOn();
-    Hal_delay(100);
-    Hal_redLedOff();
-    // if (updatable)
-        hot = *input;
-}
index 2eaffad7058031fefd9d4f53c9511ff899a30134..925f2ada065202bdf1a7ea42dad194c1dbedae10 100644 (file)
@@ -11,12 +11,4 @@ schema Pulsecounter {
         indicator
     };
 
-    int32 coldSet {
-        writeonly
-    };
-
-    int32 hotSet {
-        writeonly
-    };
-
 };