12#include <furi_hal_gpio.h>
18typedef struct OneWireDevice OneWireDevice;
21typedef bool (*OneWireSlaveResetCallback)(
bool is_short,
void* context);
22typedef bool (*OneWireSlaveCommandCallback)(uint8_t command,
void* context);
23typedef void (*OneWireSlaveResultCallback)(
void* context);
103 OneWireSlaveResetCallback callback,
117 OneWireSlaveCommandCallback callback,
128 OneWireSlaveResultCallback result_cb,
void onewire_slave_set_reset_callback(OneWireSlave *bus, OneWireSlaveResetCallback callback, void *context)
Set a callback function to be called on each reset.
Definition one_wire_slave.c:245
void onewire_slave_start(OneWireSlave *bus)
Start working with the bus.
Definition one_wire_slave.c:229
void onewire_slave_set_result_callback(OneWireSlave *bus, OneWireSlaveResultCallback result_cb, void *context)
Set a callback to report emulation success.
Definition one_wire_slave.c:264
OneWireSlave * onewire_slave_alloc(const GpioPin *gpio_pin)
Allocate OneWireSlave instance.
Definition one_wire_slave.c:211
void onewire_slave_stop(OneWireSlave *bus)
Stop working with the bus.
Definition one_wire_slave.c:237
void onewire_slave_free(OneWireSlave *bus)
Destroy OneWireSlave instance, free resources.
Definition one_wire_slave.c:222
void onewire_slave_set_overdrive(OneWireSlave *bus, bool set)
Enable overdrive mode.
Definition one_wire_slave.c:372
void onewire_slave_set_command_callback(OneWireSlave *bus, OneWireSlaveCommandCallback callback, void *context)
Set a callback function to be called on each command.
Definition one_wire_slave.c:254
bool onewire_slave_send(OneWireSlave *bus, const uint8_t *data, size_t data_size)
Send one or more bytes of data.
Definition one_wire_slave.c:326
bool onewire_slave_receive_bit(OneWireSlave *bus)
Receive one bit.
Definition one_wire_slave.c:273
bool onewire_slave_receive(OneWireSlave *bus, uint8_t *data, size_t data_size)
Receive one or more bytes of data.
Definition one_wire_slave.c:347
bool onewire_slave_send_bit(OneWireSlave *bus, bool value)
Send one bit.
Definition one_wire_slave.c:293
Gpio structure.
Definition furi_hal_gpio.h:161
Definition one_wire_slave.c:31