* @brief Write 1-Wire data byte. * NOTE: The data is shifted out of the low bits, eg. it is written in the order of lsb to msb * @param[in] bus Initialised bus instance. * @param[in] data Value to write. * @param[in] number_of_bits_to_read bits to write */
| 214 | * @param[in] number_of_bits_to_read bits to write |
| 215 | */ |
| 216 | static owb_status _write_bits(const OneWireBus * bus, uint8_t data, int number_of_bits_to_write) |
| 217 | { |
| 218 | for (int i = 0; i < number_of_bits_to_write; ++i) |
| 219 | { |
| 220 | _write_bit(bus, data & 0x01); |
| 221 | data >>= 1; |
| 222 | } |
| 223 | |
| 224 | return OWB_STATUS_OK; |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * @brief Read 1-Wire data byte from bus. |
nothing calls this directly
no test coverage detected