Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
GyverLibs committed Apr 30, 2024
1 parent 37283c7 commit 509114e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ gio::shift::send(3, 4, MSBFIRST, data, 4);
- v1.2.4 - исправлен баг в gio::shift::read для AVR NC
- v1.2.5 - добавлен возврат true в gio::shift::read при изменении буфера
- v1.3.0 - исправлена критическая ошибка AVR/mode/NC
- v1.3.1 - добавлен дополнительный delay в shift для симметричности клока
<a id="install"></a>
## Установка
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=GyverIO
version=1.3.0
version=1.3.1
author=AlexGyver <alex@alexgyver.ru>
maintainer=AlexGyver <alex@alexgyver.ru>
sentence=Fast GPIO operation functions for AVR, ESP8266, ESP32
Expand Down
4 changes: 4 additions & 0 deletions src/utils/shift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ bool read(uint8_t dat_pin, uint8_t clk_pin, uint8_t order, uint8_t* data, uint16
greg_set(c_reg, c_mask);
if (delay) delayMicroseconds(delay);
greg_clr(c_reg, c_mask);
if (delay) delayMicroseconds(delay);
}
if (!dif && *data != val) dif = 1;
*data = val;
Expand All @@ -50,6 +51,7 @@ bool read(uint8_t dat_pin, uint8_t clk_pin, uint8_t order, uint8_t* data, uint16
gio::high(clk_pin);
if (delay) delayMicroseconds(delay);
gio::low(clk_pin);
if (delay) delayMicroseconds(delay);
}
if (!dif && *data != val) dif = 1;
*data = val;
Expand Down Expand Up @@ -99,6 +101,7 @@ void send(uint8_t dat_pin, uint8_t clk_pin, uint8_t order, uint8_t* data, uint16
greg_set(c_reg, c_mask);
if (delay) delayMicroseconds(delay);
greg_clr(c_reg, c_mask);
if (delay) delayMicroseconds(delay);
}
}
greg_clr(d_reg, d_mask);
Expand All @@ -118,6 +121,7 @@ void send(uint8_t dat_pin, uint8_t clk_pin, uint8_t order, uint8_t* data, uint16
gio::high(clk_pin);
if (delay) delayMicroseconds(delay);
gio::low(clk_pin);
if (delay) delayMicroseconds(delay);
}
gio::low(dat_pin);
}
Expand Down

0 comments on commit 509114e

Please sign in to comment.