X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Ftests%2Fbeacon_tsop%2Fboard2006.h;h=841ab1542e55ac922b5f87ca88d5282aa119d12d;hp=2e926bb265e61821135c15ec5e5dacdc718fd64f;hb=4e68c9b6f30c864b671b5c51affe61d7c9205465;hpb=1714f4ee916fca95ce24120ea6e698237913f947 diff --git a/projects/microb2010/tests/beacon_tsop/board2006.h b/projects/microb2010/tests/beacon_tsop/board2006.h index 2e926bb..841ab15 100644 --- a/projects/microb2010/tests/beacon_tsop/board2006.h +++ b/projects/microb2010/tests/beacon_tsop/board2006.h @@ -69,25 +69,25 @@ #define SIG_TSOP_STA SIG_INTERRUPT7 #define TSOP_STA_READ() (!(PINE & 0x80)) -#define TSOP_FREQ_455_MHZ 0.455 +#define TSOP_FREQ_455_KHZ 0.455 #define N_PERIODS_455 10. -#define TSOP_FREQ_38_MHZ 0.038 +#define TSOP_FREQ_38_KHZ 0.038 #define N_PERIODS_38 15. -#define TSOP_FREQ_30_MHZ 0.030 +#define TSOP_FREQ_30_KHZ 0.030 #define N_PERIODS_30 15. -#define TSOP_FREQ_56_MHZ 0.056 +#define TSOP_FREQ_56_KHZ 0.056 #define N_PERIODS_56 15. /* TSOP STATIC */ -#define TSOP_STA_PERIOD_US (1./TSOP_FREQ_38_MHZ) +#define TSOP_STA_PERIOD_US (1./TSOP_FREQ_38_KHZ) #define TSOP_STA_N_PERIODS (N_PERIODS_38) #define TSOP_STA_TIME_SHORT_US (1.5 * TSOP_STA_N_PERIODS * TSOP_STA_PERIOD_US) #define TSOP_STA_TIME_LONG_US (2.5 * TSOP_STA_N_PERIODS * TSOP_STA_PERIOD_US) -#define TSOP_STA_TIME_SHORT ((uint16_t)(TSOP_STA_TIME_SHORT_US*2)) -#define TSOP_STA_TIME_LONG ((uint16_t)(TSOP_STA_TIME_LONG_US*2)) +#define TSOP_STA_TIME_SHORT ((uint16_t)(TSOP_STA_TIME_SHORT_US/4)) +#define TSOP_STA_TIME_LONG ((uint16_t)(TSOP_STA_TIME_LONG_US/4)) #define TSOP_STA_FRAME_LEN 16 #define TSOP_STA_FRAME_MASK ((1UL << TSOP_STA_FRAME_LEN) - 1) @@ -102,14 +102,14 @@ /* TSOP OPP */ -#define TSOP_OPP_PERIOD_US (1./TSOP_FREQ_455_MHZ) +#define TSOP_OPP_PERIOD_US (1./TSOP_FREQ_455_KHZ) #define TSOP_OPP_N_PERIODS (N_PERIODS_455) #define TSOP_OPP_TIME_SHORT_US (1.5 * TSOP_OPP_N_PERIODS * TSOP_OPP_PERIOD_US) #define TSOP_OPP_TIME_LONG_US (2.5 * TSOP_OPP_N_PERIODS * TSOP_OPP_PERIOD_US) -#define TSOP_OPP_TIME_SHORT ((uint16_t)(TSOP_OPP_TIME_SHORT_US*2)) -#define TSOP_OPP_TIME_LONG ((uint16_t)(TSOP_OPP_TIME_LONG_US*2)) +#define TSOP_OPP_TIME_SHORT ((uint16_t)(TSOP_OPP_TIME_SHORT_US/4)) +#define TSOP_OPP_TIME_LONG ((uint16_t)(TSOP_OPP_TIME_LONG_US/4)) #define TSOP_OPP_FRAME_LEN 16 #define TSOP_OPP_FRAME_MASK ((1UL << TSOP_OPP_FRAME_LEN) - 1)