Data Structures | |
| struct | BC_STRUCT |
| Barcode sample/decode context. More... | |
Files | |
| file | reader.h |
| Reader Header File. | |
Enumerations | |
| enum | { NO_DATA, CODE39_DATA, CODABAR_DATA, CODEI25_DATA, MAG1_DATA, MAG2_DATA, MAG3_DATA, PROX_DATA } |
Functions | |
| void | reader1_init (void) |
| void | reader2_init (void) |
| void | barcodeSample (struct BC_STRUCT *p, unsigned int count) |
| General purpose barcode sampling. | |
| void | magstripeSample (struct BC_STRUCT *p, unsigned char value) |
| void | wiegandSample (struct BC_STRUCT *p, unsigned char value) |
| void | barcodeOverflow (struct BC_STRUCT *p) |
| Barcode sample overflow. | |
| void | magstripeOverflow (struct BC_STRUCT *p) |
| void | wiegandOverflow (struct BC_STRUCT *p) |
| unsigned short | barcode_decode (struct BC_STRUCT *p) |
| unsigned short | Decode39 (struct BC_STRUCT *p) |
| unsigned short | DecodeCodabar (struct BC_STRUCT *p) |
| unsigned short | DecodeI25 (struct BC_STRUCT *p, unsigned char len) |
| unsigned short | wiegand_decode (struct BC_STRUCT *p) |
| unsigned short | DecodeWiegand (struct BC_STRUCT *p, struct prox_cfg_struct *w) |
Variables | |
| unsigned char | symbol |
| unsigned char | DecodeBarcodeReady0 |
| unsigned char | DecodeBarcodeReady1 |
| unsigned char | DecodeMagstripeReady0 |
| unsigned char | DecodeMagstripeReady1 |
| unsigned char | DecodeWiegandReady0 |
| unsigned char | DecodeWiegandReady1 |
| struct BC_STRUCT | Reader0 |
| struct BC_STRUCT | Reader1 |
| anonymous enum |
Definition at line 67 of file reader.h.
00067 {NO_DATA, CODE39_DATA, CODABAR_DATA, CODEI25_DATA, MAG1_DATA, MAG2_DATA, MAG3_DATA, PROX_DATA};
| unsigned short barcode_decode | ( | struct BC_STRUCT * | p | ) |
| void barcodeOverflow | ( | struct BC_STRUCT * | p | ) |
Barcode sample overflow.
| *p | points to channel context |
Definition at line 113 of file barcode_sample.c.
References BC_STRUCT::sample_ctr, BC_STRUCT::sample_ptr, and BC_STRUCT::sample_state.
00113 { 00114 00115 // Abort if less than the minimum required samples 00116 if(p->sample_ctr < MIN_BARCODE_SAMPLES){ 00117 p->sample_state = WAITING; 00118 } 00119 00120 // Store the overflow count and flag as ready 00121 else{ 00122 *p->sample_ptr++ = 0; 00123 p->sample_state = READY; 00124 } 00125 }
| void barcodeSample | ( | struct BC_STRUCT * | p, | |
| unsigned int | count | |||
| ) |
General purpose barcode sampling.
| *p | points to channel context | |
| count | is sample count |
Definition at line 72 of file barcode_sample.c.
References BC_STRUCT::overflow_ctr, BC_STRUCT::sample_buffer, BC_STRUCT::sample_ctr, BC_STRUCT::sample_ptr, and BC_STRUCT::sample_state.
00073 { 00074 // Leave if sample is already available 00075 if(p->sample_state == READY){ 00076 return; 00077 } 00078 00079 // Arm overflow counter 00080 p->overflow_ctr = BARCODE_OVERFLOW_TIME; 00081 00082 // Initialize if just starting 00083 if(p->sample_state != BUSY){ 00084 p->sample_ctr = 0; 00085 p->sample_ptr = p->sample_buffer; 00086 p->sample_state = BUSY; 00087 return; 00088 } 00089 00090 // Already Sampling 00091 00092 // Buffer full? 00093 if(p->sample_ctr++ >= (sizeof p->sample_buffer / 2) - 1){ 00094 00095 // Kill the sampling 00096 p->sample_ctr = 0; 00097 p->overflow_ctr = 1; 00098 p->sample_state = WAITING; 00099 return; 00100 } 00101 00102 // Store the count 00103 *p->sample_ptr++ = count; 00104 }
| unsigned short Decode39 | ( | struct BC_STRUCT * | p | ) |
| unsigned short DecodeCodabar | ( | struct BC_STRUCT * | p | ) |
| unsigned short DecodeI25 | ( | struct BC_STRUCT * | p, | |
| unsigned char | len | |||
| ) |
| unsigned short DecodeWiegand | ( | struct BC_STRUCT * | p, | |
| struct prox_cfg_struct * | w | |||
| ) |
| void magstripeOverflow | ( | struct BC_STRUCT * | p | ) |
| void magstripeSample | ( | struct BC_STRUCT * | p, | |
| unsigned char | value | |||
| ) |
| void reader1_init | ( | void | ) |
| void reader2_init | ( | void | ) |
| unsigned short wiegand_decode | ( | struct BC_STRUCT * | p | ) |
| void wiegandOverflow | ( | struct BC_STRUCT * | p | ) |
| void wiegandSample | ( | struct BC_STRUCT * | p, | |
| unsigned char | value | |||
| ) |
| unsigned char DecodeBarcodeReady0 |
| unsigned char DecodeBarcodeReady1 |
| unsigned char DecodeMagstripeReady0 |
| unsigned char DecodeMagstripeReady1 |
| unsigned char DecodeWiegandReady0 |
| unsigned char DecodeWiegandReady1 |
| unsigned char symbol |