Update ds18b20.h

Added "extern C" to make the library compatible with C++.
This commit is contained in:
David Lehrian 2021-10-12 11:52:12 -07:00
parent 2ae3b7a6e3
commit 17ba05606c

View file

@ -39,6 +39,12 @@ static const uint8_t dscrc2x16_table[] = {
0x8C, 0x11, 0xAF, 0x32, 0xCA, 0x57, 0xE9, 0x74
};
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
void ds18b20_init(int GPIO);
#define ds18b20_send ds18b20_write
@ -70,4 +76,10 @@ float ds18b20_get_temp(void);
void reset_search();
bool search(uint8_t *newAddr, bool search_mode);
/* *INDENT-OFF* */
#ifdef __cplusplus
}
#endif
/* *INDENT-ON* */
#endif