one_wire_slave_i.h 729 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * @file one_wire_slave_i.h
  3. *
  4. * 1-Wire slave library, internal functions
  5. */
  6. #pragma once
  7. #include <stdint.h>
  8. #include <stdbool.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. typedef struct OneWireDevice OneWireDevice;
  13. typedef struct OneWireSlave OneWireSlave;
  14. /**
  15. * Send data, called from emulated device
  16. * @param bus
  17. * @param address
  18. * @param data_length
  19. * @return bool
  20. */
  21. bool onewire_slave_send(OneWireSlave* bus, const uint8_t* address, const uint8_t data_length);
  22. /**
  23. * Receive data, called from emulated device
  24. * @param bus
  25. * @param data
  26. * @param data_length
  27. * @return bool
  28. */
  29. bool onewire_slave_receive(OneWireSlave* bus, uint8_t* data, const uint8_t data_length);
  30. #ifdef __cplusplus
  31. }
  32. #endif