1+
2+
13# roccat-vulcan-api-rs
4+
5+ ![ license] ( https://img.shields.io/github/license/ChickenStorm/roccat-vulcan-api-rs )
6+ [ ![ ] ( https://img.shields.io/badge/doc-Read_Me-blue )] ( https://chickenstorm.github.io/roccat-vulcan-api-rs/roccat_vulcan_api_rs/index.html )
7+ ![ Build] ( https://img.shields.io/github/workflow/status/ChickenStorm/roccat-vulcan-api-rs/Rust )
8+ [ ![ codecov] ( https://codecov.io/gh/ChickenStorm/roccat-vulcan-api-rs/branch/main/graph/badge.svg?token=Z1J8KMKLC1 )] ( https://codecov.io/gh/ChickenStorm/roccat-vulcan-api-rs )
9+
210** Roccat Vulcan keyboard illumination API.**
311A fast multiplatform API to control Roccat Vulcan illumination.
412
@@ -7,32 +15,29 @@ Provide an API to control the lighting of the Roccat Vulcan 100 and 120.
715# Usage
816
917add on your dependencies of Cargo.toml
10- ` roccat-vulcan-api-rs = { version = "0.1 .1", git = "https://github.com/ChickenStorm/roccat-vulcan-api-rs", branch = "main" } ` .
18+ ` roccat-vulcan-api-rs = { version = "0.2 .1", git = "https://github.com/ChickenStorm/roccat-vulcan-api-rs", branch = "main" } ` .
1119
12-
13- The main way to interact with the API is through ` KeyboardApi ` .
20+ The main way to interact with the API is through [ ` KeyboardApi ` ] .
1421Note that when the structure is dropped the keyboard will go back to the default rainbow behavior.
1522
1623
1724# Layout
18- For the moment only Swiss French layout is supported. To support other layout implement the trait ` Layout ` .
25+ For the moment only Swiss French layout is supported. To support other layout implement the trait [ ` Layout ` ] .
1926
2027# Examples
2128To load and initialized a keyboard use
2229``` rust
23- use roccat_vulcan_api_rs :: {KeyboardApi , config, ColorBuffer , ColorRgb };
24- use std :: {
25- thread :: sleep,
26- time :: Duration ,
27- };
28-
29- let keyboard = KeyboardApi :: get_api () . unwrap () ;
30- let buffer = ColorBuffer :: new (ColorRgb :: new (255 , 255 , 255 ));
31- keyboard . render (& buffer ). unwrap () ;
30+ use std :: {thread :: sleep, time :: Duration };
31+ use roccat_vulcan_api_rs :: {ColorBuffer , ColorRgb , ErrorRoccatVulcanApi , KeyboardApi };
32+
33+ # fn main () -> Result <(), ErrorRoccatVulcanApi > {
34+ # #[cfg(not(feature = " no-keyboard-test " ))]
35+ # {
36+ let keyboard = KeyboardApi :: new () ? ;
37+ let buffer = ColorBuffer :: from_element (ColorRgb :: new (255 , 255 , 255 ));
38+ keyboard . render (& buffer )? ;
3239sleep (Duration :: from_secs (1 ));
40+ # }
41+ # Ok (())
42+ # }
3343```
34-
35- ### Acknowledgement
36-
37- - I thank [ simonhuwiler] ( https://github.com/simonhuwiler/roccatvulcan ) and [ duncanthrax] ( https://github.com/duncanthrax/roccat-vulcan ) for their code which this library is based on.
38- - And a big thank you to Bidoubioche for helping me learn rust and for always answering my question and the help figuring my way through the compiler messages
0 commit comments