Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/libusbhost/libusbhost
Open source USB host stack for embedded devices
https://github.com/libusbhost/libusbhost
Last synced: 3 months ago
JSON representation
Open source USB host stack for embedded devices
- Host: GitHub
- URL: https://github.com/libusbhost/libusbhost
- Owner: libusbhost
- License: gpl-3.0
- Created: 2015-04-01T13:55:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-03-01T18:48:07.000Z (over 3 years ago)
- Last Synced: 2023-03-01T02:56:36.707Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 186 KB
- Stars: 55
- Watchers: 6
- Forks: 23
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: COPYING.GPL3
Lists
- awesome-stars - libusbhost/libusbhost - Open source USB host stack for embedded devices (C)
README
[![Build Status](https://travis-ci.org/libusbhost/libusbhost.svg?branch=master)](https://travis-ci.org/libusbhost/libusbhost)
##General Information[Link to the official repository](http://github.com/libusbhost/libusbhost)
###Objectives
- provide open-source(Lesser GPL3) usb host library for embedded devices
- execution speed. This library doesn't use blocking sleep,
making low overhead on runtime performance
- use static allocation for all of its buffers.
This means no allocation and reallocation is affecting performance
(possibility of memory fragmentation. execution time indeterminism). No malloc(), realloc(), free()
- do not depend on any operating system### Supported hardware
- stm32f4discovery
### Supported device drivers
- HUB
- Gamepad - XBox compatible Controller
- Generic Human Interface driver: mouse, keyboard (raw data)
- USB MIDI devices (raw data + note on/off)## Steps to compile library and demo
### Prerequisities
Make sure the following prerequisities are installed to be able to compile this library
- **git** for libopencm3 submodule fetch
- **gcc-arm-none-eabi** toolchain for cross compilation
- **cmake**
- **ccmake** (optional)
- **openocd** (optional)### Basic setup
1. go to build directory located in the root of the project
> cd build2. compile demo and the library with the default options set
> cmake .. && makeExecutable demo is placed into `build/demo.hex`.
Library is placed into `build/src/libusbhost.a`.### Advanced setup
*cmake* initial cache variablesCache variableValueDescription
USE_STM32F4_FSTRUEEnable STM32F4 Full Speed USB host peripheral
USE_STM32F4_HSTRUEEnable STM32F4 High Speed USB host peripheral
USE_USART_DEBUGTRUEEnable writing of the debug information to USART6
OOCD_INTERFACE"stlink-v2"Interface configuration file used by the openocd
OOCD_BOARD"stm32f4discovery"Board configuration file used by the openocd
You can alter these by issuing the following commands in the build directory
- Graphical user interface
> ccmake ..- Command line interface
> cmake .. -D{VARIABLE}={VALUE}### Flashing
If the *openocd* is installed, `make flash` executed in the build directory
flashes the `build/demo.hex` to the stm32f4discovery board.### Reading debug output
The following table represents the configuration of the debug outputGPIOGPIOC6
USART peripheryUSART6
FunctionUART TX
Baud rate921600
Uart mode8N1
## License
The libusbhost code is released under the terms of the GNU Lesser General
Public License (LGPL), version 3 or later.See COPYING.GPL3 and COPYING.LGPL3 for details.