open_earable_protocols 0.0.2 copy "open_earable_protocols: ^0.0.2" to clipboard
open_earable_protocols: ^0.0.2 copied to clipboard

Generated binary protocol bindings for OpenEarable devices.

example/open_earable_protocols_example.dart

import 'package:open_earable_protocols/open_earable_protocols.dart';

void main() {
  final start = AudioResponseTransferControl.start(
    AudioResponseTransferStart(
      transfer_id: 1,
      total_samples: 4,
      sampling_rate: 16000,
      checksum: 0x12345678,
    ),
  );
  final chunk = AudioResponseTransferChunk(
    transfer_id: 1,
    sample_offset: 0,
    sample_count: 4,
    samples: [0, 1000, 0, -1000],
  );

  print('start bytes: ${start.toBytes()}');
  print('chunk bytes: ${chunk.toBytes()}');
}
0
likes
150
points
57
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Generated binary protocol bindings for OpenEarable devices.

Repository (GitHub)
View/report issues

Topics

#bluetooth #binary-protocol #openearable

License

MIT (license)

More

Packages that depend on open_earable_protocols