A 3rd party developer/contractor has written a API for communicating with a custom USB HID device for desktop applications. The sources were written in C. I could generalize this API as Business Logic + Communication. In this post Business Logic is abbreviated as BL and Communication Interface as COMM to avoid repetition and simplicity
The developer implemented the COMM part of the API using HIDAPI. Now I have a task to implement this whole API for TM4C Microcontroller using the IoT Evaluation Board.
Because the BL is way too complex and pointless to rewrite from scratch. Therefore, I thought it would be beneficial to just reuse the BL and get away by implementing the correct COMM/communication interface. The COMM endpoints of the API boils down to the following function calls
xx_usb_api_open()
xx_usb_api_close()
xx_usb_api_read()
xx_usb_api_write()
HIDAPI functions like hid_open(), hid_write() are called respectively in the above functions. Could anyone point me in the right direction as to how I can replace HIDAPI in the above functions with Tivaware USB Library ? How I configure USB Library for this scenario (like modes, callbacks) ?
Currently, I have no other option but to RT*M which seems to be way too complicated for my skill set. (Tivaware USB Library)
The example projects are also not easy to understand and do not relate well for my scenario. For example there are projects where a keyboard or mouse can be connected to the dev board and see the output on LCD screen (Seems unidirectional). However, in my application the communication is bidirectional.
Any help or pointers to the right direction would be appreciated :)