Using __attribute__((alias("dht_read"))) reduce code size.
This commit is contained in:
parent
87341547d7
commit
c56659e84d
|
@ -188,37 +188,25 @@ int dht_read(uint8_t pin)
|
|||
// DHTLIB_OK
|
||||
// DHTLIB_ERROR_CHECKSUM
|
||||
// DHTLIB_ERROR_TIMEOUT
|
||||
inline int dht_read21(uint8_t pin)
|
||||
{
|
||||
return dht_read(pin);
|
||||
}
|
||||
int dht_read21(uint8_t pin) __attribute__((alias("dht_read")));
|
||||
|
||||
// return values:
|
||||
// DHTLIB_OK
|
||||
// DHTLIB_ERROR_CHECKSUM
|
||||
// DHTLIB_ERROR_TIMEOUT
|
||||
inline int dht_read22(uint8_t pin)
|
||||
{
|
||||
return dht_read(pin);
|
||||
}
|
||||
int dht_read22(uint8_t pin) __attribute__((alias("dht_read")));
|
||||
|
||||
// return values:
|
||||
// DHTLIB_OK
|
||||
// DHTLIB_ERROR_CHECKSUM
|
||||
// DHTLIB_ERROR_TIMEOUT
|
||||
inline int dht_read33(uint8_t pin)
|
||||
{
|
||||
return dht_read(pin);
|
||||
}
|
||||
int dht_read33(uint8_t pin) __attribute__((alias("dht_read")));
|
||||
|
||||
// return values:
|
||||
// DHTLIB_OK
|
||||
// DHTLIB_ERROR_CHECKSUM
|
||||
// DHTLIB_ERROR_TIMEOUT
|
||||
inline int dht_read44(uint8_t pin)
|
||||
{
|
||||
return dht_read(pin);
|
||||
}
|
||||
int dht_read44(uint8_t pin) __attribute__((alias("dht_read")));
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
//
|
||||
|
|
|
@ -54,10 +54,10 @@ int dht_read_universal(uint8_t pin);
|
|||
int dht_read11(uint8_t pin);
|
||||
int dht_read(uint8_t pin);
|
||||
|
||||
inline int dht_read21(uint8_t pin);
|
||||
inline int dht_read22(uint8_t pin);
|
||||
inline int dht_read33(uint8_t pin);
|
||||
inline int dht_read44(uint8_t pin);
|
||||
int dht_read21(uint8_t pin);
|
||||
int dht_read22(uint8_t pin);
|
||||
int dht_read33(uint8_t pin);
|
||||
int dht_read44(uint8_t pin);
|
||||
|
||||
double dht_getHumidity(void);
|
||||
double dht_getTemperature(void);
|
||||
|
|
Loading…
Reference in New Issue