WISP ERT (Client)
1.0.0
The WISP Extended Runtime (WISP side)
|
Global definitions, typedefs, variables. More...
Go to the source code of this file.
Data Structures | |
struct | RFIDstruct |
struct | RWstruct |
Macros | |
#define | FOREVER (1) |
#define | NEVER (0) |
#define | TRUE (1) |
#define | FALSE (0) |
#define | HIGH (1) |
#define | LOW (0) |
#define | FAIL (0) |
#define | SUCCESS (1) |
#define | EPC_WORDS (6) /* length of EPC value in words, 0 <= n <= 31 */ |
#define | CMDBUFF_SIZE (30) /* ? */ |
#define | DATABUFF_SIZE (2+(EPC_WORDS<<1)+2) /* first2/last2 are reserved. put data into B2..B13 */ |
#define | RFIDBUFF_SIZE (1+16+2+2+50) /* longest command handled is the read command for 8 wds*/ |
#define | USRBANK_SIZE (32) /* ? */ |
#define | RFID_SEED (0x1234) |
#define | CMD_PARSE_AS_QUERY_REP (0x00) /** @todo describe these myst vals! */ |
#define | CMD_PARSE_AS_OVF (0xFF) |
#define | ENOUGH_BITS_TO_FORCE_EXECUTION (200) |
#define | RESET_BITS_VAL (-2) /* this is the value which will reset the TA1_SM if found in 'bits (R5)' by rfid_sm */ |
#define | RTCAL_MIN (200) |
#define | RTCAL_MAX (300) |
#define | TRCAL_MIN (220) |
#define | TRCAL_MAX (900) |
#define | TX_TIMING_QUERY (24)/*53.5-60us (depends on which Q value is loaded). */ |
#define | TX_TIMING_ACK (20)/*60.0us*/ |
#define | TX_TIMING_QR (52) |
#define | TX_TIMING_QA (48) |
#define | TX_TIMING_REQRN (33) |
#define | TX_TIMING_READ (29) |
#define | TX_TIMING_WRITE (31) |
#define | QUERY_TIMEOUT_PERIOD (65535) |
#define | NUM_SEL_BITS (48) /* only need to parse through mask: (4+3+3+2+8+8+16 = 44 -> round to 48) */ |
#define | NUM_QUERY_BITS (22) |
#define | NUM_ACK_BITS (18) |
#define | NUM_REQRN_BITS (40) |
#define | NUM_WRITE_BITS (66) |
#define | EPC_LENGTH (EPC_WORDS) /* 10h..14h EPC Length in Words. (6 is 96bit std) */ |
#define | UMI (0x01) /* 15h User-Memory Indicator. '1' means the tag has user memory available. */ |
#define | XI (0x00) /* 16h XPC_W1 indicator. '0' means the tag does not support this feature. */ |
#define | NSI (0x00) /* 17h..1Fh Numbering System Identifier. */ |
#define | TREXT_ON (1) /* Tag should use TRext format for backscatter */ |
#define | TREXT_OFF (0) /* Tag shouldn't use TRext format for backscatter */ |
#define | WRITE_DATA_BLINK_LED (0x00) |
#define | WRITE_DATA_NEW_ID (0x01) |
#define | bits _get_R5_register() |
#define | dest _get_R4_register() |
#define | setBits(x) _set_R5_register(x) |
#define | setDest(x) _set_R4_register(x) |
#define | BITSET(port, pin) port |= (pin) |
#define | BITCLR(port, pin) port &= ~(pin) |
#define | BITTOG(port, pin) port ^= (pin) |
#define | STORED_PC ( ((EPC_LENGTH&0x001F)<<11) | ((UMI&0x0001)<<10) | ((XI&0x0001)<<9) | (NSI&0x01FF)<<01 ) |
#define | STORED_PC1 ( (STORED_PC&0xFF00)>>8 ) |
#define | STORED_PC0 ( (STORED_PC&0x00FF)>>0 ) |
Typedefs | |
typedef uint8_t | BOOL |
Functions | |
void | WISP_doRFID (void) |
void | TxFM0 (volatile uint8_t *data, uint8_t numBytes, uint8_t numBits, uint8_t TRext) |
void | RX_ISR (void) |
void | Timer0A0_ISR (void) |
void | Timer0A1_ISR (void) |
void | Timer1A0_ISR (void) |
void | handleQuery (void) |
void | handleAck (void) |
void | handleQR (void) |
void | handleQA (void) |
void | handleReq_RN (void) |
void | handleRead (void) |
void | handleWrite (void) |
void | handleBlockWrite (void) |
Variables | |
RFIDstruct | rfid |
RWstruct | RWData |
uint8_t | cmd [CMDBUFF_SIZE] |
uint8_t | dataBuf [DATABUFF_SIZE] |
uint8_t | rfidBuf [RFIDBUFF_SIZE] |
uint8_t | usrBank [USRBANK_SIZE] |
uint16_t | wisp_ID |
volatile uint8_t | isDoingLowPwrSleep |
Global definitions, typedefs, variables.
#define BITCLR | ( | port, | |
pin | |||
) | port &= ~(pin) |
#define bits _get_R5_register() |
#define BITSET | ( | port, | |
pin | |||
) | port |= (pin) |
#define BITTOG | ( | port, | |
pin | |||
) | port ^= (pin) |
#define CMD_PARSE_AS_OVF (0xFF) |
#define CMD_PARSE_AS_QUERY_REP (0x00) /** @todo describe these myst vals! */ |
#define CMDBUFF_SIZE (30) /* ? */ |
#define DATABUFF_SIZE (2+(EPC_WORDS<<1)+2) /* first2/last2 are reserved. put data into B2..B13 */ |
#define dest _get_R4_register() |
#define ENOUGH_BITS_TO_FORCE_EXECUTION (200) |
#define EPC_LENGTH (EPC_WORDS) /* 10h..14h EPC Length in Words. (6 is 96bit std) */ |
#define EPC_WORDS (6) /* length of EPC value in words, 0 <= n <= 31 */ |
#define FAIL (0) |
#define FALSE (0) |
#define FOREVER (1) |
#define HIGH (1) |
#define LOW (0) |
#define NEVER (0) |
#define NSI (0x00) /* 17h..1Fh Numbering System Identifier. */ |
#define NUM_ACK_BITS (18) |
#define NUM_QUERY_BITS (22) |
#define NUM_REQRN_BITS (40) |
#define NUM_SEL_BITS (48) /* only need to parse through mask: (4+3+3+2+8+8+16 = 44 -> round to 48) */ |
#define NUM_WRITE_BITS (66) |
#define QUERY_TIMEOUT_PERIOD (65535) |
#define RESET_BITS_VAL (-2) /* this is the value which will reset the TA1_SM if found in 'bits (R5)' by rfid_sm */ |
#define RFID_SEED (0x1234) |
#define RFIDBUFF_SIZE (1+16+2+2+50) /* longest command handled is the read command for 8 wds*/ |
#define RTCAL_MAX (300) |
#define RTCAL_MIN (200) |
#define setBits | ( | x | ) | _set_R5_register(x) |
#define setDest | ( | x | ) | _set_R4_register(x) |
#define STORED_PC ( ((EPC_LENGTH&0x001F)<<11) | ((UMI&0x0001)<<10) | ((XI&0x0001)<<9) | (NSI&0x01FF)<<01 ) |
#define STORED_PC0 ( (STORED_PC&0x00FF)>>0 ) |
#define STORED_PC1 ( (STORED_PC&0xFF00)>>8 ) |
#define SUCCESS (1) |
#define TRCAL_MAX (900) |
#define TRCAL_MIN (220) |
#define TREXT_OFF (0) /* Tag shouldn't use TRext format for backscatter */ |
#define TREXT_ON (1) /* Tag should use TRext format for backscatter */ |
#define TRUE (1) |
#define TX_TIMING_ACK (20)/*60.0us*/ |
#define TX_TIMING_QA (48) |
#define TX_TIMING_QR (52) |
#define TX_TIMING_QUERY (24)/*53.5-60us (depends on which Q value is loaded). */ |
#define TX_TIMING_READ (29) |
#define TX_TIMING_REQRN (33) |
#define TX_TIMING_WRITE (31) |
#define UMI (0x01) /* 15h User-Memory Indicator. '1' means the tag has user memory available. */ |
#define USRBANK_SIZE (32) /* ? */ |
#define WRITE_DATA_BLINK_LED (0x00) |
#define WRITE_DATA_NEW_ID (0x01) |
#define XI (0x00) /* 16h XPC_W1 indicator. '0' means the tag does not support this feature. */ |
typedef uint8_t BOOL |
void handleAck | ( | void | ) |
void handleBlockWrite | ( | void | ) |
void handleQA | ( | void | ) |
void handleQR | ( | void | ) |
void handleQuery | ( | void | ) |
void handleRead | ( | void | ) |
void handleReq_RN | ( | void | ) |
void handleWrite | ( | void | ) |
void RX_ISR | ( | void | ) |
void Timer0A0_ISR | ( | void | ) |
void Timer0A1_ISR | ( | void | ) |
void Timer1A0_ISR | ( | void | ) |
void TxFM0 | ( | volatile uint8_t * | data, |
uint8_t | numBytes, | ||
uint8_t | numBits, | ||
uint8_t | TRext | ||
) |
void WISP_doRFID | ( | void | ) |
uint8_t cmd[CMDBUFF_SIZE] |
uint8_t dataBuf[DATABUFF_SIZE] |
volatile uint8_t isDoingLowPwrSleep |
RFIDstruct rfid |
uint8_t rfidBuf[RFIDBUFF_SIZE] |
RWstruct RWData |
uint8_t usrBank[USRBANK_SIZE] |
uint16_t wisp_ID |