Commit Graph

80 Commits

Author SHA1 Message Date
devsaurus 8bc2e8aa19 Enable -std=gnu11 for user dir 2016-03-24 00:06:09 +01:00
devsaurus 23137b4ed1 Add support for GPIO open-drain output mode. 2016-03-17 00:21:28 +01:00
philip 6efbf13eae Omit all the PWM code if the PWM module is not included 2016-03-01 21:55:21 -05:00
Terry Ellison 00cc4b42dc Merge pull request #1067 from pjsg/rotarymod
Module to handle rotary decoders
2016-03-01 16:36:24 +00:00
Terry Ellison d883f2c4be Merge pull request #1088 from TerryE/dev-dis-smart-wifi
Make the wifi.smart functions options and remove wofs and upgrade
2016-03-01 16:34:00 +00:00
philip dbaad1b81c Add call to get_pin_map() in pwms_init()
Move get_pin_map() into platform_init
2016-03-01 09:18:36 -05:00
philip d40ee50a8e Squashed commit of the following:
commit 2c7c3fc3985cc32866e8af496abea9971eaee90a
Merge: 9179dae 41022c3
Author: philip <philip@gladstonefamily.net>
Date:   Sun Feb 28 14:47:47 2016 -0500

    Merge remote-tracking branch 'upstream/dev' into rotary_2

commit 9179dae0824e6b35ad09e5113aacc26dc91692c0
Author: philip <philip@gladstonefamily.net>
Date:   Fri Feb 26 20:53:27 2016 -0500

    Review comments

commit 67741170e20ccb2b636e701f0664feff2aafbb4c
Author: philip <philip@gladstonefamily.net>
Date:   Fri Feb 26 20:59:49 2016 -0500

    Squashed commit of the following:

    commit 8c9a64731c4a8b9aedda18a399b433b173d2199f
    Merge: 085935f 19d3c1d
    Author: philip <philip@gladstonefamily.net>
    Date:   Fri Feb 26 20:58:10 2016 -0500

        Merge remote-tracking branch 'upstream/dev' into rotarymod

        Conflicts:
        	app/platform/platform.c

    commit 085935fc56986d607ff5e05d1663970331959c34
    Author: philip <philip@gladstonefamily.net>
    Date:   Fri Feb 26 20:53:27 2016 -0500

        Review comment

    commit 7732fd2d1044f28b8fcf5b0aa0f76d76fe80f449
    Author: philip <philip@gladstonefamily.net>
    Date:   Sat Feb 20 12:10:38 2016 -0500

        Module to handle rotary decoders

        Eliminate ROTARY_DEBUG

        Remove unused file

Eliminate a malloc call

Cleaned up the register code. Now 0x114 bytes

Fix bug with clearing bits in one case

Fix the type in the #define name
2016-02-29 08:21:12 -05:00
TerryE 46ea2aa42e Make the wifi.smart functions options and remove wofs and upgrade
AFAIK no one uses the wifi.startsmart() and wifi.stopsmart().  Removing
them frees up an extra 20-25K of Flash to use as filesystem.  So I have
added a new config define WIFI_SMART_ENABLE which is enabled by default
so the default functionality is the same, but if this is commented out
then this code is omitted.

I have also removed wofs and upgrade from this build as we no longer
support these.
2016-02-26 17:23:38 +00:00
philip 72d8c73763 Made level triggers work better than before
Move the level trigger to be after the callback
2016-02-25 08:38:25 -05:00
dnc40085 9a8edd8ae8 Fix inconsistency between flash_init_data in flash_api.c and
esp_init_data_default.bin in SDK 1.51
2016-02-23 01:22:41 -08:00
Arnim Läuger 8743319b02 Merge pull request #1000 from devsaurus/sigma_delta
Add sigma_delta module.
2016-02-20 20:11:42 +01:00
devsaurus 8982650df9 Add sigma_delta module. 2016-02-18 21:35:58 +01:00
philip 669543bbf2 Hardware timer support and convert the PWM module to use it 2016-02-17 21:07:33 -05:00
TerryE 49733f6f6d Add New Tasking I/F and rework GPIO, UART, etc to support it
As with the last commit this rolls up the follwowing, but include the various
review comments on the PR.

-   **Documentation changes**. I've added the taks FAQ as a stub new Extension
developer FAQ, and split the old FAQ into a Lua Developer FAQ and a Hardware
FAQ.

-   **Tasking I/F**.  New `app/task/Makefile`, `app/task/task.c`,
`app/include/task/task.h` and `app/Makefile` as per previous commit.  Cascade
changes to `app/driver/uart.c`, `app/include/driver/uart.h`,
`app/user/user_main.c` and `app/modules/node.c`

-   **GPIO Rework** to `app/modules/gpio.c` and `pin_map.[hc]`, `platform.[hc]`
in `app/platform`

