Ryo Hagimoto / zbar_010

Dependents:   GR-PEACH_Camera_in_barcode levkov_ov7670

Committer:
RyoheiHagimoto
Date:
Tue Apr 19 02:19:39 2016 +0000
Revision:
1:500d42699c34
Parent:
0:56c5742b9e2b
Add copying.txt and license.txt

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RyoheiHagimoto 0:56c5742b9e2b 1 /*------------------------------------------------------------------------
RyoheiHagimoto 0:56c5742b9e2b 2 * Copyright 2008-2009 (c) Jeff Brown <spadix@users.sourceforge.net>
RyoheiHagimoto 0:56c5742b9e2b 3 *
RyoheiHagimoto 0:56c5742b9e2b 4 * This file is part of the ZBar Bar Code Reader.
RyoheiHagimoto 0:56c5742b9e2b 5 *
RyoheiHagimoto 0:56c5742b9e2b 6 * The ZBar Bar Code Reader is free software; you can redistribute it
RyoheiHagimoto 0:56c5742b9e2b 7 * and/or modify it under the terms of the GNU Lesser Public License as
RyoheiHagimoto 0:56c5742b9e2b 8 * published by the Free Software Foundation; either version 2.1 of
RyoheiHagimoto 0:56c5742b9e2b 9 * the License, or (at your option) any later version.
RyoheiHagimoto 0:56c5742b9e2b 10 *
RyoheiHagimoto 0:56c5742b9e2b 11 * The ZBar Bar Code Reader is distributed in the hope that it will be
RyoheiHagimoto 0:56c5742b9e2b 12 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
RyoheiHagimoto 0:56c5742b9e2b 13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
RyoheiHagimoto 0:56c5742b9e2b 14 * GNU Lesser Public License for more details.
RyoheiHagimoto 0:56c5742b9e2b 15 *
RyoheiHagimoto 0:56c5742b9e2b 16 * You should have received a copy of the GNU Lesser Public License
RyoheiHagimoto 0:56c5742b9e2b 17 * along with the ZBar Bar Code Reader; if not, write to the Free
RyoheiHagimoto 0:56c5742b9e2b 18 * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
RyoheiHagimoto 0:56c5742b9e2b 19 * Boston, MA 02110-1301 USA
RyoheiHagimoto 0:56c5742b9e2b 20 *
RyoheiHagimoto 0:56c5742b9e2b 21 * http://sourceforge.net/projects/zbar
RyoheiHagimoto 0:56c5742b9e2b 22 *------------------------------------------------------------------------*/
RyoheiHagimoto 0:56c5742b9e2b 23 #ifndef _CODE39_H_
RyoheiHagimoto 0:56c5742b9e2b 24 #define _CODE39_H_
RyoheiHagimoto 0:56c5742b9e2b 25
RyoheiHagimoto 0:56c5742b9e2b 26 /* Code 39 specific decode state */
RyoheiHagimoto 0:56c5742b9e2b 27 typedef struct code39_decoder_s {
RyoheiHagimoto 0:56c5742b9e2b 28 unsigned direction : 1; /* scan direction: 0=fwd, 1=rev */
RyoheiHagimoto 0:56c5742b9e2b 29 unsigned element : 4; /* element offset 0-8 */
RyoheiHagimoto 0:56c5742b9e2b 30 int character : 12; /* character position in symbol */
RyoheiHagimoto 0:56c5742b9e2b 31 unsigned s9; /* current character width */
RyoheiHagimoto 0:56c5742b9e2b 32 unsigned width; /* last character width */
RyoheiHagimoto 0:56c5742b9e2b 33
RyoheiHagimoto 0:56c5742b9e2b 34 unsigned config;
RyoheiHagimoto 0:56c5742b9e2b 35 int configs[NUM_CFGS]; /* int valued configurations */
RyoheiHagimoto 0:56c5742b9e2b 36 } code39_decoder_t;
RyoheiHagimoto 0:56c5742b9e2b 37
RyoheiHagimoto 0:56c5742b9e2b 38 /* reset Code 39 specific state */
RyoheiHagimoto 0:56c5742b9e2b 39 static inline void code39_reset (code39_decoder_t *dcode39)
RyoheiHagimoto 0:56c5742b9e2b 40 {
RyoheiHagimoto 0:56c5742b9e2b 41 dcode39->direction = 0;
RyoheiHagimoto 0:56c5742b9e2b 42 dcode39->element = 0;
RyoheiHagimoto 0:56c5742b9e2b 43 dcode39->character = -1;
RyoheiHagimoto 0:56c5742b9e2b 44 dcode39->s9 = 0;
RyoheiHagimoto 0:56c5742b9e2b 45 }
RyoheiHagimoto 0:56c5742b9e2b 46
RyoheiHagimoto 0:56c5742b9e2b 47 /* decode Code 39 symbols */
RyoheiHagimoto 0:56c5742b9e2b 48 zbar_symbol_type_t _zbar_decode_code39(zbar_decoder_t *dcode);
RyoheiHagimoto 0:56c5742b9e2b 49
RyoheiHagimoto 0:56c5742b9e2b 50 #endif
RyoheiHagimoto 0:56c5742b9e2b 51