mirror of
https://github.com/esphome/esphome.git
synced 2024-12-23 16:47:57 +01:00
Fix minor build issues with Arduino ESP32 2.0.0-rc1 (#2057)
This commit is contained in:
parent
f0d9ad6a4e
commit
66cdb761dc
@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include <HardwareSerial.h>
|
#include <HardwareSerial.h>
|
||||||
#include "esphome/core/esphal.h"
|
#include "esphome/core/esphal.h"
|
||||||
#include "esphome/core/component.h"
|
#include "esphome/core/component.h"
|
||||||
|
@ -12,7 +12,7 @@ uint8_t next_uart_num = 1;
|
|||||||
|
|
||||||
static const uint32_t UART_PARITY_EVEN = 0 << 0;
|
static const uint32_t UART_PARITY_EVEN = 0 << 0;
|
||||||
static const uint32_t UART_PARITY_ODD = 1 << 0;
|
static const uint32_t UART_PARITY_ODD = 1 << 0;
|
||||||
static const uint32_t UART_PARITY_EN = 1 << 1;
|
static const uint32_t UART_PARITY_ENABLE = 1 << 1;
|
||||||
static const uint32_t UART_NB_BIT_5 = 0 << 2;
|
static const uint32_t UART_NB_BIT_5 = 0 << 2;
|
||||||
static const uint32_t UART_NB_BIT_6 = 1 << 2;
|
static const uint32_t UART_NB_BIT_6 = 1 << 2;
|
||||||
static const uint32_t UART_NB_BIT_7 = 2 << 2;
|
static const uint32_t UART_NB_BIT_7 = 2 << 2;
|
||||||
@ -39,9 +39,9 @@ uint32_t UARTComponent::get_config() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (this->parity_ == UART_CONFIG_PARITY_EVEN)
|
if (this->parity_ == UART_CONFIG_PARITY_EVEN)
|
||||||
config |= UART_PARITY_EVEN | UART_PARITY_EN;
|
config |= UART_PARITY_EVEN | UART_PARITY_ENABLE;
|
||||||
else if (this->parity_ == UART_CONFIG_PARITY_ODD)
|
else if (this->parity_ == UART_CONFIG_PARITY_ODD)
|
||||||
config |= UART_PARITY_ODD | UART_PARITY_EN;
|
config |= UART_PARITY_ODD | UART_PARITY_ENABLE;
|
||||||
|
|
||||||
switch (this->data_bits_) {
|
switch (this->data_bits_) {
|
||||||
case 5:
|
case 5:
|
||||||
|
Loading…
Reference in New Issue
Block a user