14 #include "../versaloon_include.h"
15 #include "../versaloon.h"
16 #include "../versaloon_internal.h"
58 if (interface_index > 7) {
74 uint16_t bytelen = (bitlen + 7) >> 3;
77 if (interface_index > 7) {
92 uint16_t bytelen = (bitlen + 7) >> 3;
96 if (interface_index > 7) {
105 data, 0, bytelen, 0);
109 uint32_t *data, uint8_t *ack)
115 if (interface_index > 7) {
121 parity = (request >> 1) & 1;
122 parity += (request >> 2) & 1;
123 parity += (request >> 3) & 1;
124 parity += (request >> 4) & 1;
126 buff[0] = (request | 0x81 | (
parity << 5)) & ~0x40;
130 memset(buff + 1, 0, 4);
133 if (request & 0x04) {
144 (uint8_t *)data, 1, 4, 0);
RESULT usbtoswd_seqin(uint8_t interface_index, uint8_t *data, uint16_t bitlen)
RESULT usbtoswd_transact(uint8_t interface_index, uint8_t request, uint32_t *data, uint8_t *ack)
RESULT usbtoswd_config(uint8_t interface_index, uint8_t trn, uint16_t retry, uint16_t dly)
static RESULT usbtoswd_read_callback(void *p, uint8_t *src, uint8_t *processed)
RESULT usbtoswd_init(uint8_t interface_index)
static RESULT usbtoswd_write_callback(void *p, uint8_t *src, uint8_t *processed)
RESULT usbtoswd_fini(uint8_t interface_index)
RESULT usbtoswd_seqout(uint8_t interface_index, const uint8_t *data, uint16_t bitlen)
#define usbtoxxx_in_command(type, port, cmdbuf, cmdlen, retlen, wantbuf, wantpos, wantlen, c)
#define usbtoxxx_conf_command(type, port, cmdbuf, cmdlen)
#define usbtoxxx_inout_command(type, port, cmdbuf, cmdlen, retlen, wantbuf, wantpos, wantlen, c)
#define usbtoxxx_init_command(type, port)
#define usbtoxxx_out_command(type, port, cmdbuf, cmdlen, c)
#define usbtoxxx_fini_command(type, port)
void versaloon_set_callback(versaloon_callback_t callback)
void versaloon_set_extra_data(void *p)
uint8_t * versaloon_cmd_buf
#define ERRMSG_INVALID_INTERFACE_NUM
static unsigned int parity(unsigned int v)