Very trivial changes from review of last PR

This commit is contained in:
Gregory Nutt 2017-11-08 06:34:23 -06:00
parent 51b19d5f38
commit 349b513978
5 changed files with 5 additions and 11 deletions

View File

@ -765,12 +765,12 @@ static int lc823450_i2c_poll(FAR struct lc823450_i2c_priv_s *priv)
i2cinfo("re-START condition\n");
#ifdef CONFIG_I2C_RESET
/* Reset I2C bus by softreset. There is not description of the reset,
* but in order to recover I2C bus busy, it must be done.
* Please refer to macaron's code.
*/
#ifdef CONFIG_I2C_RESET
lc823450_i2c_reset((FAR struct i2c_master_s *)priv);
#endif
@ -778,6 +778,7 @@ static int lc823450_i2c_poll(FAR struct lc823450_i2c_priv_s *priv)
/* We have to enable interrupt again, because all registers are reset by
* lc823450_i2c_reset().
*/
lc823450_i2c_enableirq(priv);
#endif

View File

@ -219,7 +219,6 @@ static void _setup_audio_pll(uint32_t freq)
0x0,
0x0200 /* AUDDIV=2 */
);
}
/****************************************************************************
@ -255,7 +254,6 @@ static void _i2s_semtake(FAR sem_t *sem)
while (ret == -EINTR);
}
/****************************************************************************
* Name: lc823450_i2s_txsamplerate
****************************************************************************/
@ -334,6 +332,7 @@ static int lc823450_i2s_send(struct i2s_dev_s *dev, struct ap_buffer_s *apb,
/****************************************************************************
* Name: lc823450_i2s_beeptest
****************************************************************************/
#ifdef BEEP_TEST
static void lc823450_i2s_beeptest(void)
{

View File

@ -36,7 +36,6 @@
#ifndef __ARCH_ARM_SRC_LC823450_LC823450_I2S_H
#define __ARCH_ARM_SRC_LC823450_LC823450_I2S_H
/****************************************************************************
* Included Files
****************************************************************************/

View File

@ -186,6 +186,8 @@ static void wm8776_writereg(FAR struct wm8776_dev_s *priv,
uint16_t regval)
{
struct i2c_config_s config;
uint8_t data[2];
int ret;
/* Setup up the I2C configuration */
@ -193,16 +195,12 @@ static void wm8776_writereg(FAR struct wm8776_dev_s *priv,
config.address = priv->lower->address;
config.addrlen = 7;
uint8_t data[2];
int ret;
/* Set up the data to write */
data[0] = (regaddr << 1) + ((regval >> 8) & 0x1);
data[1] = (regval & 0xff);
ret = i2c_write(priv->i2c, &config, data, sizeof(data));
if (ret < 0)
{
auderr("ERROR: I2C_TRANSFER failed: %d\n", ret);
@ -639,7 +637,6 @@ static void wm8776_returnbuffers(FAR struct wm8776_dev_s *priv)
leave_critical_section(flags);
}
/****************************************************************************
* Name: wm8776_sendbuffer
*

View File

@ -75,7 +75,6 @@
#define WM8776_HPOUT_VOL_MASK (0x7f << WM8776_HPOUT_VOL_SHIFT)
# define WM8776_HPOUT_VOL(n) ((uint16_t)(n) << WM8776_HPOUT_VOL_SHIFT)
/****************************************************************************
* Public Types
****************************************************************************/
@ -123,6 +122,5 @@ struct wm8776_dev_s
volatile int result; /* The result of the last transfer */
};
#endif /* CONFIG_AUDIO */
#endif /* __DRIVERS_AUDIO_WM8776_H */