1 /* 2 * common definitions for python bindings 3 * 4 * Copyright (C) 2011 Steve Tell 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * as published by the Free Software Foundation; either version 2 9 * of the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 * 02111-1307, USA. 20 * 21 * Python bindings for urjtag intially written by Steve Tell. 22 * Additional methods by Jonathan Stroud. 23 */ 24 25 typedef struct urj_pyregister urj_pyregister_t; 26 struct urj_pyregister 27 { 28 PyObject_HEAD urj_data_register_t *urreg; 29 int part; 30 urj_chain_t *urc; 31 urj_part_instruction_t *inst; 32 urj_pyregister_t *next; 33 }; 34 35 extern PyTypeObject urj_pyregister_Type; 36 37 extern PyObject *urj_py_chkret (int rc); 38 extern PyObject *UrjtagError; 39 40 extern int urj_pyc_precheck (urj_chain_t *urc, int checks_needed); 41 #define UPRC_CBL 1 42 #define UPRC_DET 2 43 #define UPRC_BUS 4 44