mirror of
https://github.com/feelfreelinux/ds18b20.git
synced 2025-12-05 18:20:33 -08:00
Update ds18b20.h
Added "extern C" to make the library compatible with C++.
This commit is contained in:
parent
2ae3b7a6e3
commit
17ba05606c
1 changed files with 12 additions and 0 deletions
12
ds18b20.h
12
ds18b20.h
|
|
@ -39,6 +39,12 @@ static const uint8_t dscrc2x16_table[] = {
|
||||||
0x8C, 0x11, 0xAF, 0x32, 0xCA, 0x57, 0xE9, 0x74
|
0x8C, 0x11, 0xAF, 0x32, 0xCA, 0x57, 0xE9, 0x74
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
void ds18b20_init(int GPIO);
|
void ds18b20_init(int GPIO);
|
||||||
|
|
||||||
#define ds18b20_send ds18b20_write
|
#define ds18b20_send ds18b20_write
|
||||||
|
|
@ -70,4 +76,10 @@ float ds18b20_get_temp(void);
|
||||||
void reset_search();
|
void reset_search();
|
||||||
bool search(uint8_t *newAddr, bool search_mode);
|
bool search(uint8_t *newAddr, bool search_mode);
|
||||||
|
|
||||||
|
/* *INDENT-OFF* */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue