Skip to content

Conversation

himanshufanibhare
Copy link

This pull request adds new drivers for DHT11/DHT22 temperature/humidity sensors and ModbusMaster RTU RS485 communication, along with their configuration headers and APIs. The changes provide flexible sensor and protocol support, backward compatibility, and integration with the platform's pin tool and documentation system.

Board Driver Additions

  • Introduced a new dhtxx_driver component for DHT11/DHT22 sensors with automatic protocol detection and pin tool integration, including backward-compatible names and platform documentation references.
  • Added a new modbusmaster_driver component for ModbusMaster RTU RS485 communication, supporting register reads, DE/RE pin control, and platform documentation references.

DHTXX Sensor Driver Implementation

  • Implemented the DHTXX driver in dhtxx.c supporting both DHT11 and DHT22 sensors, precise microsecond timing, automatic sensor type selection, and Arduino-style API functions for easy integration.
  • Provided a configuration header sl_dhtxx_config.h for selecting sensor type and configuring the data pin, with pin tool integration and sensor type definitions.
  • Added a public API header dhtxx.h defining types, main API functions, and backward compatibility typedefs.

ModbusMaster Driver Implementation

  • Added a configuration header sl_modbusmaster_config.h for ModbusMaster driver, allowing timeout, guard time, debug output, and DE/RE pin configuration via pin tool.
  • Provided a public API header modbusmaster.h defining buffer management, register read functions, error handling, and stream/pin control for ModbusMaster RTU communication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant