Commit graph

283 commits

Author SHA1 Message Date
Kewal Shah
c4f15a0e5d ledc_get_duty return type changed from int to uint32_t, target_duty changed from int to uint32_t 2017-09-13 01:43:42 +08:00
Ivan Grokhotkov
23f10e1a57 Merge branch 'feature/uart_software_flow_control' into 'master'
uart: Add api call to switch on hardware support for 'software' flow control. (github #890)

See merge request !1215
2017-09-12 12:11:11 +08:00
Ivan Grokhotkov
de038f502c Merge branch 'feature/gpio_channel_macro' into 'master'
feat(global): add macros for GPIO->channel lookup

See merge request !1170
2017-09-11 12:15:08 +08:00
Ivan Grokhotkov
e12967297d Merge branch 'feature/docs_touch_pad_api' into 'master'
Touch Pad driver overview

See merge request !1195
2017-09-08 11:55:27 +08:00
Ivan Grokhotkov
3c470e7c43 Merge branch 'bugfix/rmt' into 'master'
RMT 2 fixes: Rename one API and specify wait_time in another API

See merge request !896
2017-09-07 18:03:08 +08:00
michael
08b9fbc242 feat(global): add macros for GPIO->channel lookup
including: macros for dac, adc, touch, rtc_gpio, uart and clk_out.

TW#13970
2017-09-07 10:40:25 +08:00
Alex Burr
93cc3a77cb uart: Add api call to switch on hardware support for 'software' flow control.
Cherry-picks https://github.com/espressif/esp-idf/pull/890
2017-09-05 16:30:21 +10:00
krzychb
ba42c46cb3 Touch Pad driver overview 2017-09-05 08:28:44 +02:00
Ivan Grokhotkov
b38186dc43 sdmmc: use periph_ctrl to enable peripheral when initializing the host 2017-09-04 22:43:52 +08:00
Ivan Grokhotkov
956a28a95c driver: add periph_ctrl support for SDMMC, SDIO slave, CAN, EMAC 2017-09-04 22:43:51 +08:00
michael
b834fcf78a fix(spi_master): this fix the SPI MOSI output missing bug. 2017-09-04 22:43:51 +08:00
Jeroen Domburg
fe140fe347 Fix off-by-one in 5MBaud arg checking; propagate errors better 2017-09-01 12:15:28 +08:00
Ivan Grokhotkov
1cfe96b1d7 Merge branch 'bugfix/i2s_dac_channel' into 'master'
fix(i2s_dac): fix the disable function which only disables DAC_CHANNEL_1.

See merge request !1169
2017-08-31 10:45:30 +08:00
Ivan Grokhotkov
b4857fc159 Merge branch 'bugfix/memory_issues_pr838' into 'master'
vfat, i2s, mdns: Fix two memory leaks, one double free (github #838)

See merge request !1173
2017-08-31 10:45:19 +08:00
Angus Gratton
96f9ae3e30 Merge branch 'bugfix/minor_prs_github' into 'master'
Minor bugfixes and corrections from github

See merge request !1181
2017-08-31 07:11:30 +08:00
Angus Gratton
4f812eb29c Remove redundant code line from uart.c
Merges part of https://github.com/espressif/esp-idf/pull/650
2017-08-30 17:55:00 +10:00
Simon Werner
c8d8fb58e7 Fixed incorrect value in comments for GPIO_NUM_33.
Merges https://github.com/espressif/esp-idf/pull/676
2017-08-30 17:55:00 +10:00
Henrik Maier
95fe7929c0 Fix spinlock bug for uart_set_rts and uart_set_dtr
Merges https://github.com/espressif/esp-idf/pull/649
2017-08-30 15:32:23 +10:00
Quentin Thérond
36eccee213 i2s: fix leak in i2s_create_dma_queue if we have a malloc issue. 2017-08-30 12:11:03 +10:00
Darian Leung
88b05f9391 esp_adc_cal: Added ADC calibration component
Added component containg API that is able to correct raw ADC readings
into a voltage in mV. Also provided a helper function that combines
the process of getting the raw ADC1 reading then converting it to a
voltage in mV. In doing so, the adc1_get_voltage() function of the ADC
driver has been deprecated. Instead there is now adc1_get_raw to obtain
the raw ADC1 reading, and adc1_to_voltage() that gets the raw reading
and converts all in one function. Functions using the deprecated
adc1_get_voltage() have also been updated to use adc1_get_raw().

Conversion is based on ADC characteristics. The characteristics are based
on the ADC's v_ref, herefore the appropriate structure and functions have
been provided to obtain the ADC characteristics.

The existing ADC driver has also been modified by adding a function to
route the internal ADC reference voltage to a GPIO allowing users to measure
it manually.

Relevant documentation has also been updated
2017-08-29 18:43:14 +08:00
michael
9ec3757349 fix(i2s_dac): fix the disable function which only disables DAC_CHANNEL_1. 2017-08-29 15:31:39 +08:00
Jeroen Domburg
edbeee8326 Merge branch 'bugfix/spi_def_typo_lsbfirst' into 'master'
bugfix(spi_master): fix the definition of ``SPI_DEVICE_BIT_LSBFIRST``.

See merge request !1154
2017-08-29 11:24:31 +08:00
Ivan Grokhotkov
3161854efb Merge branch 'bugfix/spi_hd_rx' into 'master'
fix(spi_dma_rx): add check to avoid using SPI half-duplex mode DMA with both MOSI and MISO phases.

See merge request !1111
2017-08-28 17:36:58 +08:00
Ivan Grokhotkov
b636f81619 Merge branch 'bugfix/spi_command' into 'master'
fix(spi_master): fix the command field to make it more intuitive to use.

See merge request !1119
2017-08-28 10:29:56 +08:00
michael
0cb14f1648 fix(spi_dma_rx): add check to avoid using SPI half-duplex mode DMA with both MOSI and MISO phases. 2017-08-26 02:15:30 +08:00
michael
dd1e6ea296 typo(spi_master): fix the definition of `SPI_DEVICE_BIT_LSBFIRST`.
also fix the documentation of spi_device_transmit.
2017-08-26 02:04:37 +08:00
Wang Jia Lin
f1ecffb46c Merge branch 'bugfix/touch_pad_driver' into 'master'
driver(touch): fix bug and add more features

See merge request !1056
2017-08-23 19:12:39 +08:00
Ivan Grokhotkov
2861f3e88e Merge branch 'bugfix/spi_dma_align' into 'master'
fix(spi_dma): fix the receive error with RX DMA start with non-aligned address.

See merge request !1112
2017-08-22 23:39:53 +08:00
Wangjialin
842caaab21 driver(touch): fix bug and add more features
1. add sens_struct.h
2. add definition of RTCCNTL and RTCIO
3. modify touch pad examples
4. update example code.
5. add comments add option in menuconfig
6. fix issue that pad index 8 and 9 are mismatched
7. add touch_pad_read_filtered() api to get value filtered by iir filter
8. modify touch pad isr func
9. Make the items in perihperal.ld in the sequence of address
10. delete Kconfig for touch pad
11. add touchpad filter APIs to adjust the filter
12. add touch_pad into index.rst
13. add touch_pad in Doxyfile
14. add touch_pad.rst
2017-08-22 21:21:39 +08:00
michael
4c9754726f fix(spi_master): fix the command field to make it more intuitive to use. 2017-08-21 20:37:57 +08:00
michael
a01db5569c fix(spi_dma): fix the receive error with RX DMA start with non-aligned address. 2017-08-18 10:14:49 +08:00
Ivan Grokhotkov
6baf8195ee sdmmc: add support for high speed (HS) mode
By default SD cards are initialized in default speed (DS) mode. Enabling
HS mode requires SWITCH_FUNC command to be sent twice: first time to
query if the card supports switching to HS mode, second time to perform
the switch.

This change implements SWITCH_FUNC command and adds the procedure to
switch to HS mode.
2017-08-16 18:59:04 +08:00
Ivan Grokhotkov
f908425b13 sdmmc: introduce is_app_cmd flag, check it along with opcode
‘make_hw_cmd’ function checks opcodes in a few cases. Comparing opcode
does not tell the whole story, because for some SD commands there is are
APP commands with the same opcodes. This change introduces a flag which
indicates whether the next command is going to be an APP command.
The check for APP_SET_BUS_WIDTH command is updated to use this flag.
This fixes a bug with an unexpected STOP_TRANSMISSION command sent after
SWITCH_FUNC command, which has opcode 6, same as APP_SET_BUS_WIDTH.
2017-08-16 18:59:04 +08:00
Ivan Grokhotkov
e6258ac6cb sdmmc: don’t flip word order in MMC_RSP_BITS
MMC_RSP_BITS helper function had a hack that it flipped word order in
the response, assuming that response size is 4 words. This hack does not
work for responses which are not 4 words long (such as the SWITCH_FUNC
response, which is 64 words long).

This change removes the hack and the matching word order reversal code
in sdmmc driver.
2017-08-16 18:59:04 +08:00
Ivan Grokhotkov
159a2d01d1 Merge branch 'bugfix/spi_dma' into 'master'
bugfix(spi_master): fix several issues when using RX DMA

See merge request !1006
2017-08-16 18:55:25 +08:00
Nilay Sheth
0eb59844bb bugfix(driver): fix RMT issues from github
1. Rename api from rmt_get_ringbuf_handler to rmt_get_ringbuf_handle (Github Issue #274)
2. doxygen param rename
3. change API rmt_wait_tx_done to specify maximum waiting time
4.Change return type of rmt_wait_tx_done API from bool to esp_err_t
5. update doc
2017-08-15 17:23:51 +08:00
michael
ed1d084aea fix(spi_master): make the address field more intuitive to use.
The address field should be placed at the highest bits of address and slv_wr_status registers. Instead of breaking the address into two parts and fill in each register, move the address to the highest bits and write to the registers respectively.

Breaking change: if you fill-in the SPI address filed in a previous version in some way and it works correctly, you still have to rewrite the address, in a more intuitive way.
2017-08-15 14:49:31 +08:00
michael
366e4397e9 fix(spi_dma_rx): fixed the invalid argument issue in full-duplex mode.
force rxlength=length and mosi=1 and inlink.start=1 on in full-duplex mode.
set rxlength > length is forbidden in full-duplex mode.

TW#12609, TW#14240, https://www.esp32.com/viewtopic.php?f=13&t=2519
2017-08-14 17:25:30 +08:00
michael
227b011f6a fix(spi_master): fix SPI master, now able to transfer more than 32 bytes in non-DMA-accessable area.
apply for internal space to hold these data.
use DMA when it's enabled, no matter long or short.

TW#12226, github#551
2017-08-14 17:19:57 +08:00
Angus Gratton
8f44efc619 Merge branch 'bugfix/ledc_fade_divided_by_zero' into 'master'
bugfix(ledc): fix integer divided by zero in function ledc_set_fade_with_time

See merge request !1048
2017-08-14 13:52:36 +08:00
Ivan Grokhotkov
b260f6cb25 Merge branch 'bugfix/sdmmc_unaligned_write' into 'master'
sdmmc: fix reads/writes to/from unaligned buffers

See merge request !1071
2017-08-08 02:55:13 +08:00
Ivan Grokhotkov
dfda0fa67b Merge branch 'feature/add_gpio_drive_capability' into 'master'
feature(gpio): add APIs to set and get pad drive capability.

See merge request !1010
2017-08-07 17:21:42 +08:00
Ivan Grokhotkov
512898edee sdmmc: fix reads/writes to/from unaligned buffers
SDMMC hardware treats all buffers as aligned, and ignores 2 LSBs of
addresses written into DMA descriptors. Previously SDMMC host driver
assumed that data buffers passed from SDDMC command layer would be
aligned. However alignment checks were never implemented in the command
layer, as were the checks that the buffer coming from the application
would be in DMA capable memory. Most of the time this was indeed true.
However in some cases FATFS library can pass buffers offset by 2 bytes
from word boundary. “DMA capable” restriction may be broken if pSRAM
support is used.

This change adds buffer checks to the SDMMC host driver (alignment and
DMA capability), so that the host layer will error out for incompatible
buffers. In SDMMC command layer, a check is added to read and write
functions. If an incompatible buffer is passed from the application, new
buffer (512 bytes size) is allocated, and the transfer is performed
using {READ,WRITE}_SINGLE_BLOCK commands.
2017-08-01 03:15:11 +08:00
Jeroen Domburg
9314bf0d37 Merge branch 'bugfix/spi_change_host' into 'master'
fix(spi_master): fix the bug that VSPI no respond when host changed from HSPI to VSPI, and vice versa.

See merge request !997
2017-07-31 18:33:36 +08:00
Ivan Grokhotkov
002f38fa8f Merge branch 'feature/sdspi_driver' into 'master'
SD SPI mode driver

This MR adds functionality to support SD cards connected via SPI interface.
Additionally, two bugs are fixed:
- Definition of `SPI_TRANS_MODE_DIOQIO_ADDR` in spi_master driver
- SD card probing frequency was 4000kHz instead of 400kHz as required by the standard

See merge request !727
2017-07-26 13:51:37 +08:00
qianyicheng
acec9b9d35 bugfix(ledc): fix integer divided by zero in function ledc_set_fade_with_time 2017-07-21 19:06:44 +08:00
michael
99769f0b00 fix(spi_master): fix the bug that VSPI no respond when host changed
from HSPI to VSPI, and vice versa.

fix the SPI control bits written wrong in the headers.

TW#12123, Github#477
2017-07-21 14:50:17 +08:00
Wangjialin
9d466de235 bugfix(uart): fix signal glitch on tx pin
gpio_matrix_out function will set output enable for GPIO, seems in gpio_matrix_out there will be a short moment that the chip will output GPIO level.
So we can set GPIO as high before gpio_matrix_out function.
2017-07-20 14:34:11 +08:00
Dmitry Yakovlev
e5bb45f381 driver: SD protocol driver for SPI peripheral 2017-07-20 13:43:07 +08:00
Ivan Grokhotkov
5f8785eaec sdmmc: add support for SPI protocol commands 2017-07-20 13:34:21 +08:00
Ivan Grokhotkov
3b96771feb sdmmc: fix probing clock frequency
Probing clock frequency should be 400kHz, not 4MHz.
2017-07-20 13:34:21 +08:00
Ivan Grokhotkov
54dc350907 spi_master: fix duplicate bit mask for SPI_TRANS_MODE_DIOQIO_ADDR 2017-07-20 13:34:21 +08:00
Wangjialin
c30149e4bd feature(gpio): add APIs to set and get pad drive capability. RTC pads use RTC registers to contol drive capability. 2017-07-19 11:23:41 +08:00
Ivan Grokhotkov
7fc25f18d2 Merge branch 'feature/enable_brownout_detector' into 'master'
Enable brownout detector

See merge request !811
2017-07-13 11:40:37 +08:00
Angus Gratton
8d7074ed5c soc: Move esp_ptr_dma_capable() function to soc_memory_layout.h 2017-07-10 17:46:03 +08:00
Angus Gratton
71c70cb15c heap: Refactor heap regions/capabilities out of FreeRTOS
Remove tagged heap API, rename caps_xxx to heap_caps_xxx

Also includes additional heap_caps_xxx inspection functions.
2017-07-10 17:46:03 +08:00
Ivan Grokhotkov
cbe23147bf driver/rtc: add support for attaching handlers to RTC_CNTL interrupts 2017-07-10 17:21:49 +08:00
Ivan Grokhotkov
1194f59e1a Merge branch 'bugfix/i2s_return_err_code' into 'master'
i2s driver: return error code if register isr error

See merge request !829
2017-07-06 11:25:40 +08:00
Wangjialin
40fd9db55d bugfix(uart): fix bugs reported from github
1. uart_set_line_inverse API issue, https://github.com/espressif/esp-idf/issues/673
2. tx buffer length issue, https://github.com/espressif/esp-idf/issues/710
2017-06-27 16:41:59 +08:00
Angus Gratton
17747b3358 gpio driver: Clear GPIO matrix output config when setting pin as input
Otherwise, if a non-GPIO peripheral has been routed to this pin
(as an output), output driver can remain enabled.
2017-06-26 12:47:08 +10:00
James Sarrett
b772024699 send bus initialization bits before MMC_GO_IDLE_STATE command to initialize card after poweron 2017-06-22 11:08:47 +08:00
krzychb
05f56d1d25 [TW#13322] Typo in documentation, fixes #694 2017-06-19 22:42:22 +02:00
Nilay
769944b067 PCNT: fix for pcnt_set_pin API, it can now use all pcnt channels 2017-06-16 11:18:00 +05:30
Nilay
f50b5481fa PCNT: Fixed pcnt_counter_clear, Pulse Count now able to resume after API call 2017-06-16 11:11:52 +05:30
Jiang Jiang Jian
aefde1517d Merge branch 'bugfix/i2c_delete_interrupt_race' into 'master'
i2c driver: When deleting, disable interrupts before freeing data structures

See merge request !836
2017-06-14 17:47:22 +08:00
Tuan PM
f91715438a i2s: return error code if register isr error, resolve #587 (github)
set p_i2s_obj = NULL when return error
2017-06-13 14:28:47 +07:00
Angus Gratton
c77b699463 rmt driver: Manage driver interrupt handler based on which channels are enabled
Previously the first call to rmt_driver_uninstall() would remove the interrupt handler,
even if other channels still had the driver installed.

Adds an OS-level lock to control concurrent registration/deregistration of channels.
2017-06-09 16:11:21 +10:00
Angus Gratton
4b58cc12cd rmt driver: When deleting, disable interrupt before freeing data structures
Fixes potential race if RMT interrupt happens while deregistering (unlikely
due to timing of taking semaphore tx_sem, but still possible.)
2017-06-08 16:14:51 +10:00
Angus Gratton
a89e93fc3d i2c driver: When deleting, disable interrupts before freeing data structures
Fixes a potential race if I2C interrupt occurs while driver is being delted.
2017-06-08 15:57:31 +10:00
Angus Gratton
1cbdb35e1e Merge branch 'bugfix/i2s_channel_setting' into 'master'
bugfix(i2s): fix error when changing channel number in i2s_set_clk function

See merge request !784
2017-06-06 14:40:43 +08:00
jack
fc130fba86 fix bug that files missing commit in MR 773 2017-05-31 19:37:39 +08:00
Wangjialin
f68c5baea6 bugfix(i2s): fix error when changing changel number in i2s_set_clk function 2017-05-23 19:32:10 +08:00
krzychb
30edcca1fb docs: Generate Doxygen directives for API documentation
This is to resolve issue reported in https://github.com/espressif/esp-idf/issues/130.
2017-05-19 18:26:02 +02:00
zelll
0b447db8d8 uart driver: Move UART_EVENT_MAX to last
Merges https://github.com/espressif/esp-idf/pull/594
2017-05-17 11:36:13 +10:00
Konstantin Fedorov
31de20a217 docs: Error in gpio_install_isr_service() description
Merges https://github.com/espressif/esp-idf/pull/564
2017-05-17 11:04:17 +10:00
Ivan Grokhotkov
98e15df7f6 examples: add ULP ADC example 2017-05-16 13:15:02 +08:00
Jiang Jiang Jian
a6608648db Merge branch 'driver_merge_tmp/mcpwm' into 'master'
feature: Motor Control PWM(mcpwm) driver and examples



See merge request !698
2017-05-12 18:21:38 +08:00
Wangjialin
1f055d28b8 Driver update: I2S pdm and built-in DAC
1. Modify I2S DAC built-in mode settings
2. Add I2S pdm mode
3. Correct I2S signal index in full-duplex mode
4. Modify dac output function
5. Add dac pad init functions
6. Modify DAC documentation
7. Add i2s_set_dac_mode API
2017-05-12 16:21:02 +08:00
Kewal M Shah
2008f4d88c feature: add Motor Control PWM(mcpwm) driver
1. Name change from chopper to carrier, block diagram update, minor changes to example codes
2. mcpwm_reg.h changed, brought uniformity in comments, worked on suggestions, duty to accept float. Some name changes!
3. Minor readme changes and Indetation
4. Minor change:  move mcpwm_reg.h and mcpwm_struct.h to new path
5. Minor change: addition of BLDC example code and Readme
6. Name changed from epwm to mcpwm
7. Improve the reg name in mcpwm_struct.h
8. Name change chopper>carrier, deadband>deadtime
2017-05-12 15:47:59 +08:00
Jiang Jiang Jian
c518325385 Merge branch 'bugfix/dualcore_dport' into 'master'
component/esp32 : fix dualcore bug

1. When dual core cpu run access DPORT register, must do protection.
2. If access DPORT register, must use DPORT_REG_READ/DPORT_REG_WRITE and DPORT_XXX register operation macro.

See merge request !742
2017-05-10 11:27:01 +08:00
Tian Hao
26a3cb93c7 component/soc : move dport access header files to soc
1. move dport access header files to soc
2. reduce dport register write protection. Only protect read operation
2017-05-09 18:06:00 +08:00
Tian Hao
f7e8856520 component/esp32 : fix dualcore bug
1. When dual core cpu run access DPORT register, must do protection.
2. If access DPORT register, must use DPORT_REG_READ/DPORT_REG_WRITE and DPORT_XXX register operation macro.
2017-05-08 21:53:43 +08:00
Jeroen Domburg
9962cc9c9f Fix out-of-bounds on dmaworkaround_channels_busy 2017-05-08 16:11:46 +08:00
Jeroen Domburg
8af3fe4e84 Warn against and check for non-DMA-capable pointers being passed to SPI when DMA is used 2017-05-05 12:28:03 +08:00
devsaurus
530c3ca05c components/driver/spi_master: free dma descriptors
Signed-off-by: Jeroen Domburg <jeroen@espressif.com>
2017-05-05 11:13:42 +08:00
Angus Gratton
7db85a386a Merge branch 'bugfix/i2s_driver' into 'master'
I2S driver - fixed support for 24 and 32-bits, fixed tx/rx at the same time

- Modify sample can test with 24, 32-bits audio
- Add i2s sample README
- simply i2s_push function
- change sample rates, bits per sample, channel on fly

See merge request !483
2017-04-28 08:00:07 +08:00
krzychb
1a19747678 Getting started guides 2017-04-27 19:51:42 +02:00
Jeroen Domburg
9134c13c73 Fix SPI master CI test 2017-04-27 14:50:02 +08:00
Jeroen Domburg
04b901e629 SPI: More MR issues fixed, style fixup 2017-04-27 11:49:04 +08:00
Jeroen Domburg
bf0c32364a SPI: Also check SPI_TRANS_USE_[T|R]XDATA when decifding to turn on MOSI/MISO. Fixes https://github.com/espressif/esp-idf/issues/488 2017-04-27 11:49:04 +08:00
Jeroen Domburg
881a90b8ab SPI: SPI master clock calculation: n has a minimum of 2 to allow for both a low and a high cycle. Fixes https://github.com/espressif/esp-idf/issues/491 2017-04-27 11:49:04 +08:00
Jeroen Domburg
cecb846450 SPI: Fix comment for 3wire, make GPIO pins GPIO_MODE_INPUT_OUTOUT. Fixes https://github.com/espressif/esp-idf/issues/533 2017-04-27 11:49:04 +08:00
Jeroen Domburg
4c06dca15c SPI: Small fixes according to MR comments 2017-04-27 11:49:04 +08:00
Jeroen Domburg
e9c372bc2d SPI: Split common SPI stuff out of master driver; add slave driver; add workaround for DMA issue. 2017-04-27 11:49:04 +08:00
Tuan PM
fc1ee2666a I2S: fixed support for 24 and 32-bits, fixed tx/rx at the same time and others in log:
Add support 24, 32 bits

@jxmao optimize i2s_zero_buffer

@jxmao correct config support slave mode

@jxmao correct setup pin support tx/rx at the same time

Enhance pin power

@jxmao add dynamic change number of channels

remove nvs_init

remove start log and enhance power pin setup

using enum for i2s_channel and i2s_bits_per_sample, return ESP_ERR_INVALID_ARG when check params

validate i2s_bits_per_sample and channel

check tx & rx buffer before fill zero

remove checking channel as @jxmao suggest

limit dma buffer

modify i2s pin back to gpio mux before configure gpio matrix, resolve github issue #512

Add support 24, 32 bits

reduce push function

Modify sample can test with 24, 32-bits

Add i2s sample README

Fixed i2s_set_clk got reset sometime

can changes bit-wide while running

Fix sample rate calculation for DAC mode from @jeroen

modify example can change bits per sample every 5 seconds

cleanup

add comment for bytes_per_sample

update as @angus suggestions

Add i2s_set_clk api

I2S driver bug fixed as following log:

@jxmao optimize i2s_zero_buffer

@jxmao correct config support slave mode

@jxmao correct setup pin support tx/rx at the same time

Enhance pin power

@jxmao add dynamic change number of channels

remove nvs_init

remove start log and enhance power pin setup

using enum for i2s_channel and i2s_bits_per_sample, return ESP_ERR_INVALID_ARG when check params

validate i2s_bits_per_sample and channel

check tx & rx buffer before fill zero

remove checking channel as @jxmao suggest

limit dma buffer

modify i2s pin back to gpio mux before configure gpio matrix, resolve github issue #512

limit dma buffer to 4092

change gpio_matrix_*_check to inline function, remove some comments and rename test_i2s function to setup_triangle_sine_waves

for change commit title
2017-04-27 10:00:10 +07:00
Ivan Grokhotkov
fdfa7e6cc2 Merge branch 'bugfix/sdmmc_timeout' into 'master'
sdmmc: handle card removal when CD is not used

When SD card is removed during transaction, SDMMC peripheral can report
a range of errors, such as timeouts, CRC errors, start/end bit errors.
Under normal conditions (card is inserted), SDMMC peripheral also generates
command done or data done interrupts. When the card is removed, such
interrupts may not be always generated.

This change fixes handling of timeout interrupts and SBE interrupts.
It also adds a one second timeout into the event processing loop. This
timeout allows applications to recover in cases when the SDMMC peripheral
doesn’t generate command/data done event on card removal.

Fixes TW11592.

See merge request !678
2017-04-25 16:27:12 +08:00
Angus Gratton
fd3ef4cdfe Merge branch 'bugfix/github_fixes' into 'master'
Various fixes from Github

Some one-line fixes from Github PRs.

See merge request !689
2017-04-21 12:27:32 +08:00
Angus Gratton
94a61389ff Merge branch 'bugfix/driver_const_params' into 'master'
components/driver: 'const' all config calls.

Merges PR #519 https://github.com/espressif/esp-idf/pull/519

See merge request !687
2017-04-21 12:25:15 +08:00
Michael Kellner
eeb0aaa09e spidriver: Display length errors correctly
SPI transfer length is bits, not bytes, so the error should indicate bits. Also, there are separate lengths for rx and
tx (confusingly named rxlength and length... if rxlength is 0, length is used). The code checks the tx length for the
rx, so it never validates rxlength.

Originally contributed as part of #511 https://github.com/espressif/esp-idf/pull/511
2017-04-21 11:03:07 +10:00
Jonathan Kaufmann
bf82b441ae Fixed bug in ledc_set_fade_with_step where returned while holding critical section.
Merges PR #515 https://github.com/espressif/esp-idf/pull/515
2017-04-21 11:03:07 +10:00