Files
esphome-lsm6ds/esphome/components
0haxandGuillermo Ruffino fb2b7ade41 Uart improvments (#1024)
* uart: Add support for specifying the number of bits and parity.

ESP8266SwSerial doesn't really check parity but just read the parity bit
and ignore it when receiving data.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: support begin and end methods.

A component may need to reset uart buffer/status by using begin() and
end() methods. This is useful for example when a component needs to be
sure it is not reading garbage from previously received data over uart.
For end() methods with software serial, disabling interrupt is
currently impossible because of a bug in esp8266 Core:
https://github.com/esp8266/Arduino/issues/6049

Signed-off-by: 0hax <0hax@protonmail.com>

* esphal: add support for detaching an interrupt.

That's needed when a component needs to enable/disable interrupt on a
gpio.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: rename CONF_NR_BITS to CONF_DATA_BITS_NUMBER.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: use static const uint32_t instead of #define.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: use an enum to handle parity.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: split between esp32 and esp8266.

Signed-off-by: 0hax <0hax@protonmail.com>

* uart: check_uart_settings for parity and number of data bits.

Signed-off-by: 0hax <0hax@protonmail.com>

* name param data_bits

* add new params to test

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-05-24 18:59:07 -03:00
..
2019-04-22 21:56:30 +02:00
2020-04-10 00:07:18 -03:00
2019-05-27 13:06:45 +02:00
2019-12-07 18:28:55 +01:00
2019-12-07 18:28:55 +01:00
2020-03-21 15:31:07 -03:00
2019-04-22 21:56:30 +02:00
2020-04-30 23:00:57 -03:00
2019-10-13 13:51:34 +02:00
2019-05-08 10:17:08 +02:00
2019-10-31 20:31:58 +01:00
2020-05-19 21:13:50 -03:00
2019-05-15 20:57:29 +02:00
2019-04-22 21:56:30 +02:00
2019-04-22 21:56:30 +02:00
2019-05-15 10:55:35 +02:00
2019-11-16 16:34:11 +01:00
2019-10-23 14:43:41 +02:00
2019-06-03 16:07:15 +02:00
2019-12-07 18:28:55 +01:00
2019-04-22 21:56:30 +02:00
2019-12-07 18:28:55 +01:00
2019-05-08 10:17:08 +02:00
2019-04-22 21:56:30 +02:00
2019-05-08 10:17:08 +02:00
2019-12-07 18:28:55 +01:00
2019-05-12 23:04:36 +02:00
2019-05-24 16:34:01 +02:00
2020-05-01 18:53:41 -03:00
2019-04-22 21:56:30 +02:00
2019-12-07 18:28:55 +01:00
2019-10-19 16:16:49 +02:00
2020-01-12 16:38:40 +01:00
2019-12-07 18:28:55 +01:00
2019-04-22 21:56:30 +02:00
2019-12-04 19:30:10 +01:00
2019-10-20 17:56:57 +02:00
2019-12-07 18:28:55 +01:00
2019-12-07 18:28:55 +01:00
2019-12-07 18:28:55 +01:00
2019-12-07 18:28:55 +01:00
2019-04-22 21:56:30 +02:00
2019-04-24 23:49:02 +02:00
2019-10-21 22:55:27 +02:00
2019-12-07 18:28:55 +01:00
2020-05-01 20:05:09 -03:00
2019-11-26 18:31:33 +01:00
2019-10-17 16:18:41 +02:00
2019-12-30 22:02:55 -03:00
2019-10-27 12:30:36 +01:00
2019-04-22 21:56:30 +02:00
2019-12-07 18:28:55 +01:00
2020-02-09 13:20:56 +01:00
2019-05-27 13:06:45 +02:00
2019-04-22 21:56:30 +02:00
2019-12-07 18:28:55 +01:00
2019-05-12 23:04:36 +02:00
2019-12-07 18:28:55 +01:00
2019-05-11 11:40:29 +02:00
2020-01-04 12:43:11 +01:00
2019-12-07 18:28:55 +01:00
2019-05-12 23:04:36 +02:00
2019-05-26 10:31:29 +02:00
2019-11-12 21:44:20 +01:00
2020-03-12 13:37:57 -07:00
2019-10-23 14:43:41 +02:00
2019-12-07 18:28:55 +01:00
2019-12-10 11:09:35 +01:00
2019-04-22 21:56:30 +02:00
2019-04-22 21:56:30 +02:00
2020-03-11 17:39:40 -07:00
2019-10-20 16:15:30 +02:00
2019-06-28 11:29:37 +02:00
2019-10-31 20:31:58 +01:00
2019-06-08 17:45:55 +02:00
2019-10-17 16:36:11 +02:00
2019-04-22 21:56:30 +02:00
2019-04-22 21:56:30 +02:00
2019-12-07 18:28:55 +01:00
2019-12-07 18:28:55 +01:00
2019-10-23 14:43:41 +02:00
2019-12-07 18:28:55 +01:00
2019-12-07 18:28:55 +01:00
2020-05-18 20:10:03 -03:00
2020-03-12 14:25:00 -07:00
2019-05-13 20:45:22 +02:00
2019-05-13 13:05:30 +02:00
2019-11-12 19:04:39 +01:00
2020-05-24 18:59:07 -03:00
2019-04-22 21:56:30 +02:00
2019-10-23 14:43:41 +02:00
2019-10-20 17:56:57 +02:00
2019-05-08 09:58:03 +02:00
2020-04-21 22:53:14 -03:00
2019-05-08 10:17:08 +02:00