#include "aice_usb.h"
#define AICE_KHZ_TO_SPEED_MAP_SIZE 16
-static int aice_khz_to_speed_map[AICE_KHZ_TO_SPEED_MAP_SIZE] = {
+static const int aice_khz_to_speed_map[AICE_KHZ_TO_SPEED_MAP_SIZE] = {
30000,
15000,
7500,
struct aice_interface_param_s {
/** */
- char *device_desc;
+ const char *device_desc;
/** */
- char *serial;
+ const char *serial;
/** */
uint16_t vid;
/** */
struct aice_port_param_s {
/** */
- char *device_desc;
+ const char *device_desc;
/** */
- char *serial;
+ const char *serial;
/** */
uint16_t vid;
/** */
/** */
struct aice_port {
/** */
- char *name;
+ const char *name;
/** */
int type;
/** */
* 4: Shift-IR
* 5: Pause-IR
*/
-static uint8_t amt_jtagaccel_tap_move[6][6][2] = {
+static const uint8_t amt_jtagaccel_tap_move[6][6][2] = {
/* RESET IDLE DRSHIFT DRPAUSE IRSHIFT IRPAUSE */
{ {0x1f, 0x00}, {0x0f, 0x00}, {0x05, 0x00}, {0x0a, 0x00}, {0x06, 0x00}, {0x96, 0x00} }, /* RESET */
{ {0x1f, 0x00}, {0x00, 0x00}, {0x04, 0x00}, {0x05, 0x00}, {0x06, 0x00}, {0x0b, 0x00} }, /* IDLE */
#define P31 (1 << 31)
struct device_t {
- char *name;
+ const char *name;
int TDO_PIO; /* PIO holding TDO */
uint32_t TDO_MASK; /* TDO bitmask */
int TRST_PIO; /* PIO holding TRST */
uint32_t SRST_MASK; /* SRST bitmask */
};
-static struct device_t devices[] = {
+static const struct device_t devices[] = {
{ "rea_ecr", PIOD, P27, PIOA, NC, PIOD, P23, PIOD, P24, PIOD, P26, PIOC, P5 },
{ .name = NULL },
};
/* interface variables
*/
-static struct device_t *device;
+static const struct device_t *device;
static int dev_mem_fd;
static void *sys_controller;
static uint32_t *pio_base;
static int at91rm9200_init(void)
{
- struct device_t *cur_device;
+ const struct device_t *cur_device;
cur_device = devices;
/* CMSIS-DAP Vendor Commands
* None as yet... */
-static char *info_caps_str[] = {
+static const char * const info_caps_str[] = {
"SWD Supported",
"JTAG Supported"
};
static uint16_t ft2232_pid[MAX_USB_IDS + 1] = { 0x6010, 0 };
struct ft2232_layout {
- char *name;
+ const char *name;
int (*init)(void);
void (*reset)(int trst, int srst);
void (*blink)(void);
#define OPENDOUS_MAX_VIDS_PIDS 4
/* define some probes with similar interface */
struct opendous_probe {
- char *name;
+ const char *name;
uint16_t VID[OPENDOUS_MAX_VIDS_PIDS];
uint16_t PID[OPENDOUS_MAX_VIDS_PIDS];
uint8_t READ_EP;
int BUFFERSIZE;
};
-static struct opendous_probe opendous_probes[] = {
+static const struct opendous_probe opendous_probes[] = {
{"usbprog-jtag", {0x1781, 0}, {0x0C63, 0}, 0x82, 0x02, 0x00, 510 },
{"opendous", {0x1781, 0x03EB, 0}, {0xC0C0, 0x204F, 0}, 0x81, 0x02, 0x00, 360 },
{"usbvlab", {0x16C0, 0}, {0x05DC, 0}, 0x81, 0x02, 0x01, 360 },
#define FUNC_READ_DATA 0x51
static char *opendous_type;
-static struct opendous_probe *opendous_probe;
+static const struct opendous_probe *opendous_probe;
/* External interface functions */
static int opendous_execute_queue(void);
static int opendous_init(void)
{
int check_cnt;
- struct opendous_probe *cur_opendous_probe;
+ const struct opendous_probe *cur_opendous_probe;
cur_opendous_probe = opendous_probes;
/* parallel port cable description
*/
struct cable {
- char *name;
+ const char *name;
uint8_t TDO_MASK; /* status port bit containing current TDO value */
uint8_t TRST_MASK; /* data port bit for TRST */
uint8_t TMS_MASK; /* data port bit for TMS */
uint8_t LED_MASK; /* data port bit for LED */
};
-static struct cable cables[] = {
+static const struct cable cables[] = {
/* name tdo trst tms tck tdi srst o_inv i_inv init exit led */
{ "wiggler", 0x80, 0x10, 0x02, 0x04, 0x08, 0x01, 0x01, 0x80, 0x80, 0x80, 0x00 },
{ "wiggler2", 0x80, 0x10, 0x02, 0x04, 0x08, 0x01, 0x01, 0x80, 0x80, 0x00, 0x20 },
/* interface variables
*/
-static struct cable *cable;
+static const struct cable *cable;
static uint8_t dataport_value;
#if PARPORT_USE_PPDEV == 1
static int parport_init(void)
{
- struct cable *cur_cable;
+ const struct cable *cur_cable;
#if PARPORT_USE_PPDEV == 1
char buffer[256];
#endif
struct hl_interface_param_s {
/** */
- char *device_desc;
+ const char *device_desc;
/** */
- char *serial;
+ const char *serial;
/** */
uint16_t vid;
/** */
*/
struct jtag_interface {
/** The name of the JTAG interface driver. */
- char *name;
+ const char * const name;
/**
* Bit vector listing capabilities exposed by this driver.