X-Git-Url: http://git.droids-corp.org/?p=aversive.git;a=blobdiff_plain;f=projects%2Fmicrob2010%2Ftests%2Fbeacon_tsop%2Fboard2010.h;h=f66faa173be878ed2a9a5d6aa37922861c6ee0d2;hp=669d5903e5b7603d65d942d5aafbca28f3c07a6a;hb=82d59983ef31ce70582b602600b4ee221f5bed03;hpb=4fb57a4dab8bd564445e824696a2dab470af8628 diff --git a/projects/microb2010/tests/beacon_tsop/board2010.h b/projects/microb2010/tests/beacon_tsop/board2010.h index 669d590..f66faa1 100644 --- a/projects/microb2010/tests/beacon_tsop/board2010.h +++ b/projects/microb2010/tests/beacon_tsop/board2010.h @@ -64,20 +64,20 @@ #define EICRx_TSOP EICRB /* EICRA is not ok, cannot do intr on any edge */ -#define INTx_TSOP_OPP INT5 -#define ISCx0_TSOP_OPP ISC50 -#define ISCx1_TSOP_OPP ISC(1 -#define SIG_TSOP_OPP SIG_INTERRUPT5 -#define TSOP_OPP_READ() (!(PINE & 0x20)) - -#define INTx_TSOP_STA INT6 -#define ISCx0_TSOP_STA ISC60 -#define ISCx1_TSOP_STA ISC61 -#define SIG_TSOP_STA SIG_INTERRUPT6 -#define TSOP_STA_READ() (!(PINE & 0x40)) +#define INTx_TSOP_OPP INT6 +#define ISCx0_TSOP_OPP ISC60 +#define ISCx1_TSOP_OPP ISC61 +#define SIG_TSOP_OPP SIG_INTERRUPT6 +#define TSOP_OPP_READ() (!(PINE & 0x40)) + +#define INTx_TSOP_STA INT5 +#define ISCx0_TSOP_STA ISC50 +#define ISCx1_TSOP_STA ISC51 +#define SIG_TSOP_STA SIG_INTERRUPT5 +#define TSOP_STA_READ() (!(PINE & 0x20)) #define TSOP_FREQ_455_MHZ 0.455 -#define N_PERIODS_455 10. +#define N_PERIODS_455 15. #define TSOP_FREQ_38_MHZ 0.038 #define N_PERIODS_38 15. #define TSOP_FREQ_30_MHZ 0.030 @@ -87,14 +87,14 @@ /* TSOP STATIC */ -#define TSOP_STA_PERIOD_US (1./TSOP_FREQ_38_MHZ) -#define TSOP_STA_N_PERIODS (N_PERIODS_38) +#define TSOP_STA_PERIOD_US (1./TSOP_FREQ_455_MHZ) +#define TSOP_STA_N_PERIODS (N_PERIODS_455) #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) @@ -115,8 +115,8 @@ #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)