mirror of
https://github.com/mytechnotalent/Embedded-Hacking.git
synced 2026-10-13 19:20:54 +02:00
Audit-clean C standard across all 5 cb challenges: fix 3 functions over 8 exec lines; rebuild bins; update CB-0x03 and CB-0x05 guides; verify all guides against new bins
This commit is contained in:
1 parent
4ade66738f
commit
23b9f628ef
51 files changed
+3744
-7904
No files matched your search
@@ -10,14 +10,33 @@
|
||||
|
||||
#ifndef DHT11_H
|
||||
#define DHT11_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define DHT11_PIN 14
|
||||
|
||||
typedef struct {
|
||||
uint8_t humidity_int;
|
||||
uint8_t humidity_dec;
|
||||
uint8_t temp_int;
|
||||
uint8_t temp_dec;
|
||||
uint8_t checksum;
|
||||
bool valid;
|
||||
} dht11_data_t;
|
||||
|
||||
/**
|
||||
* @brief Initialize the DHT11 data pin and idle the sensor high.
|
||||
* @param void No parameters.
|
||||
* @return void No return value.
|
||||
*/
|
||||
void dht11_init(void);
|
||||
|
||||
/**
|
||||
* @brief Perform a single-wire DHT11 read into the reading cache.
|
||||
* @param void No parameters.
|
||||
* @return dht11_data_t* Pointer to the current sensor reading.
|
||||
*/
|
||||
dht11_data_t* dht11_read(void);
|
||||
#endif
|
||||
|
||||
#endif // DHT11_H
|
||||
Reference in new issue
Block a user