stm32-rs | Embedded Rust device crates for STM32 microcontrollers
kandi X-RAY | stm32-rs Summary
Support
Quality
Security
License
Reuse
- Parse a device
- Expand cluster nodes
- Get the value of the tag
- Get the value of the specified tag from the node
- Process a device
- Process a YAML file
- Parse a svdf file
- Parse a peripheral device
- Produce HTML table for debugging
- Generate an html page
- Return an html table of the details
- Return HTML table of fields
- Make a string representation of the given registers
- Generate HTML page for device
- Parse the peripheral register
- Return a list of device rows
- Read device table
- Generate a text description for each device
- Generate index page
- Process svdf file
stm32-rs Key Features
stm32-rs Examples and Code Snippets
Trending Discussions on stm32-rs
Trending Discussions on stm32-rs
QUESTION
For a hobby project using the stm32f1xx-hal, I'm wanting to periodically read a sensor and then push the values such that I can graph them realtime in a webUSB app.
I have found an example in webusb_blinky by mvirkkunen which demonstrates the connectivity portion, but it's not clear to me how I would adapt it to publish sensor values. Should I be overriding control_in
?
Any suggestions/help would be appreciated. Thanks!
ANSWER
Answered 2020-Mar-23 at 18:44You could define a control transfer that requested the device respond with the current sensor values but the more natural USB mechanism for publishing sensor updates is with an IN endpoint.
The usbd-serial module is the best example I can find of creating and using endpoints with this framework. A serial port consists of both an IN and OUT endpoint for bidirectional streaming of data. For your application you would only need the IN endpoint since the device only generates data.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install stm32-rs
You can use stm32-rs like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesExplore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits
Save this library and start creating your kit
Share this Page