AwesomeStudioPedal
A programmable, multi-profile foot controller for DAWs, score readers, and studio automation
Loading...
Searching...
No Matches
BleKeyboardAdapter Class Reference

Adapter that implements IBleKeyboard interface using BleKeyboard. More...

#include <ble_keyboard_adapter.h>

Inheritance diagram for BleKeyboardAdapter:
IBleKeyboard IBleKeyboard

Public Member Functions

 BleKeyboardAdapter (BleKeyboard &kb)
 Constructs a BleKeyboardAdapter.
 
void begin () override
 Initializes the BLE keyboard.
 
bool isConnected () override
 Checks if BLE keyboard is connected.
 
void write (uint8_t key) override
 Sends a single key press.
 
void write (const MediaKeyReport key) override
 Sends a media key report.
 
void print (const char *text) override
 Sends a text string.
 
void begin () override
 Initializes the BLE stack and HID keyboard service.
 
bool isConnected () override
 Checks if a central device is connected.
 
void write (uint8_t key) override
 Sends a single key press.
 
void write (const MediaKeyReport key) override
 Sends a media key report.
 
void print (const char *text) override
 Sends a text string.
 
- Public Member Functions inherited from IBleKeyboard
virtual ~IBleKeyboard ()=default
 

Detailed Description

Adapter that implements IBleKeyboard interface using BleKeyboard.

nRF52840-specific implementation of IBleKeyboard interface

Concrete implementation that wraps the BleKeyboard library to provide the IBleKeyboard interface. This allows the pedal logic to work with the actual BLE keyboard hardware.

Wraps the Adafruit Bluefruit BLE HID keyboard (BLEHidAdafruit) to provide the IBleKeyboard interface used by the pedal logic layer.

Definition at line 17 of file esp32/include/ble_keyboard_adapter.h.

Constructor & Destructor Documentation

◆ BleKeyboardAdapter()

BleKeyboardAdapter::BleKeyboardAdapter ( BleKeyboard &  kb)
inlineexplicit

Constructs a BleKeyboardAdapter.

Parameters
kbReference to the BleKeyboard instance to wrap

Definition at line 26 of file esp32/include/ble_keyboard_adapter.h.

Member Function Documentation

◆ begin() [1/2]

void BleKeyboardAdapter::begin ( )
inlineoverridevirtual

Initializes the BLE keyboard.

Delegates to the underlying BleKeyboard begin() method.

Implements IBleKeyboard.

Definition at line 33 of file esp32/include/ble_keyboard_adapter.h.

◆ begin() [2/2]

void BleKeyboardAdapter::begin ( )
overridevirtual

Initializes the BLE stack and HID keyboard service.

Implements IBleKeyboard.

◆ isConnected() [1/2]

bool BleKeyboardAdapter::isConnected ( )
inlineoverridevirtual

Checks if BLE keyboard is connected.

Returns
true if connected, false otherwise

Implements IBleKeyboard.

Definition at line 40 of file esp32/include/ble_keyboard_adapter.h.

◆ isConnected() [2/2]

bool BleKeyboardAdapter::isConnected ( )
overridevirtual

Checks if a central device is connected.

Returns
true if connected

Implements IBleKeyboard.

◆ print() [1/2]

void BleKeyboardAdapter::print ( const char *  text)
inlineoverridevirtual

Sends a text string.

Parameters
textString to send as keyboard input

Implements IBleKeyboard.

Definition at line 61 of file esp32/include/ble_keyboard_adapter.h.

◆ print() [2/2]

void BleKeyboardAdapter::print ( const char *  text)
overridevirtual

Sends a text string.

Parameters
textString to send as keyboard input

Implements IBleKeyboard.

◆ write() [1/4]

void BleKeyboardAdapter::write ( const MediaKeyReport  key)
inlineoverridevirtual

Sends a media key report.

Parameters
keyMedia key report to send

Implements IBleKeyboard.

Definition at line 54 of file esp32/include/ble_keyboard_adapter.h.

◆ write() [2/4]

void BleKeyboardAdapter::write ( const MediaKeyReport  key)
overridevirtual

Sends a media key report.

Parameters
keyMedia key report to send

Implements IBleKeyboard.

◆ write() [3/4]

void BleKeyboardAdapter::write ( uint8_t  key)
inlineoverridevirtual

Sends a single key press.

Parameters
keyUSB HID key code to send

Implements IBleKeyboard.

Definition at line 47 of file esp32/include/ble_keyboard_adapter.h.

◆ write() [4/4]

void BleKeyboardAdapter::write ( uint8_t  key)
overridevirtual

Sends a single key press.

Parameters
keyUSB HID key code

Implements IBleKeyboard.


The documentation for this class was generated from the following files: