esp-rs / esp32-hal

A hardware abstraction layer for the esp32 written in Rust.
Apache License 2.0
192 stars 28 forks source link

Add analog module #14

Closed Gasper closed 4 years ago

Gasper commented 4 years ago

Analog module

This pull request brings API for using ADCs, DACs and hall sensor.

The examples build on the not-yet-merged serial API, so I'll keep this WIP, until that pull request is closed.

If you have any suggestions on how to improve the code, please let me know.

Tested

I tested the following:

I haven't tested:

Not included

Some functionality related to analog subsystem of the chip is not included in this PR: cosine-wave generator, touch sensors, vref/two-point calibration

Gasper commented 4 years ago

Now that serial is merged, I rebased this to master and quickly tested it. As far as I'm concerned, it's ready for review.

MabezDev commented 4 years ago

This looks great! Thank you!