Skip to content

Commit ef7bc15

Browse files
committed
more copilot doxygen comments
1 parent 3b5827b commit ef7bc15

File tree

1 file changed

+35
-8
lines changed

1 file changed

+35
-8
lines changed

src/sfeTk/sfeDevSoilMoisture.h

+35-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
/*
2-
*---------------------------------------------------------------------------------
1+
/**
2+
* @file sfeDevSoilMoisture.h
3+
* @brief Header file for the soil moisture sensor class
34
*
4-
* Copyright (c) 2025, SparkFun Electronics Inc.
5+
* This file contains the class definition for the soil moisture sensor, including
6+
* methods for initialization, reading moisture values, controlling the on-board LED,
7+
* and setting the I2C address.
58
*
6-
* SPDX-License-Identifier: MIT
9+
* @author SparkFun Electronics
10+
* @date 2025
11+
* @copyright Copyright (c) 2025, SparkFun Electronics Inc.
12+
* @license MIT
713
*
8-
*---------------------------------------------------------------------------------
14+
* SPDX-License-Identifier: MIT
915
*/
16+
1017
// Actual implementation of the soil moisture sensor - this is a platform "independent" implementation
1118

1219
#pragma once
@@ -20,12 +27,27 @@
2027
#include <sfeTk/sfeTkII2C.h>
2128
#include <sfeTk/sfeTkISPI.h>
2229

23-
// Default I2C address for the sensor
30+
/**
31+
* @brief Default I2C address for the soil moisture sensor
32+
*
33+
* This macro defines the default I2C address (0x28) used by the soil moisture sensor.
34+
*/
2435
#define SFE_SOIL_MOISTURE_DEFAULT_I2C_ADDRESS 0x28
2536

26-
// Max value for the sensor value (10-bit ADC) 2^10 = 1024-1
37+
/**
38+
* @brief Maximum value for the soil moisture sensor
39+
*
40+
* This macro defines the maximum value (1023) for the soil moisture sensor,
41+
* which corresponds to the highest reading from the 10-bit ADC. 2^10 = 1024-1
42+
*/
2743
#define SFE_SOIL_MOISTURE_MAX_VALUE 1023
2844

45+
/**
46+
* @brief Class representing the soil moisture sensor
47+
*
48+
* This class provides an interface to the soil moisture sensor, allowing for
49+
* initialization, reading moisture values and controlling the on-board LED.
50+
*/
2951
class sfeDevSoilMoisture
3052
{
3153

@@ -129,7 +151,12 @@ class sfeDevSoilMoisture
129151
uint8_t address(void);
130152

131153
protected:
132-
// The toolkit bus the sensor is connected to
154+
/**
155+
* @brief The toolkit bus the sensor is connected to
156+
*
157+
* This member variable holds a pointer to the bus interface (I2C or SPI) used
158+
* for communication with the soil moisture sensor.
159+
*/
133160
sfeTkIBus *_theBus;
134161

135162
}; // class sfeDevSoilMoisture

0 commit comments

Comments
 (0)