mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
Introduce library with ATSPI access functions (largely untested)
- tools/include/atspi.h, tools/lib/Makefile, tools/lib/atspi.c: library with ATSPI access functions - tools/atspi-id/Makefile: use libatspi - tools/atspi-id/atspi-id.c (main) use atspi_open instead of open_usb - fw/atspi/at86rf230.h: moved to fw/include/ - fw/include/at86rf230.h: added ID registers - fw/atspi/ep0.c: removed stray #endif
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
F32XBASE = ../../../f32xbase
|
||||
|
||||
MAIN = atspi-id
|
||||
OBJS = $(F32XBASE)/lib/usb.o
|
||||
|
||||
include $(F32XBASE)/lib/Makefile.common
|
||||
|
||||
CFLAGS += -I$(F32XBASE)/include -I../../fw/include
|
||||
CFLAGS += -I../../fw/include -I../include
|
||||
LDLIBS += -L../lib -latspi
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <usb.h>
|
||||
|
||||
#include "f32xbase/usb.h"
|
||||
#include "atspi/ep0.h"
|
||||
#include "atspi/usb-ids.h"
|
||||
#include "atspi.h"
|
||||
|
||||
|
||||
#define FROM_DEV ATSPI_FROM_DEV(0)
|
||||
@@ -101,11 +101,9 @@ int main(int argc, const char **argv)
|
||||
|
||||
if (argc != 1)
|
||||
usage(*argv);
|
||||
dev = open_usb(USB_VENDOR, USB_PRODUCT);
|
||||
if (!dev) {
|
||||
fprintf(stderr, ":-(\n");
|
||||
dev = atspi_open();
|
||||
if (!dev)
|
||||
return 1;
|
||||
}
|
||||
|
||||
show_info(dev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user