OneWire.h 577 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * OneWire.h
  3. *
  4. * Created on: Feb 28, 2018
  5. * Author: sebastian
  6. */
  7. #ifndef ONEWIRE_H_
  8. #define ONEWIRE_H_
  9. #include <wiringPi.h>
  10. #include <stdio.h>
  11. #include <string.h>
  12. #include <errno.h>
  13. #include <inttypes.h>
  14. #include <unistd.h>
  15. #include "global.h"
  16. #include "logger.h"
  17. #define OW_PIN 5
  18. void OneWire_init(void);
  19. void OW_writeByte(uint8_t byte);
  20. uint8_t OW_readByte(void);
  21. uint8_t OW_touchByte(uint8_t data);
  22. void OW_block(uint8_t *data, uint8_t data_len);
  23. void OW_writeBit(uint8_t bit);
  24. uint8_t OW_readBit(void);
  25. uint8_t OW_reset(void);
  26. #endif /* ONEWIRE_H_ */