1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 22:53:59 +00:00

CCS811 support (#536)

* CCS811

* Move define, add test

* Remove sun artifact

* Lint

* Lint
This commit is contained in:
Otto Winter
2019-05-13 13:06:14 +02:00
committed by GitHub
parent 855e9367d4
commit 0281914507
9 changed files with 255 additions and 0 deletions

View File

@@ -127,6 +127,11 @@ uint8_t reverse_bits_8(uint8_t x);
uint16_t reverse_bits_16(uint16_t x);
uint32_t reverse_bits_32(uint32_t x);
/// Encode a 16-bit unsigned integer given a most and least-significant byte.
uint16_t encode_uint16(uint8_t msb, uint8_t lsb);
/// Decode a 16-bit unsigned integer into an array of two values: most significant byte, least significant byte.
std::array<uint8_t, 2> decode_uint16(uint16_t value);
/** Cross-platform method to disable interrupts.
*
* Useful when you need to do some timing-dependent communication.