Commit graph

283 commits

Author SHA1 Message Date
rus
1d3ca574f1 Fix #471 2017-10-28 22:57:22 +05:00
Peter Dunshee
f8c87c3d6c Fix a typo in ssd1306 driver that prevents compiling with c++ compiler 2017-10-27 09:04:57 -05:00
Ruslan V. Uss
7cd1afc52d Merge pull request #465 from UncleRus/pcf8591_update
PCF8591 driver update
2017-10-25 13:01:40 +05:00
Sashka
09b8b8087c Add libesphttpd to extras and supporting example (#458)
* libesphttpd: added extras and example

* Added "heatshrink" as a submodule

* Updated libesphttpd

* Updated libesphttpd

* Trying to fix the commit id

* Updated libesphttpd

* Added zlib1g-dev package

* Use native gcc to build mkespfsimage and mkupgimg

* Added NS and GW for DHCP server configuration
2017-10-23 23:59:13 +02:00
Gunar Schorcht
ac6797e916 Driver for Sensirion SHT3x temperature and humidity sensor readded (#453)
* Driver for Sensirion SHT3x sensor added

This is a driver for Sensirion SHT3x temperature and humidity sensors
connected via I2C.

This commit is a rebasing and contains some interface changes based on
the review from @ourairquality.

* SHT3x driver changes

Additional include to satisfy the Travis CI test build

* SHT3x driver - small changes

README.md has been shortened

* SHT3x driver - small changes

* SHT3x driver - small changes

- crc8 lookup table is now static to be held in flash memory
- special handling for the timer overflow in sht3x_is_measuring removed
- initialization reduced to availability check

* SHT3x driver - some small changes

- crc8 lookup table is now static to be held in flash memory
- special handling for the timer overflow in sht3x_is_measuring removed
- some whitespace removed
- initialization reduced to availability check

* SHT3x driver - some minor changes

- lookup tables made const to be held in flash
- crc8 computation changed to a non table lookup version
- measurement duration is now given in ticks and can be used directly
  for vTaskDelay (documentation and examples changed accordingly)

* SHT3x driver - documentation changed

* SHT3x driver - minor correction

- number of ticks for measurement duration takes now into account
  portTICK_PERIOD_MS

* SHT3x driver - minor correction

- number of ticks for measurement duration takes now into account
  portTICK_PERIOD_MS

* SHT3x driver - minor correction

- number of ticks for measurement duration takes now into account
  portTICK_PERIOD_MS

* SHT3x driver - minor correction

- number of ticks for measurement duration takes now into account
  portTICK_PERIOD_MS

* SHT3x driver - minor corrections

* SHT3x driver - minor corrections

* Driver for Sensirion SHT3x sensor added

This is a driver for Sensirion SHT3x temperature and humidity sensors
connected via I2C.

This commit is a rebasing and contains some interface changes based on
the review from @ourairquality.

SHT3x driver changes

- additional include to satisfy the Travis CI test build
- README.md has been shortened
- special handling for the timer overflow in sht3x_is_measuring removed
- some whitespaces removed
- crc8 computation changed to a non table lookup version
- measurement duration is now given in ticks and can be used directly
  for vTaskDelay (documentation and examples changed accordingly)
- number of ticks for measurement duration takes now into account
  portTICK_PERIOD_MS
- clock stretching disabled on sensor to avoid blocking when data are
  not ready to read
- calculation of maesurement duration adds now one and a half ticks to
  be sure that measurement duration is not too short
- function sht3x_is_measuring is now private and only for internal use,
  user task has always to use function vTaskDelay to wait for
  measurement results
- function sht3x_is_measuring was simplified and returns now just a
  boolean value
- private function sht3x_reset added which is used to reset the sensor
  during initialization
- active flag in sensor data structure not needed anymore
- function sht3_get_raw_data simplified
- function sht3x_start_measurement returns now only a boolean
- function sht3x_start_measurement does not check anymore whether there is
  already a measurment running
- new function sht3x_get_measurement_duration which returns the measurement
  duration in ticks for configured repeatability

* SHT3x driver minor changes

- type sht3x_values_t replaced by separate float values
- additional repeatability parameter defined for function sht3x_start_measurement
- parameter of function sht3x_get_measurement_duration changed from
  sht3x_sensort_t to sht3_repeat_t
- sensor modes and repeatability levels extended by prefix sht3x_

* SHT3x driver minor changes

- new high level function sht3x_measure added, it comprises all three
  steps to perform one measurement in only one function
- example with two sensors removed

* SHT3x driver small correction
2017-10-23 23:39:48 +02:00
Ruslan V. Uss
5fa48d0298 Code formatted, minor fixes (#466) 2017-10-18 21:25:48 +02:00
Our Air Quality
8a474d749d wificfg: correct a few initialization issues (#464)
* Correct checking of the AP password and SSID lengths.

* Only enable AP mode if it is really configured enabled.

* Only start the http server if wifi is enabled.
2017-10-18 20:56:17 +02:00
Our Air Quality
ebdd2f983b lwip: define LWIP_POSIX_SOCKETS_IO_NAMES as zero (#457)
This patch gets the newlib standard stream descriptors playing well with the
lwip socket descriptors and the spiffs file descriptors. The LWIP_SOCKET_OFFSET
is now defined to be 3, rather than zero, to avoid clashing with the standard
stream descriptors, and the SPIFFS_FILEHDL_OFFSET is bumped up to start after
the lwip descriptors.
2017-10-18 19:33:32 +02:00
UncleRus
60b671ea44 Added DAC support to PCF8591 driver 2017-10-13 00:54:08 +05:00
Ruslan V. Uss
87a3503f93 I2C code formatting, README fix (#462) 2017-10-12 17:42:34 +05:00
UncleRus
62d99e1554 Revert #426 2017-10-11 15:38:31 +05:00
Ruslan V. Uss
715bc8148c Fix example broken by DHCP update (#461) 2017-10-11 03:21:47 +05:00
Fernando
cb4ea206fa DHCP Allows selecting the DHCP server's network interface (#426) 2017-10-10 22:01:32 +05:00
UncleRus
b58cd12f85 Minor fixes in dhcpserver.c 2017-10-10 20:01:07 +05:00
Erwin Boskma
e24b6579ff Added support for RGBW NeoPixels (#449) 2017-10-08 23:02:39 +05:00
Zaltora
68cc1451b2 example and dhcp debug (#447) 2017-10-08 11:47:23 +05:00
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
Our Air Quality
6080bb6ef2 libc: update to upstream master. 2017-09-21 23:44:24 +10:00
Zaltora
b83c2629b9 I2C bus upgrade (#432) 2017-09-01 14:29:32 +05:00
Our Air Quality
1bfa6c4364 wificfg: allow the AP channel to be 1. 2017-08-30 13:53:01 +10:00
Our Air Quality
5aabd643da ds3231: minor code style fixes.
Comment, on the week day start.
2017-08-30 13:51:32 +10:00
Our Air Quality
56a73454dd bmp180: comment typo 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
5583543f14 Add an argument to ISRs. Disable interrupts while masking them. 2017-08-30 13:51:32 +10:00
lilian
674c450416 Fix SPI3 protocol with SSD1306 2017-08-22 15:10:15 -03:00
Ruslan V. Uss
f51becd0a7 Merge pull request #433 from flannelhead/httpd-typedef-fix
httpd: add missing typedef
2017-08-05 01:34:04 +05:00
Sakari Kapanen
30920ce4ec httpd: add missing typedef 2017-08-04 07:18:42 +03:00
Our Air Quality
afa834a805 i2c: remove wip 400k define
Looks like this was test wip code that should not have been included.
Want to be able to set the i2c per-project rather than having to patch
the driver.
2017-08-02 10:36:06 +10: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
Ruslan V. Uss
497b4e607b Merge pull request #404 from ourairquality/bearssl2
Update BearSSL
2017-07-06 11:17:04 +05:00
Our Air Quality
178d0e381c Update BearSSL 2017-07-04 23:16:22 +10:00
Our Air Quality
4737e3b438 Update mbed TLS to 2.5.1 2017-07-04 20:24:34 +10:00
Fernando Governatore
c1747fb8da MQTT fix mqtt_timer_expired
If the user passes 0 as a timeout, we should not sleep(the timer has
already expired).
2017-07-03 15:50:54 -03:00
Fernando Governatore
67cd7bc031 MQTT fix mqtt_timer_left_ms
mqtt_timer_left_ms: timer->end_time is in ticks, now is in ticks, so left
is in ticks. left * portTICK_PERIOD_MS is the time left.

  With that change, the select in both mqtt_esp_read and mqtt_esp_write
seems to work as expected(with time, not ticks)
2017-07-03 15:50:54 -03:00
Fernando
ca110fa645 MQTT ignores too many handlers registered
On MQTTClient.c function mqtt_subscribe, if more than MQTT_MAX_MESSAGE_HANDLERS are registered, the variable rc receives the value of grantedQoS.

If grantedQoS = 0, and all handlers are already occupied, it goes on and returns 0 to the caller.
2017-06-19 21:31:09 -03:00
Luigi Freitas Cruz
5e3e69ba02 Change xTaskCreate priority.
Priority #1 appears not to be working. Priority #2 works just fine.
2017-06-05 19:29:04 -03:00
Ruslan V. Uss
c3482a8c01 Merge pull request #372 from panoti/feature/pcf8591
8-bit digital-to-analog conversion PCF8591 library
2017-05-10 03:31:55 +05:00
thanhpn
dbcb707c1c add pcf8591 lib + example 2017-04-25 23:57:40 +07:00
Michael Hamel
4b0acbe8bf Feature/mdnsresponder (#348)
Basic multicast-DNS service discovery responder
2017-04-25 19:00:09 +05:00
thanhpn
b982a132ae add 2017-04-23 15:35:23 +07:00
UncleRus
55e08de21c Fix for counter overflow in delays based on sdk_system_get_time() 2017-04-22 00:55:41 +05: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
sheinz
a91ec6eb61 sysparam fixes, tests, spi flash refactoring (#299)
Original work by @ourairquality
* Sysparam threadsafe and SPI access
* Sysparam test cases
* Fix for negative int8
* Sysparam getting bool without memory allocation. Bool tests.
* SPI flash refactoring.
* Extract common spiflash.c into core.
* Use spiflash.c in sysparam.
* Use memcpy in spiflash.c insted of hand-written version.
* Tests for spiflash.c
2017-03-22 02:18:04 +05:00
UncleRus
07ca0d2e9e Update I2C README 2017-03-22 02:14:06 +05:00
Brian Schwind
8b5ee93b55 Add a TSL4531 driver and example 2017-03-22 01:36:30 +09:00
Zaltora
813477aa8a I2c optimization and features (#321)
* custom delay
* Update comment
* add bus control status, add some missing include & fixed display output on sh1104 (#319)
* add some missing include
* Fixed display on SH1106
* Fix comment, add force sytem, rework flag, 16 bits data transfert
* Update all library with new I2C API
* custom delay
* Update comment, add bus control status
* fix i2c read + fix ds3231 temp + fix ssd1306 send
2017-03-21 11:41:47 +05:00
UncleRus
9300729533 FatFS update to R0.12c 2017-03-15 21:08:44 +05:00
funnydog
65a0c95b13 extras/sntp: fix an off-by-one bug in sntp_set_servers()
The function sntp_set_servers() duplicates the strings supplied in the
server_url[] array into new strings but forgets to allocate the extra
byte needed for the \0 terminator for each string.

Fix the problem by using strdup(), which allocates the right amount of
memory and copies the string at once.
2017-03-14 20:32:51 +01: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
3b5397f2a4 added support for large WebSocket frames 2017-02-03 07:33:27 +00: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
Tuan PM
ebfbc1144c Process recursive folder for spiffs images (#320)
* Process rercursive folder for spiffs images

* Flat file name from the directory structure

* change method to find '/' as the suggestion of @sheinz

* remove unused variable
2017-01-12 14:57:50 +02:00
Tuan PM
2b915c11c7 add some missing include & fixed display output on sh1104 (#319)
* add some missing include

* Fixed display on SH1106
2017-01-03 00:40:54 +02:00
Zaltora
5eae1664e5 Ina3221 (#318)
INA3221 driver + example
2016-12-29 19:45:25 +05:00
Zaltora
14c8ff57ca SPI3 support ssd1306 (#309)
SPI3 support, SH1106 port
2016-12-29 19:42:43 +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
Ruslan V. Uss
44124409e4 Merge pull request #315 from UncleRus/pca9685
Driver for PCA9685 + example
2016-12-21 10:38:00 +05:00
otopetrik
8f5d49de81 Allow changing write function of stdout (#304)
* Allow changing write function of stdout.

Required for stdout redirection.
Works on blocks, not chars - does _not_ use sdk_os_putc !
Should work even when linking with SPIFFS.
2016-12-19 20:55:26 +05:00
UncleRus
e96fb4242e Driver for PCA9685 + example 2016-12-19 05:53:07 +05:00
UncleRus
dc9b6a2988 Fix #313 2016-12-17 21:00:37 +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
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
sheinz
3ea18e74da ds18b20 fix for temperature below zero 2016-11-25 21:42:50 +02:00
Ruslan V. Uss
e7e6df6358 HTTP parser intergation (#263)
* HTTP parser intergation

* include path fixed
2016-11-23 17:58:02 +02:00
Zaltora
0d9094e443 Bmp280 option (#220)
* bmp280 more options
add option to user for temp oversampling and possibility to skipp a specific measure

* Update bmp280.h

* quick fix oups

* less redundant terms
2016-11-23 17:16:03 +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
Our Air Quality
bc50c7c2fc open_esplibs: add a skeleton for code in more libraries. (#266) 2016-11-12 20:54:24 +02:00
Ruslan V. Uss
99628cf314 DS1307 set month & weekday fix (#264) 2016-11-05 12:12:47 +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
4c84b64566 HD44780 documentation (#262) 2016-11-03 12:01:18 +02:00
sheinz
e2e6f35288 Fix spiff and stdin_uart_interrupt overiding the same read function (#249)
* Fix spiff and stdin_uart_interrupt overiding the same read function

* Make strong function defninition replace a weak one
2016-11-01 17:14:34 +02:00
Ruslan V. Uss
98de5e573a RTC drivers fix (#259) 2016-11-01 11:40:19 +02:00
DanielCerejo
8ef476c71f initialize dhcpserver_task_handle = NULL (#257)
corrert error printf "OTA TFTP" to "DHCP Server Error"
2016-10-30 11:26:29 +02:00
Ruslan V. Uss
5a14ab31e4 DS18x20: DS18S20 support, bugfixes (#255) 2016-10-28 15:29:47 +03:00
urx
5b12ba54dc Driver and example for SSD1306 128x64 I2C display (#254) 2016-10-28 15:08:37 +03:00
Ruslan V. Uss
e71919410d Add mkspiffs binary to .gitignore (#256) 2016-10-27 11:12:27 +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
sheinz
8840eb0411 Merge pull request #250 from UncleRus/extras/cpp_fix
Make headers in extras more cpp friendly
2016-10-24 23:41:42 +03:00
Ruslan V. Uss
f1d44f5cbe FatFs integration (SDIO backend) (#242) 2016-10-24 22:30:51 +03:00
UncleRus
57cb9b925c Make headers in extras more cpp friendly 2016-10-24 18:13:17 +05: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
6dea7abfc0 Add extern C declaration 2016-10-11 22:52:11 +09:00