Blame tools/csr_3wire.c

Packit 34410b
/*
Packit 34410b
 *
Packit 34410b
 *  BlueZ - Bluetooth protocol stack for Linux
Packit 34410b
 *
Packit 34410b
 *  Copyright (C) 2004-2010  Marcel Holtmann <marcel@holtmann.org>
Packit 34410b
 *
Packit 34410b
 *
Packit 34410b
 *  This program is free software; you can redistribute it and/or modify
Packit 34410b
 *  it under the terms of the GNU General Public License as published by
Packit 34410b
 *  the Free Software Foundation; either version 2 of the License, or
Packit 34410b
 *  (at your option) any later version.
Packit 34410b
 *
Packit 34410b
 *  This program is distributed in the hope that it will be useful,
Packit 34410b
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 34410b
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 34410b
 *  GNU General Public License for more details.
Packit 34410b
 *
Packit 34410b
 *  You should have received a copy of the GNU General Public License
Packit 34410b
 *  along with this program; if not, write to the Free Software
Packit 34410b
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
Packit 34410b
 *
Packit 34410b
 */
Packit 34410b
Packit 34410b
#ifdef HAVE_CONFIG_H
Packit 34410b
#include <config.h>
Packit 34410b
#endif
Packit 34410b
Packit 34410b
#include <stdio.h>
Packit 34410b
#include <errno.h>
Packit 34410b
#include <stdint.h>
Packit 34410b
Packit 34410b
#include "csr.h"
Packit 34410b
Packit 34410b
static uint16_t seqnum = 0x0000;
Packit 34410b
Packit 34410b
int csr_open_3wire(char *device)
Packit 34410b
{
Packit 34410b
	fprintf(stderr, "Transport not implemented\n");
Packit 34410b
Packit 34410b
	return -1;
Packit 34410b
}
Packit 34410b
Packit 34410b
static int do_command(uint16_t command, uint16_t seqnum, uint16_t varid, uint8_t *value, uint16_t length)
Packit 34410b
{
Packit 34410b
	errno = EIO;
Packit 34410b
Packit 34410b
	return -1;
Packit 34410b
}
Packit 34410b
Packit 34410b
int csr_read_3wire(uint16_t varid, uint8_t *value, uint16_t length)
Packit 34410b
{
Packit 34410b
	return do_command(0x0000, seqnum++, varid, value, length);
Packit 34410b
}
Packit 34410b
Packit 34410b
int csr_write_3wire(uint16_t varid, uint8_t *value, uint16_t length)
Packit 34410b
{
Packit 34410b
	return do_command(0x0002, seqnum++, varid, value, length);
Packit 34410b
}
Packit 34410b
Packit 34410b
void csr_close_3wire(void)
Packit 34410b
{
Packit 34410b
}