-   **Other Optimisations** Move the `platform_*_exists()` from
`app/platform/common.c` to static inline declarations in `platform.h` as
this generates faster, smaller code. Move lgc.a routines out of iram0.
2016-02-17 17:13:17 +00:00
devsaurus c88f0bd3f8 Enable UART baudrate 256000 in platform layer. 2016-02-15 21:40:20 +01:00
devsaurus dc2e1efefb Extend data type for spi miso/mosi buffer offset to 16 bit. 2016-02-09 22:05:05 +01:00
devsaurus 0c3fc6cc78 enable -std=gnu11 for platform dir 2016-01-22 23:21:34 +01:00
Johny Mattsson 0cd287e67b Added -Wimplicit to modules build.
Plus associated fixes.
2016-01-22 10:55:57 +11:00
Johny Mattsson 182d45f928 Enable -std=gnu11 for modules dir.
Plus boat-load of fixes to actually make that build.
2016-01-20 19:40:47 +11:00
Huang Rui f2e6c9366b Sync flash_api.c with flash_api.h 2015-12-30 09:49:01 +08:00
Huang Rui 7737d36f24 Update flash_api.h due to flash size map is redefined by espressif. 2015-12-30 09:46:43 +08:00
devsaurus 6cbe716db0 uart: fix parity and stopbit generation 2015-12-21 17:51:43 +01:00
Terry Ellison 1462d00e9f Merge pull request #842 from jmattsson/module-ltr-cleanup
Cleanup: LTR module registration
2015-12-19 23:22:18 +00:00
TerryE b773290b8c Major cleanup of module registration pass 2.
carrying on Johny's edits as per my comments on #810
2015-12-16 11:21:40 +11:00
Johny Mattsson d84a24fc9a Proper cached-flash to phys address translation. 2015-12-12 13:20:22 +11:00
Johny Mattsson c4e8b04fbf Cleaned up all uses of INTERNAL_FLASH_START_ADDRESS.
There was only one genuine use of this macro, all other places were
using it only as a necessary compensation. While this was fine as long as
it was the first meg of flash which was mapped, it became incorrect and
quite dangerous whenever this assumption did not hold (such as when
running from the second slot in an OTA scenario).

The flash API now uses actual addresses, not translated/mapped
addresses, and the users of this API have been adjusted accordingly.
This makes the flash API work correctly regardless of what flash mapping
is in use.

The old macro is still available under the new name
INTERNAL_FLASH_MAPPED_ADDRESS, and this is used to detect flash writes
where the source is mapped flash (and thus has to be bounced), and to
adjust the _flash_used_end linker symbol when used with
flassh_find_sector() by the filesystem code. The latter usage is not
OTA-proof, but in an OTA scenario the filesystem needs a fixed location
anyway and thus would not use this code path.
2015-12-12 13:20:22 +11:00
Terry Ellison 32b2911263 Merge pull request #746 from DiUS/vdd33
Remove adc.readvdd33() limitation.
2015-12-01 23:37:53 +00:00
btsimonh b2345857e9 Added uart.alt(n) to swap to use alternate rx/tx lines.
if n = 0 -> std pinout.
if n != 0 -> alternate pinout (gpio13 and gpio15)
2015-11-28 22:51:01 +00:00
Johny Mattsson 1e3c231630 Fix esp_init_data_default inconsistencies.
Make ADC vs readvdd33 option user_config.h configurable for the init data,
and made readvdd33 the default.
2015-11-12 12:57:07 +11:00
devsaurus 52d6be5299 Merge pull request #705 from devsaurus/dev-fdplx
Update full-duplex for SPI module
2015-10-28 23:36:39 +01:00
devsaurus 9444ae28df simplify spi api
duplex_mode configuration enables/disables receiving with spi.send()
spi.send_recv removed
2015-10-27 23:30:33 +01:00
Vowstar 38b494c07e Merge pull request #702 from devsaurus/dev-fdplx
Add full-duplex support to SPI module
2015-10-27 14:34:13 +08:00
Johny Mattsson b535be7ab8 Fix WDT resets during file.format().
With the new SDK soft-wdt it is no longer sufficient to tickle the hardware
watchdog, so all (found) instances have been changed to system_soft_wdt_feed().
2015-10-27 14:33:22 +11:00
devsaurus 7d77398921 introduce full/half duplex transactions and add spi.send_recv() 2015-10-25 22:58:06 +01:00
devsaurus 19092712e5 remove obsolete spi_mast_send and rename platform_spi_send 2015-10-18 11:13:56 +02:00
devsaurus 28a04cc9c1 remove obsoleted constants for databit length 2015-10-18 11:13:56 +02:00
devsaurus f238673772 rework of (H)SPI API 2015-10-18 11:13:55 +02:00
devsaurus 9cde0bbb83 add SPI transaction support 2015-10-18 11:13:55 +02:00
Johny Mattsson 38cc84d2fc Removed gpio pulldown references.
The ESP never supported internal pulldowns, and the SDK now matches reality.
2015-10-12 13:26:04 +11:00
devsaurus ac50f9c6a5 add divider for arbitrary HSPI clock frequencies 2015-10-04 00:40:21 +02:00
Johny Mattsson 9f9b323fb5 Ensure flash write bounce buffer is used if source is also flash.
When using the flash write API, the flash is unmapped/uncached, and as
such it's not possible to source data directly from flash (e.g. string
literals).
2015-08-04 16:30:54 +10:00
Bernd Meyer 1259f8d776 Deal with unaligned destination parameter to flash read
(Occurs e.g. when SPIFFS cache is disabled.)

Implementation mirrors the existing handling in the write path.
2015-08-04 16:30:46 +10:00
vowstar 899935e60b Add DHT Lua Module for interfacing with the DHTxx sensors (xx = 11-21-22-33-44). 2015-06-18 16:31:40 +08:00
Vowstar 749e71d9cb Fixed strange SPI flash API error. Added word_of_aligned_array. 2015-05-05 23:59:30 +08:00
funshine 1c2ee75a00 fix mqtt, do a format when wrong flash size is detected 2015-04-03 00:51:02 +08:00
funshine e1f8b604a0 fix init_data detect flash api 2015-03-24 23:21:40 +08:00
funshine 52ca40b8ea add init.lua examples 2015-03-22 21:09:37 +08:00
HuangRui 5c84359b5c ROM flash size can changed with detected size, fixed #283. 2015-03-16 05:40:43 +08:00
HuangRui f7eed2b53b Changed e9 to magic_e9. 2015-03-16 01:44:54 +08:00
HuangRui 4e7473bc00 Fixed flash automatic detection bug. Support 128MBit flash. 2015-03-16 01:05:06 +08:00