11 #ifndef __BLUESMIRF_HID_HEADER
12 #define __BLUESMIRF_HID_HEADER
18 #include <SoftwareSerial.h>
41 serial_.print(
F(
"$$$"));
48 serial_.println(
F(
"R,1"));
56 serial_.println(
F(
"C"));
105 if(data_[3] == _key) {
109 if(data_[4] == _key) {
113 if(data_[5] == _key) {
121 if((_mod & 1) == 1) {
125 if((_mod & 2) == 2) {
129 if((_mod & 4) == 4) {
133 if((_mod & 8) == 8) {
142 if((_mod & 1) == 1) {
143 if(--(mod_vec_[0]) == 0)
146 if((_mod & 2) == 2) {
147 if(--(mod_vec_[1]) == 0)
150 if((_mod & 4) == 4) {
151 if(--(mod_vec_[2]) == 0)
154 if((_mod & 8) == 8) {
155 if(--(mod_vec_[3]) == 0)
164 serial_.write(data_, 6);
169 serial_.write(data_, 6);
174 serial_.write(data_, 6);
179 serial_.write(data_, 6);
186 serial_.write(data_, 6);
190 SoftwareSerial serial_;
199 #endif //__BLUESMIRF_HID_HEADER
void change_ssp()
Definition: bluesmirf_hid.hpp:65
void release_all()
Definition: bluesmirf_hid.hpp:181
void set_key(uint8_t const &_key)
Definition: bluesmirf_hid.hpp:87
void break_connection()
Definition: bluesmirf_hid.hpp:60
Definition: bluesmirf_hid.hpp:22
void press(key const &_key, key const &_mod=key::none)
Definition: bluesmirf_hid.hpp:161
bluesmirf_hid_class(uint8_t const &rx, uint8_t const &tx)
Definition: bluesmirf_hid.hpp:25
void unset_mod(uint8_t const &_mod)
Definition: bluesmirf_hid.hpp:138
void press(uint8_t const &_key, uint8_t const &_mod=(uint8_t) key::none)
Definition: bluesmirf_hid.hpp:171
void set_mod(uint8_t const &_mod)
Definition: bluesmirf_hid.hpp:118
void reset()
Definition: bluesmirf_hid.hpp:46
struct ustd::endl_class endl
void change_hid()
Definition: bluesmirf_hid.hpp:75
void release(uint8_t const &_key, uint8_t const &_mod=(uint8_t) key::none)
Definition: bluesmirf_hid.hpp:176
void init()
Definition: bluesmirf_hid.hpp:37
key
Definition: hid_keys.hpp:14
void unset_key(uint8_t const &_key)
Definition: bluesmirf_hid.hpp:104
#define F(x)
Definition: ustd_generic.hpp:15
void connect()
Definition: bluesmirf_hid.hpp:52
void cmd_mode()
Definition: bluesmirf_hid.hpp:40
void release(key const &_key, key const &_mod=key::none)
Definition: bluesmirf_hid.hpp:166