Change all struct/enum definitions in include/urjtag/*.h from

typedef struct urj_bla urj_bla_t
into
  typedef struct URJ_BLA urj_bla_t
because otherwise swig generates name collisions.
Add urjtag.i that just includes include/urjtag/urjtag.h, and a Makefile
target to build python bindings from everything defined from there.



git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1651 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Rutger Hofman 15 years ago
parent a025e29892
commit cb8c7c635e

@ -1,3 +1,12 @@
2009-06-13 Rutger Hofman <rfhh>
* include/urjtag/*.h: change all struct/enum definitions from
typedef struct urj_bla urj_bla_t into typedef struct URJ_BLA urj_bla_t
because swig otherwise generates name collisions
* Makefile.am, urjtag.i: add the dumbest possible swig target that generates
swig for everything referenced include/urjtag/urjtag.h. This might even
turn out to be useful once the API has been cleaned up.
2009-06-11 Arnim Laeuger <arniml>
* src/bus/bf533_stamp.c: [ 2804509 ] bf533_stamp bus driver enchancement

@ -45,3 +45,10 @@ EXTRA_DIST = \
tools/config.rpath
ACLOCAL_AMFLAGS = -I m4
swig:
swig \
-python \
-includeall -ignoremissing -Iinclude/urjtag \
-module urjtag \
urjtag.i

@ -37,7 +37,7 @@
#define URJ_BSBIT_DONTCARE '?'
struct urj_bsbit
struct URJ_BSBIT
{
int bit;
char *name;

@ -28,7 +28,7 @@
#include "types.h"
struct urj_part_signal
struct URJ_PART_SIGNAL
{
char *name;
char *pin; /* djf hack pin number from bsdl */
@ -37,7 +37,7 @@ struct urj_part_signal
urj_bsbit_t *output;
};
struct urj_part_salias
struct URJ_PART_SALIAS
{
char *name;
urj_part_salias_t *next;

@ -83,7 +83,7 @@ typedef enum URJ_BUS_PARAM_KEY
}
urj_bus_param_key_t;
struct urj_bus_driver
struct URJ_BUS_DRIVER
{
const char *name;
const char *description;
@ -108,7 +108,7 @@ struct urj_bus_driver
int (*init) (urj_bus_t *bus);
};
struct urj_bus
struct URJ_BUS
{
urj_chain_t *chain;
urj_part_t *part;

@ -34,9 +34,9 @@
#include "parport.h"
#include "pod.h"
typedef struct urj_cable_driver urj_cable_driver_t;
typedef struct URJ_CABLE_DRIVER urj_cable_driver_t;
typedef enum urj_cable_flush_amount
typedef enum URJ_CABLE_FLUSH_AMOUNT
{
URJ_TAP_CABLE_OPTIONALLY,
URJ_TAP_CABLE_TO_OUTPUT,
@ -62,7 +62,7 @@ typedef enum URJ_CABLE_PARAM_KEY
}
urj_cable_param_key_t;
struct urj_cable_driver
struct URJ_CABLE_DRIVER
{
const char *name;
const char *description;
@ -95,9 +95,9 @@ struct urj_cable_driver
void (*help) (urj_log_level_t ll, const char *);
};
typedef struct urj_cable_queue urj_cable_queue_t;
typedef struct URJ_CABLE_QUEUE urj_cable_queue_t;
struct urj_cable_queue
struct URJ_CABLE_QUEUE
{
enum
{
@ -136,9 +136,9 @@ struct urj_cable_queue
} arg;
};
typedef struct urj_cable_queue_info urj_cable_queue_info_t;
typedef struct URJ_CABLE_QUEUE_INFO urj_cable_queue_info_t;
struct urj_cable_queue_info
struct URJ_CABLE_QUEUE_INFO
{
urj_cable_queue_t *data;
int max_items;
@ -147,7 +147,7 @@ struct urj_cable_queue_info
int next_free;
};
struct urj_cable
struct URJ_CABLE
{
urj_cable_driver_t *driver;
union

@ -36,7 +36,7 @@
#define URJ_CHAIN_EXITMODE_EXIT1 2
#define URJ_CHAIN_EXITMODE_UPDATE 3
struct urj_chain
struct URJ_CHAIN
{
int state;
urj_parts_t *parts;

@ -29,7 +29,7 @@
#define URJ_DATA_REGISTER_MAXLEN 32
struct urj_data_register
struct URJ_DATA_REGISTER
{
char name[URJ_DATA_REGISTER_MAXLEN + 1]; /* (public) register name */
urj_tap_register_t *in; /* (public) register value clocked in */

@ -31,7 +31,7 @@
/**
* Error types
*/
typedef enum urj_error
typedef enum URJ_ERROR
{
URJ_ERROR_OK = 0,
URJ_ERROR_ALREADY,
@ -78,7 +78,7 @@ urj_error_t;
/**
* Error state.
*/
typedef struct urj_error_state
typedef struct URJ_ERROR_STATE
{
urj_error_t errnum; /**< error number */
int sys_errno; /**< errno if URJ_ERROR_IO */

@ -39,7 +39,7 @@
#include "types.h"
typedef struct urj_flash_cfi_array urj_flash_cfi_array_t;
typedef struct URJ_FLASH_CFI_ARRAY urj_flash_cfi_array_t;
typedef struct
{

@ -65,9 +65,9 @@ typedef struct
}
urj_jim_shift_reg_t;
typedef struct urj_jim_device urj_jim_device_t;
typedef struct URJ_JIM_DEVICE urj_jim_device_t;
struct urj_jim_device
struct URJ_JIM_DEVICE
{
urj_jim_device_t *prev;
@ -85,7 +85,7 @@ struct urj_jim_device
int tdo_buffer;
};
typedef struct urj_jim_state
typedef struct URJ_JIM_STATE
{
int trst;
uint8_t *shmem;
@ -94,9 +94,9 @@ typedef struct urj_jim_state
}
urj_jim_state_t;
typedef struct urj_jim_bus_device urj_jim_bus_device_t;
typedef struct URJ_JIM_BUS_DEVICE urj_jim_bus_device_t;
struct urj_jim_bus_device
struct URJ_JIM_BUS_DEVICE
{
int width; /* bytes */
int size; /* words (each <width> bytes) */

@ -30,7 +30,7 @@
/**
* Log state.
*/
typedef struct urj_log_state
typedef struct URJ_LOG_STATE
{
urj_log_level_t level; /**< logging level */
int (*out_vprintf) (const char *fmt, va_list ap);

@ -60,7 +60,7 @@ typedef struct
}
urj_parport_driver_t;
struct urj_parport
struct URJ_PARPORT
{
urj_parport_driver_t *driver;
void *params;

@ -31,7 +31,7 @@
#define URJ_PART_PART_MAXLEN 20
#define URJ_PART_STEPPING_MAXLEN 8
struct urj_part
struct URJ_PART
{
urj_tap_register_t *id;
char *alias; /* djf refdes */
@ -91,7 +91,7 @@ urj_part_instruction_t *urj_part_instruction_define (urj_part_t *part,
* parts
*/
struct urj_parts
struct URJ_PARTS
{
int len;
urj_part_t **parts;

@ -29,7 +29,7 @@
#define URJ_INSTRUCTION_MAXLEN_INSTRUCTION 20
struct urj_part_instruction
struct URJ_PART_INSTRUCTION
{
char name[URJ_INSTRUCTION_MAXLEN_INSTRUCTION + 1];
urj_tap_register_t *value;

@ -24,7 +24,7 @@
#ifndef URJ_POD_H
#define URJ_POD_H
typedef enum urj_pod_sigsel
typedef enum URJ_POD_SIGSEL
{
URJ_POD_CS_NONE = 0, /* no/invalid signal */
URJ_POD_CS_TDI = (1 << 0), /* out: JTAG/SPI data in */

@ -28,7 +28,7 @@
#include "types.h"
#include <stdint.h>
struct urj_tap_register
struct URJ_TAP_REGISTER
{
char *data; /* (public, r/w) register data */
int len; /* (public, r/o) register length */

@ -26,25 +26,25 @@
#ifndef URJ_URJ_TYPES_H
#define URJ_URJ_TYPES_H
typedef struct urj_bus urj_bus_t;
typedef struct urj_bus_driver urj_bus_driver_t;
typedef struct urj_chain urj_chain_t;
typedef struct urj_cable urj_cable_t;
typedef struct urj_usbconn urj_usbconn_t;
typedef struct urj_parport urj_parport_t;
typedef struct urj_part urj_part_t;
typedef struct urj_parts urj_parts_t;
typedef struct urj_part_signal urj_part_signal_t;
typedef struct urj_part_salias urj_part_salias_t;
typedef struct urj_part_instruction urj_part_instruction_t;
typedef struct urj_data_register urj_data_register_t;
typedef struct urj_bsbit urj_bsbit_t;
typedef struct urj_tap_register urj_tap_register_t;
typedef struct URJ_BUS urj_bus_t;
typedef struct URJ_BUS_DRIVER urj_bus_driver_t;
typedef struct URJ_CHAIN urj_chain_t;
typedef struct URJ_CABLE urj_cable_t;
typedef struct URJ_USBCONN urj_usbconn_t;
typedef struct URJ_PARPORT urj_parport_t;
typedef struct URJ_PART urj_part_t;
typedef struct URJ_PARTS urj_parts_t;
typedef struct URJ_PART_SIGNAL urj_part_signal_t;
typedef struct URJ_PART_SALIAS urj_part_salias_t;
typedef struct URJ_PART_INSTRUCTION urj_part_instruction_t;
typedef struct URJ_DATA_REGISTER urj_data_register_t;
typedef struct URJ_BSBIT urj_bsbit_t;
typedef struct URJ_TAP_REGISTER urj_tap_register_t;
/**
* Log levels
*/
typedef enum urj_log_level
typedef enum URJ_LOG_LEVEL
{
URJ_LOG_LEVEL_ALL, /**< every single bit as it is transmitted */
URJ_LOG_LEVEL_COMM, /**< low level communication details */

@ -58,7 +58,7 @@ typedef struct
}
urj_usbconn_driver_t;
struct urj_usbconn
struct URJ_USBCONN
{
urj_usbconn_driver_t *driver;
void *params;

@ -166,7 +166,7 @@ typedef struct cfi_query_structure
urj_flash_cfi_device_geometry_t device_geometry;
} urj_flash_cfi_query_structure_t;
struct urj_flash_cfi_chip
struct URJ_FLASH_CFI_CHIP
{
int width; /* 1 for 8 bits, 2 for 16 bits, 4 for 32 bits, etc. */
urj_flash_cfi_query_structure_t cfi;

@ -42,9 +42,9 @@
#include <urjtag/types.h>
#include <urjtag/log.h>
typedef struct urj_flash_cfi_chip urj_flash_cfi_chip_t;
typedef struct URJ_FLASH_CFI_CHIP urj_flash_cfi_chip_t;
struct urj_flash_cfi_array
struct URJ_FLASH_CFI_ARRAY
{
urj_bus_t *bus;
uint32_t address;

@ -32,8 +32,8 @@
/* description of a command
the buffer can contain one or more commands if receive count
is zero for all of them */
typedef struct urj_tap_cable_cx_cmd urj_tap_cable_cx_cmd_t;
struct urj_tap_cable_cx_cmd
typedef struct URJ_TAP_CABLE_CX_CMD urj_tap_cable_cx_cmd_t;
struct URJ_TAP_CABLE_CX_CMD
{
urj_tap_cable_cx_cmd_t *next;
uint32_t buf_len;
@ -42,12 +42,12 @@ struct urj_tap_cable_cx_cmd
uint32_t to_recv;
};
struct urj_tap_cable_cx_cmd_root
struct URJ_TAP_CABLE_CX_CMD_ROOT
{
urj_tap_cable_cx_cmd_t *first;
urj_tap_cable_cx_cmd_t *last;
};
typedef struct urj_tap_cable_cx_cmd_root urj_tap_cable_cx_cmd_root_t;
typedef struct URJ_TAP_CABLE_CX_CMD_ROOT urj_tap_cable_cx_cmd_root_t;
int urj_tap_cable_cx_cmd_space (urj_tap_cable_cx_cmd_root_t *cmd_root,
int max_len);

@ -0,0 +1 @@
#include <urjtag.h>
Loading…
Cancel
Save