OpenCores
URL https://opencores.org/ocsvn/adv_debug_sys/adv_debug_sys/trunk

Subversion Repositories adv_debug_sys

[/] [adv_debug_sys/] [trunk/] [Software/] [adv_jtag_bridge/] [cable_common.h] - Blame information for rev 14

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 nyawn
 
2
#ifndef _CABLE_COMMON_H_
3
#define _CABLE_COMMON_H_
4
 
5 14 nyawn
#include <stdint.h>
6
 
7 4 nyawn
// Defines to use in the 'packet' args of cable_write_bit()
8
// and cable_read_write_bit().  Note that while TRST is 
9
// active low for JTAG hardware, here the TRST bit
10
// should be set when you want the TRST wire active
11
// (JTAG TAP to be reset).
12
#define TRST     (0x04)
13
#define TMS      (0x02)
14
#define TDO      (0x01)
15
 
16
// These should only be used in the cable_* files.
17
#define TCLK_BIT (0x01)
18
#define TRST_BIT (0x02)
19
#define TDI_BIT  (0x04)
20
#define TMS_BIT  (0x08)
21
#define TDO_BIT  (0x20)
22
 
23
// Cable subsystem / init routines
24
int cable_select(const char *cable);
25
int cable_init();
26
int cable_parse_opt(int c, char *str);
27
const char *cable_get_args();
28
void cable_print_help();
29
 
30
 
31
// Cable API routines
32
int cable_write_bit(uint8_t packet);
33
int cable_read_write_bit(uint8_t packet_out, uint8_t *bit_in);
34
int cable_write_stream(uint32_t *stream, int len_bits, int set_last_bit);
35
int cable_read_write_stream(uint32_t *outstream, uint32_t *instream, int len_bits, int set_last_bit);
36
 
37
// Common functions for lower-level drivers to use as desired
38
int cable_common_write_bit(uint8_t packet);
39
int cable_common_read_write_bit(uint8_t packet_out, uint8_t *bit_in);
40
int cable_common_write_stream(uint32_t *stream, int len_bits, int set_last_bit);
41
int cable_common_read_stream(uint32_t *outstream, uint32_t *instream, int len_bits, int set_last_bit);
42
 
43
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.