- return !!(PINB & RADIO_BIT);
-#endif
-}
-
-static void set_output(int16_t i)
-{
- int8_t detected = 0;
-
- if (cpt_filter > 250)
- detected = 1;
-
-#ifdef HOST_VERSION
- printf("%d fil_fond=%d fil_harm1=%d fil_other=%d\n",
- i, fil_fond, fil_harm1, fil_other);
- printf("%d pow_fond=%d pow_harm1=%d pow_other=%d cpt_filter=%d detected=%d\n",
- i, pow_fond, pow_harm1, pow_other, cpt_filter, detected);
-#else
- /* when we receive, output a square signal at 625 hz */
- if ((detected == 1) && (i & 4))
- PORTB |= (1 << BUZ_BIT);
- else
- PORTB &= ~(1 << BUZ_BIT);