schroeder- / android_open_accessory_lib Goto Github PK
View Code? Open in Web Editor NEWa library to talk to your android device over USB
License: GNU General Public License v3.0
a library to talk to your android device over USB
License: GNU General Public License v3.0
HI, I know it's been a long time since you did this lib but I'm trying to implement this protocol and I'm having issue with read_data in C++ side.
Can I ask you why you choose to set in_addr and out_addr ?
I through it's was already defined and we have to pick them with libusb.
Otherwise, how Android App can know where to send the data ?
Thank you
Hi,
I think gcc 4.8 has C++ feature, but it still have problem in your code.
Any idea?
thank you
g++ -o test_usb src/libtest.cpp src/openaccessory.cpp -std=c++11 -Wall
pkg-config --libs --cflags libusb-1.0
In file included from src/libtest.cpp:19:0:
src/openaccessory.hpp:53:73: error: ‘constexpr’ needed for in-class initialization of static data member ‘const std::array<unsigned int, 4ul> OpenAccessory::_pid’ of non-integral type [-fpermissive]
In file included from src/openaccessory.cpp:18:0:
src/openaccessory.hpp:53:73: error: ‘constexpr’ needed for in-class initialization of static data member ‘const std::array<unsigned int, 4ul> OpenAccessory::_pid’ of non-integral type [-fpermissive]
src/openaccessory.cpp:209:36: error: duplicate initialization of ‘OpenAccessory::_pid’
src/openaccessory.cpp:209:36: error: conflicting declaration ‘const uint32_t OpenAccessory::_pid []’
In file included from src/openaccessory.cpp:18:0:
src/openaccessory.hpp:53:73: error: ‘OpenAccessory::_pid’ has a previous declaration as ‘const std::array<unsigned int, 4ul> OpenAccessory::_pid’
src/openaccessory.cpp:209:36: error: declaration of ‘const std::array<unsigned int, 4ul> OpenAccessory::_pid’ outside of class is not definition [-fpermissive]
src/openaccessory.cpp:209:71: error: ‘constexpr’ needed for in-class initialization of static data member ‘const std::array<unsigned int, 4ul> OpenAccessory::_pid’ of non-integral type [-fpermissive]
make: *** [test] Error 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.