[FL-3179] 1-Wire Overdrive Mode (#2522)

* Separate ibutton to its own module, add one_wire to f18
* Move onewire cli to a separate app
* Add definitions for normal and overdrive timings
* Update api definitions
* Add rough overdrive timings definition for onewire emulation
* Remove one_wire_host_timing.h
* Add rough overdrive timings for onewire host
* Improve overdrive mode
* Working overdrive mode from flipper to flipper
* Update thermometer example app
* Turn on otg power when running thermometer example app
* Implement reset overdrive switching
* Always exit out of overdrive mode
* Improve overdrive timings
* Fix typos
* Fix reset behaviour
* Use overdrive mode everywhere in DS1996
* Improve comments
* Bump API version

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Georgii Surkov
2023-03-22 17:54:06 +03:00
committed by GitHub
parent 1f236ede0e
commit 8b224ecb15
16 changed files with 397 additions and 227 deletions

View File

@@ -87,10 +87,16 @@ bool dallas_ds1992_write_copy(OneWireHost* host, iButtonProtocolData* protocol_d
DS1992_SRAM_DATA_SIZE);
}
static void dallas_ds1992_reset_callback(void* context) {
static bool dallas_ds1992_reset_callback(bool is_short, void* context) {
furi_assert(context);
DS1992ProtocolData* data = context;
data->state.command_state = DallasCommonCommandStateIdle;
if(!is_short) {
data->state.command_state = DallasCommonCommandStateIdle;
onewire_slave_set_overdrive(data->state.bus, is_short);
}
return !is_short;
}
static bool dallas_ds1992_command_callback(uint8_t command, void* context) {