Giter VIP home page Giter VIP logo

stm32wb55's Introduction

stm32wb55

Build Status

This is an implementation of bluetooth-hci for STM32WB5x, based on BlueNRG reference implementation of bluetooth-hci.

It's using an embedded-hal implementation for low-level interaction.

This crate provides the vendor-specific Bluetooth HCI for STMicro's STM32WB5x family of wireless SoC. It extends bluetooth-hci with vendor-specific commands and events and associated error types.

Examples

Work in Progress

This crate is a work-in-progress. Thanks to STM32WB5x BLE stack sharing majority of HCI command set with the existing BlueNRG, this crate in its current state is already quite usable.

The essence of the work that should be done is to find differences in details of HCI command set implementation and fixing them.

stm32wb55's People

Contributors

eupn avatar tiwalun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

stm32wb55's Issues

intended form of zero in bitfields?

Hi,

I'm porting some code that sets the characteristic event flags. This is the following in C,

/* Gatt Event Mask
 * Type of event generated by GATT server
 * See aci_gatt_add_char.
 */
#define GATT_DONT_NOTIFY_EVENTS                       0x00 
#define GATT_NOTIFY_ATTRIBUTE_WRITE                   0x01
#define GATT_NOTIFY_WRITE_REQ_AND_WAIT_FOR_APPL_RESP  0x02
#define GATT_NOTIFY_READ_REQ_AND_WAIT_FOR_APPL_RESP   0x04

In the rust package, it's a bitfield: https://github.com/eupn/stm32wb55/blob/master/src/command/gatt.rs#L1565

    pub struct CharacteristicEvent: u8 {
        const ATTRIBUTE_WRITE = 0x01;
        const CONFIRM_WRITE = 0x02;
        const CONFIRM_READ = 0x04;
    }

What's the "intended" way of writing this, when you want to use the "zero" form? You can use a literal 0, but that's not as clear as the "CharacteristicEvent::NO_NOTIFY" or similar?

Try blocking HCI commands in examples

This would simplify the examples by getting rid of the HCI commands queue. This is a good case for async/.await, but the support is not there yet, so let's just block.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.