Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
🗑️ Deprecate package notice (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
kammce authored Oct 31, 2024
1 parent 58360b1 commit 19304a8
Showing 1 changed file with 17 additions and 25 deletions.
42 changes: 17 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# libhal-soft
# [DEPRECATED] libhal-soft

> [!CAUTION]
> This package is deprecated. The following files repos now have their own
> versions of each of these files. Prefer to use these.
>
> - `libhal-expander`
> - `adc_mux.hpp`
> - `libhal-util`
> - `atomic_spin_lock.hpp`
> - `bit_bang_i2c.hpp`
> - `bit_bang_spi.hpp`
> - `i2c_minimum_speed.hpp`
> - `inverter.hpp`
> - `libhal-actuator`
> - `rc_servo.hpp`
[![✅CI](https://github.com/libhal/libhal-soft/actions/workflows/ci.yml/badge.svg)](https://github.com/libhal/libhal-soft/actions/workflows/ci.yml)
[![GitHub stars](https://img.shields.io/github/stars/libhal/libhal-soft.svg)](https://github.com/libhal/libhal-soft/stargazers)
Expand All @@ -7,30 +22,7 @@

Library for generic soft drivers officially supported by libhal

Soft drivers are drivers that do not have any specific underlying hardware associated with them. They are used to emulate, give context to, or alter the behavior of interfaces. For a driver to be a soft driver it must implement or have a way to generate, construct or create implementations of hardware interfaces.

Emulation Example

---

- Emulate spi by using 2 output pins and 1 input pin.
- Emulate uart transmission with a 16-bit spi driver and some clever bit positioning.

Context Example

---

- Implement a rotary encoder by using an adc, a potentiometer and some specification of the potentiometer like min and max angle, along with min and max voltage.
- Implement a dac using multiple output pins and a set of resistors and an op amp.

Alteration example

---

- Implement an input pin that inverts the readings of an actual input pin
- Implement an i2c driver that is thread safe by taking an i2c and locking mechanism provided by the user.

In general, software drivers tend to incur some overhead so nesting them deeply will effect performance.
Soft drivers are drivers that combine hardware interfaces together to emulate the behavior of other interfaces. For a driver to be a soft driver it must implement or have a way to generate, construct or create implementations of hardware interfaces.

## Contributing

Expand Down

0 comments on commit 19304a8

Please sign in to comment.