Commit Graph

179 Commits

Author SHA1 Message Date
chuck todd
6411ac4e3c Remove confusing Debug output. (#1574)
If Core Debug Level is at DEBUG, a confusing debug message will be emitted if the I2C transaction takes longer complete than the  calculated minimum time.  This original debug message was just to prove that this new i2c code could correctly handle SCL stretching or interrupt latency issues. This delay is not a problem, or an error.  Usually it is caused by a higher priory interrupt starving the i2c ISR.  Usually WiFi is the culprit.  As long of this delay is within the configured timeout (by default 50ms, or can be set with Wire.setTimeOut(milliseconds);) no problem will occur and the transaction will successfully complete.
Chuck.
2018-07-02 18:22:05 +02:00
Me No Dev
184bb069f2
Fix io16 io17 and PSRAM support (#1564)
* Add PSRAM init and malloc funtions

* Rebuild IDF libs
2018-06-30 23:06:50 +02:00
Me No Dev
a59eafbc9d
Update IDF to aaf1239 (#1539)
* fix sdmmc config

* Fix warnings in EEPROM

from @Curclamas

* remove leftover TAG in EEPROM

* Initial add of @stickbreaker i2c

* Add log_n

* fix warnings when log is off

* i2c code clean up and reorganization

* add flags to interrupt allocator

* fix sdmmc config

* Fix warnings in EEPROM

from @Curclamas

* remove leftover TAG in EEPROM

* fix errors with latest IDF

* fix debug optimization (#1365)

incorrect optimization for debugging tick markers.

* Fix some missing BT header

* Change BTSerial log calls

* Update BLE lib

* Arduino-ESP32 release management scripted (#1515)

* Calculate an absolute path for a custom partitions table (#1452)

* * Arduino-ESP32 release management scripted
(ready-to-merge)

* * secure env for espressif/arduino-esp32

* * build tests enabled
* gitter webhook enabled

* * gitter room link fixed
* better comment

* * filepaths fixed

* BT Serial adjustments

* * don't run sketch builds & tests for tagged builds

* Return false from WiFi.hostByName() if hostname is not resolved

* Free BT Memory when BT is not used

* WIFI_MODE_NULL is not supported anymore

* Select some key examples to build with PlatformIO to save some time

* Update BLE lib

* Fixed BLE lib

* Major WiFi overhaul

- auto reconnect on connection loss now works
- moved to event groups
- some code clean up and procedure optimizations
- new methods to get a more elaborate system ststus

* Add cmake tests to travis

* Add initial AsyncUDP

* Add NetBIOS lib and fix CMake includes

* Add Initial WebServer

* Fix WebServer and examples

* travis not quiting on build fail

* Try different travis build

* Update IDF to aaf1239

* Fix WPS Example

* fix script permission and add some fail tests to sketch builder

* Add missing space in WiFiClient::write(Stream &stream)
2018-06-27 09:01:06 +02:00
lbernstone
33392af315 Missing include gpio.h in esp32-hal-dac.h (#1512) 2018-06-19 11:33:17 +03:00
Ivan Grokhotkov
93c45af256 Use esp_timer_get_time as time source for micros and mills (#1424)
esp_timer_get_time returns monotonic time in microseconds, as a 64-bit
number. It can be called from tasks and interrupts, does not use any
critical sections/mutexes, and is thread safe.
2018-05-22 16:12:30 +02:00
mmone
dd639c4a02 Fix wrong range of duty cycle (#1353)
The esp-idf expects duty values for the the sigma delta modulator in the range of -128 to 127
The arduino framework is supposed to use the range 0-255 thus the offset caclulation was wrong.
2018-05-14 13:18:03 +02:00
Tim P
6bf7619ccc std::functioanl for WFIF event + Minor fix (#1366)
* add missing bits from esp8266 to help porting other libs

* Clean Up of Wifi event

* Exampl of Wifi Events
2018-05-14 13:05:49 +02:00
Craig Leres
c92b617397 Convert the few remaining cr/lf files to use lf for eol. (#1316)
If you develop on windows and need cr/lf files, see this:

    https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_formatting_and_whitespace

    Git can handle this by auto-converting CRLF line endings into LF
    when you add a file to the index, and vice versa when it checks out
    code onto your filesystem. You can turn on this functionality with
    the core.autocrlf setting. If you're on a Windows machine, set it
    to true - this converts LF endings into CRLF when you check out code:

    $ git config --global core.autocrlf true
2018-04-16 16:34:39 +02:00
chuck todd
1cf42702dd Add Hardware Reset when Initing I2C peripheral (#1201)
This change uses the `_RST` bit of the i2c peripheral to force the hardware into power on reset state.  The prior code assumed the peripheral was already in a reset, it just cleared the reset bit.  

Chuck.
2018-04-06 19:13:59 +03:00
mtabu
aa1288aa6e HardwareSerial - availableForWrite() support (#1226)
* HardwareSerial - availableForWrite() support

* fix indentation errors (tab vs space)
2018-04-06 19:07:46 +03:00
George Talusan
149190fe11 fix Arduino component build when CONFIG_ARDUHAL_ESP_LOG is turned off (#1228) 2018-04-06 19:06:53 +03:00
KEDARUMA FANTASTIC
c01e5563c8 serial global instance fix (#1243) 2018-04-06 19:02:59 +03:00
me-no-dev
835268c326 fix thread storage 2018-03-04 21:23:18 +01:00
chuck todd
7141e3e29d micros() returning inconsistend values when call from different tasks (#1165)
The cycle count that micros() is using to report timing is a PER Task value.  When micros() or delayMicroseconds() is called from different Tasks, the lastCycleCount value may have no relationship to the current Task specific cycleCount. If the current cycleCount is less than the saved lastCycleCount a rollover condition is assumed. This erroneous conditions results in incorrect delays and reported microseconds.  This fix creates thread local storage so that each Task will have accurate microsecond reporting and delays.  The reported microseconds are not real time, they are microseconds of the current Task execution.
2018-03-04 21:17:34 +01:00
Bernardo Ramos
0f9595e31e Fixes SPI mode setting (Issue #1094) (#1096)
Fixes #1094
2018-03-04 20:56:33 +01:00
Tom Ferrin
da46d0b264 FIX: getEfuseMac can return random data (#1059)
esp_efuse_mac_get_default() only stores into the bottom 6 bytes of it's 8-byte argument, so must initialize this arg to zero to avoid trash on the stack.
2018-03-04 20:35:14 +01:00
Kristian Sloth Lauszus
78acedd2cf Workaround strict-aliasing warnings and added missing pgm_read_ptr define (#996)
See: https://travis-ci.org/felis/USB_Host_Shield_2.0/jobs/328511332 and 8a02ea67f5 (diff-6e1ff9551639ac89d99617863bf84e10)
2018-01-18 01:02:20 +02:00
Me No Dev
600f4c4130
Update IDF to 1c3dd23
* Update mDNS and LEDC

* update toolchain

* Update IDF to 1c3dd23

* Advertise the board variant for Arduino OTA

* Add generic variant definition for mDNS
2018-01-18 00:56:58 +02:00
张雷
80a7d6084b fix enable ADC on pin37,38 (#822) 2017-11-10 13:27:00 +02:00
copercini
3dc30dce81 Add compatibility macros with esp8266 (#783) 2017-10-30 10:27:26 +01:00
Me No Dev
55289a45af Update IDF to 9274814 (#767)
* Update IDF to 9274814

* Fix error in i2c and Arduino
2017-10-24 00:21:00 +02:00
Jason K
11565343e6 Merge branch 'master' into master 2017-10-23 14:40:33 -04:00
chuck todd
a695187de8 Correct 10bit Device address handling.
The existing code did not follow protocol with 10bit addressed devices.  Per _Philps/NXP Semiconductors UM10204 I2C-bus specification and user manual Rev. 6 4April2014_ pg.15 3.1.11 10-bit addressing:
~The first seven bits of the first byte are the combination of 1111 0xx of which the last two bits (xx) are the two Most-Significant Bits (MSB) of the 10-bit address; the eighth bit of the first byte is the R/!W! bit the determines the direction of the message~
2017-10-21 13:14:14 -06:00
Jason K
1270f40066 Add initial handling for long I2C reads. 2017-10-21 08:26:46 -04:00
chuck todd
7eff707ba6 Fix Early return when Address NAK is received (#750)
The i2cWrite() function was returning to the app before the i2c transaction had completed.  This caused the next Wire() call to return a I2C_ERROR_BUSY.
2017-10-21 08:40:53 +02:00
me-no-dev
409c75da04 Implement ESP_LOGx override option
Usable for library developers who write code not dependent on Arduino.
Adding 3 lines to the includes will permit their debug messages to be
visible in Arduino IDE or when enabled under IDF
2017-10-14 00:06:55 +03:00
Ewald Wasscher
e6a5b68e40 Added argument to HardwareSerial.begin to specify whether the logic levels of the UART rx and tx lines should be inverted (#719) 2017-10-13 11:46:56 +03:00
me-no-dev
0fa25c09ef Fix possible leak in String
Fixes: https://github.com/espressif/arduino-esp32/issues/710
2017-10-12 06:52:35 +03:00
chuck todd
2f0cfa92cd Update pgmspace.h (#707)
Fix redefines of strXXX, original was using strnXXX with length set to 0x7fffffff.  This caused problems with strcpy and strcat. The destination buffer was NULL'd to 0x7fffffff which killed the app.
2017-10-09 06:38:42 +03:00
Testato
8dc0c86457 Chip revision fix (#704)
* Chip revision fix

https://www.esp32.com/viewtopic.php?f=2&t=1358&sid=f77cd62ec254317f3bbb30d8ab75ca2a&start=10

* using of esp_chip_info instead of register reading
2017-10-08 14:48:50 +03:00
copercini
171032b701 Print an error when serial number is invalid (#691)
* Print error when serial number is invalid

* Move to the first check, change end by return
2017-10-04 11:12:21 +08:00
Luc
d208a36836 Use correct sign of offset for TZ variable (#685)
Use UTC instead of CDT for consistency
2017-10-01 10:19:00 +08:00
me-no-dev
28be506ce3 uncomment I2C debug so it can be used 2017-09-29 21:24:06 +08:00
Jason K
0cd62852da I2c reset functionality (#678)
* Addition of a i2cReset method and timeout handling for the case where the i2c hardware FSM (state machine) gets stuck in a busy state.

* Use newly added i2cReset function within the wire library.
2017-09-29 21:17:13 +08:00
me-no-dev
af35773d65 OK Really change timer allocator 2017-09-28 18:38:07 +08:00
me-no-dev
17ece1bccd Revert Timer Interrupt setup 2017-09-28 18:22:35 +08:00
me-no-dev
6d98555658 Change timer interrupt allocator 2017-09-28 16:45:08 +08:00
me-no-dev
f9b2d42a61 Change Touch interrupt allocator 2017-09-28 16:44:47 +08:00
me-no-dev
7991161f06 Change Pin Interrupt Allocator 2017-09-28 12:27:10 +08:00
me-no-dev
db77195404 Fix Serial 2017-09-27 13:50:05 +08:00
me-no-dev
d27d297195 Update IDF to c4e65d6 2017-09-22 17:28:54 +08:00
me-no-dev
e2bd93c092 Fix UART0 not able to read/available 2017-09-22 14:17:25 +08:00
me-no-dev
c66a020e80 Add guards to not compile BT code if not enabled 2017-09-21 19:08:18 +08:00
Luc
4092fc409e Add baudRate function (#651)
usefull for ESP8266 compatibility
2017-09-21 17:00:12 +08:00
me-no-dev
db79c2ee95 Add api to get CPU temperature
Fixes: https://github.com/espressif/arduino-esp32/issues/563
Fixes: https://github.com/espressif/arduino-esp32/issues/625
Source:
https://github.com/pcbreflux/espressif/blob/master/esp32/arduino/sketchb
ook/ESP32_int_temp_sensor/ESP32_int_temp_sensor.ino
2017-09-18 17:47:06 +08:00
me-no-dev
ab0ea2f6da Fix missing method from SPI HAL
Fixes: https://github.com/espressif/arduino-esp32/issues/640
2017-09-18 12:14:41 +08:00
me-no-dev
9fc3f1ebdd Fix wrong SPI peripheral enabled
Related: https://github.com/espressif/arduino-esp32/issues/634
2017-09-13 17:21:34 +03:00
me-no-dev
39fb8c3044 Fix header deprecation 2017-09-12 09:42:14 +03:00
me-no-dev
59a6800cdf Enable clocks for UART1 and 2
Recent change in IDF disables those clocks at boot. This change should
help with that.

Fixes: https://github.com/espressif/esp-idf/issues/975
2017-09-10 20:24:41 +03:00
Mark D
234c855c9b add configTzTime() to setup sntp using TZ environment variable (#608) 2017-09-05 11:15:55 +03:00