Commit graph

276 commits

Author SHA1 Message Date
Ruslan V. Uss
546cc47121 Merge pull request #437 from ourairquality/oaq-merge-1
* bmp180: comment typo
* ds3231: minor code style fixes. Comment, on the week day start.
* Reverse engineered ets_timers.o Switch from FreeRTOS queue to task notification. Removed unknown/unused code. Rename sdk_ets_handler_isr to process_pending_timers. Add function for microseconds Simplify time to ticks conversion
* ets_timer: code for using the FreeRTOS timers, and remove from libs.
* libc: update to a recent newlib version.
* LwIP v2 support
* spi_write: use uint32_t for the page iteration counter. The page counter was using an uint8_t which seems unnecessary and might wrap.
* sysparam_get_bool: memcpy the binary values out.
* FreeRTOS 9.0.1
* Add an argument to ISRs. Disable interrupts while masking them.
* sysparam: reserve one more flash sector before placing the sysparams. This is to help work with recent SDKs that add a RF cal sector by default in the fifth last sector - just so the sysparam sectors do not jump around when using different SDK versions.
* upnp example: strip down the lwipopts.h file
* sysparam editor: accept newline to end a line of input.
* Add Wificfg. Uses the sysparam store to save the wifi configuration. Adds a basic http server for configuration.
* lwip: disable the tcpip_core_locking_input option. With this option enabled some lwip input processing occurs in the pp task which works well for some uses but some code uses a lot of stack (e.g. mdns) and will overflow the pp task stask, or might unnecessarily slow the critical pp task,
so disable this by default and if not already defined.
* sdk_cnx_add_rc: fix overflow of the table, when no match is found. Also adds source code for sdk_cnx_rc_search, adding a null pointer dereference. Check (that is not expected to be seen), and source code for sdk_cnx_remove_rc.
* http_get example: fix compilation with ipv6 disabled.
* lwip: update to master branch.
* wificfg: allow the AP channel to be 1.
* lwip: rework the tcp ooseq handling. It now accounts for the number of rx pool buffers used and the
available memory when deciding the number of ooseq buffers to retain. Enable the TCP Selective ACK support which appears to help a lot on lossy wifi when using the OOSEQ option.
* Update lwip, fixes losses of pcbs and associated problems.
* lwip: revise the tcp ooseq limit calulations. Was making a mess of the calculation sign. Also added a COPY_PP_RX_PBUFS define to include appropriate limits for this option.
* lwip: ooseq_max_bytes() - set a practical target memory size.
* lwip: revise ooseq handling. Modified for lwip backwards compatibility based on upstream feedback.
* lwip: update to the 2.0.3 release
* lwip: merge upstream master.
* libc: update to upstream master.
* lwip: fix building without TCP_QUEUE_OOSEQ
2017-10-02 04:50:35 +05:00
Zaltora
b83c2629b9 I2C bus upgrade (#432) 2017-09-01 14:29:32 +05:00
Our Air Quality
87994d3bb4 http_get example: fix compilation with ipv6 disabled. 2017-08-30 13:51:32 +10:00
Our Air Quality
b79da1f1f1 sysparam editor: accept newline to end a line of input. 2017-08-30 13:51:32 +10:00
Our Air Quality
8b0a1ae362 Add Wificfg
Uses the sysparam store to save the wifi configuration.
Adds a basic http server for configuration.
2017-08-30 13:51:32 +10:00
Our Air Quality
cd23acaa4a LwIP v2 support 2017-08-30 13:51:32 +10:00
Our Air Quality
1cfded6389 upnp example: strip down the lwipopts.h file 2017-08-30 13:51:32 +10:00
Our Air Quality
5583543f14 Add an argument to ISRs. Disable interrupts while masking them. 2017-08-30 13:51:32 +10:00
Our Air Quality
ec5dabd237 sysparam: reserve one more flash sector before placing the sysparams
This is to help work with recent SDKs that add a RF cal sector by
default in the fifth last sector - just so the sysparam sectors do not
jump around when using different SDK versions.
2017-08-30 13:51:32 +10:00
alex
3c050bc4d1 Upnp example emulating a Wemo switch 2017-07-20 20:23:52 +02:00
Ruslan V. Uss
e17b1a5db6 Merge pull request #410 from UncleRus/extras/ad770x
Driver for AD7705/AD7706 SPI ADC
2017-07-10 03:42:42 +05:00
UncleRus
ee7bd87011 Driver for AD7705/AD7706 SPI ADC 2017-07-07 03:50:50 +05:00
Our Air Quality
4737e3b438 Update mbed TLS to 2.5.1 2017-07-04 20:24:34 +10:00
Johan Kanflo
577d5e6895 Fix for #381 2017-05-16 16:12:55 +02:00
thanhpn
dbcb707c1c add pcf8591 lib + example 2017-04-25 23:57:40 +07:00
thanhpn
b982a132ae add 2017-04-23 15:35:23 +07:00
andree182
b3f658bdbf bh1750 i2c light sensor driver + pwm cleanup (#330)
Add bh1750 (I2C light sensor) driver + usage example
2017-04-01 05:20:37 +05:00
Brian Schwind
8b5ee93b55 Add a TSL4531 driver and example 2017-03-22 01:36:30 +09:00
Andrew Clink
03597d9162 Make FreeRTOS hooks weak; Add example 2017-03-20 12:56:17 -07:00
mr-nice
6b0547b963 Softuart (#307)
* extras/softuart: support for multiple UARTs, dynamic RX/TX pins
2017-03-06 23:28:20 +06:00
Zaltora
fda5d0b942 Crc fix and update (#347)
Update crc example API and config.
2017-02-27 22:35:56 +06:00
Zaltora
f51a2109b1 CRC library (#339)
* Crc initial example
* Update example and fix submodule
2017-02-22 01:44:03 +06:00
Milosch Meriac
398ed46776 Add BearSSL extra (#340)
Add BearSSL extra + http_get example, TLS server example
2017-02-15 17:44:11 +06:00
UncleRus
87b4befd87 MAX7219/MAX7221 dirver + example 2017-02-09 03:31:51 +05:00
lujji
bce2139f06 added WebSockets (#331) 2017-02-02 12:17:53 +06:00
lujji
f64935eb1d HTTP server (#324)
extras/httpd and http_server example
2017-01-27 14:38:01 +06:00
Zaltora
5eae1664e5 Ina3221 (#318)
INA3221 driver + example
2016-12-29 19:45:25 +05:00
UncleRus
b675ae6f29 Code style fixes for MS5611 2016-12-24 22:26:48 +05:00
mr-nice
34d783a289 Feature/ms561101ba03 (#308)
Driver for the ms561101ba03 barometric pressure sensor
2016-12-24 22:08:42 +05:00
UncleRus
e96fb4242e Driver for PCA9685 + example 2016-12-19 05:53:07 +05:00
Zaltora
7432c019f7 ssd1306 more functions (#310)
SSD1306 2D drawing/text functions, new example, builtin fonts support
2016-12-13 19:42:23 +06:00
UncleRus
a61af52d96 More convenient GPIO interrupt handlers 2016-11-30 01:07:46 +05:00
Ruslan V. Uss
53f85d0a2c Merge pull request #292 from UncleRus/extras/ads1115
ADS1113/ADS1114/ADS1115 I2C ADC driver + example
2016-11-29 11:37:50 +06:00
Ruslan V. Uss
b807eefeaf SSD1306 OLED Display driver refactored (#290)
* SSD1306 OLED Display driver SPI refactored:
- SPI connection support
- different display sizes support

* I2C address added to device descriptor

* Small fix
2016-11-29 00:57:22 +02:00
lilian
20ab2176fb fix tab 2016-11-26 15:14:40 +01:00
lilian
71bce674a0 Spi features 2016-11-26 12:19:53 +01:00
Our Air Quality
5c885c7722 sysparam: export the 'compact' function, added it to the editor. (#213) 2016-11-24 00:41:39 +02:00
UncleRus
690a4793a6 ADS1113/ADS1114/ADS1115 I2C DAC driver + example 2016-11-22 20:10:03 +05:00
UncleRus
16b38f94b0 Driver + example for MCP4725 12-bit I2C DAC 2016-11-21 21:28:08 +05:00
sheinz
7c702d7f09 Unit testing for esp-open-rtos (#253)
* Get testing system by projectgus working with master HEAD

* Fix running dual test. Add basic wifi test

* Moved spiff test to a test case. Reset retries in test runner

* Add timers test case

* test_runner: List test cases and run individual test cases

* Add README for tests

* Update README.md

* Code clean-up

* Python3.4 support. README.md update
2016-11-05 22:12:14 +02:00
Ruslan V. Uss
dda384f3a1 WiFi scan example (#265) 2016-11-05 12:19:36 +02:00
Ruslan V. Uss
4f7ddd09f8 DS1302 RTC driver (#258) 2016-11-05 12:12:16 +02:00
Our Air Quality
a5cc728079 FreeRTOS type updates. (#261) 2016-11-05 12:04:03 +02:00
Ruslan V. Uss
98de5e573a RTC drivers fix (#259) 2016-11-01 11:40:19 +02:00
urx
5b12ba54dc Driver and example for SSD1306 128x64 I2C display (#254) 2016-10-28 15:08:37 +03:00
Ruslan V. Uss
2ab9beb946 Extras/DHT improvements: makefile fix, replace DHT_TYPE macro by param (#252) 2016-10-26 16:41:08 +03:00
Ruslan V. Uss
574f944fbb Driver for HD44780 LCDs (#246)
Driver for HD44780 LCDs connected directly to GPIO / to I2C by PCF8574-like GPIO expanders (#246)
2016-10-26 16:21:55 +03:00
OurAirQuality
7bab80c33d FreeRTOS v9.0.0 upgrade 2016-10-25 23:35:51 +11:00
Ruslan V. Uss
f1d44f5cbe FatFs integration (SDIO backend) (#242) 2016-10-24 22:30:51 +03:00
Ruslan V. Uss
2994a566a6 Driver for SD/MMC cards (#239)
* Driver for SD/MMC cards

* SDIO: read_register() bug fixed, schematics resized
2016-10-20 10:03:05 +03:00
rus
4e7362f2d4 HMC5883L driver + example 2016-10-13 14:59:52 +05:00
sheinz
0a8c61ffb7 Merge pull request #235 from UncleRus/extras/ultrasonic
Driver for ultrasonic range meters + example
2016-10-13 00:50:55 +03:00
sheinz
36759a2da5 Merge pull request #232 from UncleRus/extras/ds1307
DS1307 RTC driver + example
2016-10-13 00:46:43 +03:00
UncleRus
f31ea70e1b Driver for ultrasonic range meters + example 2016-10-13 00:09:13 +05:00
UncleRus
8ded673ec3 DS1307 RTC driver + example 2016-10-12 23:57:24 +05:00
Brian Schwind
a323680115 Add a TSL2561 driver and example usage 2016-09-24 19:54:54 +09:00
Vlad Ivanov
8368929a66 paho_mqtt_c: refactor: rename symbols so they all have same prefix (#204)
* paho_mqtt_c: refactor: rename symbols so they all have same prefix

* Update AWS IOT example after MQTT refactoring
2016-09-15 19:52:57 +02:00
rongsaws
7041c014bb Added a MQTT pub/sub example of using AWS IoT (#173)
* Added a MQTT pub/sub example of using AWS IoT (via ECC based TLS1.2 connection).

* Fixed a buffer overflow issue when receiving large MQTT packet.

* Reset TLS connection on read/write errors.
2016-08-29 19:55:32 +02:00
Our Air Quality
fb33995bc4 sysparam editor: add echo-on and echo-off commands. (#199)
Helpful to be able to disable echo when sending commands fast, so that
the editor can consume them fast than they arrive. This adds 'echo-on'
and 'echo-off' commands to set the echo state.
2016-08-25 23:11:59 +02:00
sheinz
95081a1e9f Merge pull request #186 from ourairquality/bme280
BME280 support.
2016-08-19 10:31:21 +03:00
Johan Kanflo
40dc3bf945 Sysparam by @foogod (#180)
* Sysparam implementation

sysparam improvements

Mostly done, a few minor cleanups left.

Add sysparam_editor example

Sysparam code cleanup

Add documentation to sysparam.h

Fix up sysparam.h docs

Added a couple more debug statements

Fix potential memory leak if realloc() fails

Major sysparam overhaul

Add sysparam_get_info function

Add sysparam initialization to app_main.c

* Fixed warnings, added license
2016-08-18 12:07:46 +02:00
ourairquality
f0c43ff5d5 BME280 support.
The BME280 is close to compatible with the existing BMP280 and extends it with support for measuring humidity, so support has been bundled into the bmp280 driver.

The example now auto-detects the device and displays the humidity for the BME280.

The I2C bus initialization has been moved out of the bmp280 driver to support multiple devices.

The check-id and reset logic has been bundled into the driver initialization. It needs to be re-initialized after reset anyway and the chip-id is need to initialize it, just re-initialize to reset.

Support has been added for multiple devices. The calibration data storage needs to be managed by the caller rather than static data. The caller can choose the I2C address to allow two BMx280 devices to be used on the same I2C bus.

An interface has been added to return the measurement values in an integer fixed float format. The float format interface is still there.

All the values are read in one I2C transaction to ensure they are a consistent set.

Renamed bmp280_calib_t to bmp280_t, and removed read_register8.
2016-08-17 23:33:04 +10:00
sheinz
e96dc5c722 is2_audio: Example of using i2s_dma library to output audio 2016-08-16 11:16:02 +03:00
sheinz
666f821263 ws2812_i2s: WS2812 leds driver implementation using i2s_dma library 2016-08-16 10:53:56 +03:00
sheinz
5051c5c528 SPIFFS: Selectable configuration of SPIFFS 2016-08-08 23:18:15 +03:00
sheinz
964a2f850a Merge pull request #165 from ourairquality/bmp180-rework
bmp180: make a lower level interface available and support oversampling.
2016-08-06 00:39:43 +03:00
Bhuvanchandra
f388bbc7c4 examples: ds3231: Add simple example for ds3231
Simple example for reading out the time and temperature
from ds3231 RTC every second.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@gmail.com>
2016-08-03 01:23:43 +00:00
Johan Kanflo
083aa0451a Merge pull request #163 from sheinz/feature/spiffs
File system support. SPIFFS integration.
2016-08-02 15:42:22 +02:00
ourairquality
05bbe48bd4 bmp180: make a lower level interface available and support oversampling.
An application using multiple I2C devices will need it's own
loop. This reworks the code to make the detection, calibration
constant loading, and measurment functions available too without
having to use the bmp810 task which is still retained.

Adds support for oversampling.

Fixes a bug in the calculation of the temperature.

Better error handling. Checks for I2C errors and errors in the loading
of the calibration constants and propagates these up.
2016-07-20 18:42:51 +10:00
Angus Gratton
22c480b583 Merge pull request #160 from sheinz/feature/bmp280
BMP280 pressure sensor driver and example.
2016-07-19 08:22:14 +10:00
sheinz
924860a78f SPIFFS: Update example, README.md
Separate method to initialize SPIFFS memory buffers.
REDME.md for spiffs component.
Simplify spiffs example.
2016-07-15 15:22:03 +03:00
sheinz
df796947bd SPIFFS: Update README.md 2016-07-15 00:41:29 +03:00
sheinz
1db953e0c3 SPIFFS: Add speed test. 2016-07-15 00:08:34 +03:00
sheinz
22654a4de7 SPIFFS: Support lseek, stat, fstat
Support for lseek, stat, fstat added.
Test extended to covert those functions.
2016-07-14 16:13:03 +03:00
sheinz
6484c57737 Merge branch 'experiments/posix_fs' into feature/spiffs 2016-07-14 15:26:32 +03:00
sheinz
d25b8b2a55 Create SPIFFS image and flash it.
mkspiffs is added to create SPIFFS image from directory with files.
Build process changed to flash SPIFFS image if necessary
2016-07-14 14:49:34 +03:00
sheinz
5c12b7c7e9 Draft implementation of SPIFFS integration 2016-07-14 14:49:34 +03:00
Angus Gratton
b15b536e40 Merge pull request #154 from SuperHouse/open-libmain
First open_esplibs batch, libmain (most of libmain open sourced)
2016-07-14 07:29:28 +10:00
sheinz
440ad67834 BMP280 driver: Forced mode. Soft reset. 2016-07-07 23:39:25 +03:00
sheinz
4a2679271e BMP280 pressure sensor driver draft implementation. 2016-07-07 18:04:17 +03:00
sheinz
6ff78f802d DHT11/DHT22 library fixes.
Fixed temperature below zero.
Fixed checksum overflow verification.
Fixed inconsistent reading of DHT11.
2016-07-06 21:01:44 +03:00
sheinz
a41407e3d1 DHT11/22 library fix
Support DHT11/DHT22 modules.
Data representation fix.
Library refactoring.
2016-07-06 15:58:59 +03:00
Angus Gratton
678b59babf Honour values of configCPU_CLOCK_HZ & configTICK_RATE_HZ for tick rate
Fixes #147

* Can vary tick rate from 100Hz via configTICK_RATE_HZ. Note that the
  SDK binary libraries are hard-coded to assume the tick rate is 100Hz,
  so changing the tick rate may have unexpected consequences for lower
  layer WiFi behaviour (such as certain kinds of timeouts happening
  faster/slower.)

* Setting configCPU_CLOCK_HZ to 160MHz means ESP will set 160MHz during
  initialisation. Only 80MHz and 160MHz are supported.

* Timing of tasks is no longer affected by current CPU freq (whether set
  via configCPU_CLOCK_HZ or via sdk_system_update_cpu_freq().)
  Previously doubling the CPU frequency would double the tick rate.
2016-07-06 17:22:09 +10:00
Alex Stewart
8c9a77efe8 Added first half of RE'd user_interface.c 2016-07-06 17:21:34 +10:00
sheinz
0f9d991ba7 Fixed libc and SPIFFS integration. Test passes on ESP-12E module. 2016-06-30 22:18:07 +03:00
sheinz
b71a7ad237 Use SPIFFS for POSIX file access. Draft. Not tested. 2016-06-30 17:38:05 +03:00
sheinz
ab795350fb Draft implementation of SPIFFS integration 2016-06-27 18:06:06 +03:00
Johan Kanflo
3c875cc418 Call DisconnectNetwork(...) before MQTT reconnect 2016-06-21 20:43:02 +02:00
Angus Gratton
4b39a0e6ca Merge pull request #136 from SuperHouse/feature/ota_improvements
OTA improvements, always enable OTA mode
2016-05-28 12:46:58 +10:00
Angus Gratton
230aa9fd37 Add new "RAM" storage macro for putting constant data in RAM
Also update comments in common_macros.h following #142
2016-05-28 12:39:56 +10:00
Angus Gratton
7fe2020785 ota_basic example: Update TFTP client calls 2016-05-28 11:27:10 +10:00
Angus Gratton
d62fd4899a ota_basic example cleanup 2016-05-28 11:27:10 +10:00
Angus Gratton
d9202af2aa Use latest upstream rboot, always build with OTA - use prebuilt rboot if
none is compiled locally.
2016-05-28 11:27:10 +10:00
Angus Gratton
53b2b50241 rboot: Add cryptographic digest support for OTA images & SHA256 example 2016-05-28 11:27:10 +10:00
Angus Gratton
03559de5cb Move rboot_verify_image to rboot-api
Removes rboot-integration.c, removes need for clients to include rboot-integration.h
2016-05-28 11:27:10 +10:00
Angus Gratton
e671927bd0 OTA: Add TFTP client mode, expand ota_basic example. 2016-05-28 11:27:10 +10:00
Angus Gratton
3ba19d7c4e Merge pull request #137 from SuperHouse/feature/better_crash_dumps
Better crash dumps
2016-05-17 09:38:19 +10:00
Drasko DRASKOVIC
e7607ffc2b Add JSON support
This commits adds JSON support by adding Jsmn
(http://zserge.com/jsmn.html), a minimalistic JSON parser.

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2016-05-15 22:32:14 +10:00
Angus Gratton
36886412e6 Add abort() implementation
Also reduces the IRAM footprint of the fatal exception handler, as only
the prelude (which disables interrupts & enables the flash mapping) is
in IRAM now.

Closes #54, relevant to #133.
2016-05-15 22:30:01 +10:00
Angus Gratton
5809a0119b Merge pull request #114 from doragasu/sntp
Added sntp support and example
2016-05-15 20:42:35 +10:00