first rough cut at skeleton of code for pnpservo .. altos boots and runs
[fw/altos] / src / kernel / ao_pyro.c
index c9920ab335cd681369ad8e78e893f8b1bd49b021..a0881f9e3a8262fce6ec2b925363c5fcbb75ac32 100644 (file)
@@ -75,7 +75,8 @@ uint16_t      ao_pyro_fired;
 #endif
 
 #if PYRO_DBG
-#define DBG(...)       do { printf("\t%d: ", (int) (pyro - ao_config.pyro)); printf(__VA_ARGS__); } while (0)
+int pyro_dbg;
+#define DBG(...)       do { if (pyro_dbg) printf("\t%d: ", (int) (pyro - ao_config.pyro)); printf(__VA_ARGS__); } while (0)
 #else
 #define DBG(...)
 #endif
@@ -437,7 +438,7 @@ ao_pyro_show(void)
                                if (ao_pyro_values[v].flag & AO_PYRO_8_BIT_VALUE)
                                        value = *((uint8_t *) ((char *) pyro + ao_pyro_values[v].offset));
                                else
-                                       value = *((int16_t *) ((char *) pyro + ao_pyro_values[v].offset));
+                                       value = *((int16_t *) (void *) ((char *) pyro + ao_pyro_values[v].offset));
                                printf ("%6d ", value);
                        } else {
                                printf ("       ");
@@ -516,7 +517,7 @@ ao_pyro_set(void)
                        } else {
                                if (negative)
                                        ao_cmd_lex_i = -ao_cmd_lex_i;
-                               *((int16_t *) ((char *) &pyro_tmp + ao_pyro_values[v].offset)) = ao_cmd_lex_i;
+                               *((int16_t *) (void *) ((char *) &pyro_tmp + ao_pyro_values[v].offset)) = ao_cmd_lex_i;
                        }
                }
        }