Merge branch 'bugfix/i2c_regression' into 'master'

Bugfix/i2c regression (Github PR 1443)

See merge request !1725
This commit is contained in:
Ivan Grokhotkov 2017-12-29 15:19:38 +08:00
commit f82048018b
2 changed files with 1 additions and 12 deletions

View file

@ -1005,7 +1005,7 @@ esp_err_t i2c_master_read(i2c_cmd_handle_t cmd_handle, uint8_t* data, size_t dat
I2C_CHECK((data != NULL), I2C_ADDR_ERROR_STR, ESP_ERR_INVALID_ARG);
I2C_CHECK(cmd_handle != NULL, I2C_CMD_LINK_INIT_ERR_STR, ESP_ERR_INVALID_ARG);
I2C_CHECK(ack < I2C_MASTER_ACK_MAX, I2C_ACK_TYPE_ERR_STR, ESP_ERR_INVALID_ARG);
I2C_CHECK(data_len < 1, I2C_DATA_LEN_ERR_STR, ESP_ERR_INVALID_ARG);
I2C_CHECK(data_len > 0, I2C_DATA_LEN_ERR_STR, ESP_ERR_INVALID_ARG);
if(ack != I2C_MASTER_LAST_NACK) {
return i2c_master_read_static(cmd_handle, data, data_len, ack);

View file

@ -46,8 +46,6 @@ typedef struct esp_pthread_cond {
int pthread_cond_signal(pthread_cond_t *cv)
{
ESP_LOGV(TAG, "%s %p", __FUNCTION__, cv);
if (cv == NULL || *cv == (pthread_cond_t) 0) {
return EINVAL;
}
@ -67,8 +65,6 @@ int pthread_cond_signal(pthread_cond_t *cv)
int pthread_cond_broadcast(pthread_cond_t *cv)
{
ESP_LOGV(TAG, "%s %p", __FUNCTION__, cv);
if (cv == NULL || *cv == (pthread_cond_t) 0) {
return EINVAL;
}
@ -87,8 +83,6 @@ int pthread_cond_broadcast(pthread_cond_t *cv)
int pthread_cond_wait(pthread_cond_t *cv, pthread_mutex_t *mut)
{
ESP_LOGV(TAG, "%s %p %p", __FUNCTION__, cv, mut);
return pthread_cond_timedwait(cv, mut, NULL);
}
@ -97,8 +91,6 @@ int pthread_cond_timedwait(pthread_cond_t *cv, pthread_mutex_t *mut, const struc
int ret;
TickType_t timeout_ticks;
ESP_LOGV(TAG, "%s %p %p %p", __FUNCTION__, cv, mut, to);
if (cv == NULL || *cv == (pthread_cond_t) 0) {
return EINVAL;
}
@ -166,8 +158,6 @@ int pthread_cond_init(pthread_cond_t *cv, const pthread_condattr_t *att)
{
(void) att; /* Unused argument as of now */
ESP_LOGV(TAG, "%s %p %p", __FUNCTION__, cv, att);
if (cv == NULL) {
return EINVAL;
}
@ -188,7 +178,6 @@ int pthread_cond_destroy(pthread_cond_t *cv)
{
int ret = 0;
ESP_LOGV(TAG, "%s %p", __FUNCTION__, cv);
if (cv == NULL || *cv == (pthread_cond_t) 0) {
return EINVAL;
}