mirror of
https://github.com/esphome/esphome.git
synced 2025-10-01 09:32:21 +01:00
Fix GPS time source. (#704)
* Change ESP32 default power_save_mode to light * Update
This commit is contained in:
@@ -291,12 +291,12 @@ void ICACHE_RAM_ATTR HOT ESP8266SoftwareSerial::write_byte(uint8_t data) {
|
||||
this->write_bit_(true, &wait, start);
|
||||
enable_interrupts();
|
||||
}
|
||||
void ESP8266SoftwareSerial::wait_(uint32_t *wait, const uint32_t &start) {
|
||||
void ICACHE_RAM_ATTR ESP8266SoftwareSerial::wait_(uint32_t *wait, const uint32_t &start) {
|
||||
while (ESP.getCycleCount() - start < *wait)
|
||||
;
|
||||
*wait += this->bit_time_;
|
||||
}
|
||||
bool ESP8266SoftwareSerial::read_bit_(uint32_t *wait, const uint32_t &start) {
|
||||
bool ICACHE_RAM_ATTR ESP8266SoftwareSerial::read_bit_(uint32_t *wait, const uint32_t &start) {
|
||||
this->wait_(wait, start);
|
||||
return this->rx_pin_->digital_read();
|
||||
}
|
||||
|
@@ -24,9 +24,9 @@ class ESP8266SoftwareSerial {
|
||||
protected:
|
||||
static void gpio_intr(ESP8266SoftwareSerial *arg);
|
||||
|
||||
inline void wait_(uint32_t *wait, const uint32_t &start);
|
||||
inline bool read_bit_(uint32_t *wait, const uint32_t &start);
|
||||
inline void write_bit_(bool bit, uint32_t *wait, const uint32_t &start);
|
||||
void wait_(uint32_t *wait, const uint32_t &start);
|
||||
bool read_bit_(uint32_t *wait, const uint32_t &start);
|
||||
void write_bit_(bool bit, uint32_t *wait, const uint32_t &start);
|
||||
|
||||
uint32_t bit_time_{0};
|
||||
uint8_t *rx_buffer_{nullptr};
|
||||
|
Reference in New Issue
Block a user