xiaoxiang781216 commented on code in PR #16914: URL: https://github.com/apache/nuttx/pull/16914#discussion_r2301274615
########## drivers/i2s/i2schar.c: ########## @@ -363,9 +458,92 @@ static int i2schar_ioctl(FAR struct file *filep, int cmd, unsigned long arg) priv = inode->i_private; DEBUGASSERT(priv != NULL && priv->i2s && priv->i2s->ops); - if (priv->i2s->ops->i2s_ioctl) + switch (cmd) { - ret = priv->i2s->ops->i2s_ioctl(priv->i2s, cmd, arg); + case I2SIOC_GRXDATAWIDTH: + { + *(uint32_t *)arg = I2S_RXDATAWIDTH(priv->i2s, 0); + break; + } + + case I2SIOC_GTXDATAWIDTH: + { + *(uint32_t *)arg = I2S_TXDATAWIDTH(priv->i2s, 0); + } + break; + + case I2SIOC_GRXCHANNELS: + { + *(int *)arg = I2S_RXCHANNELS(priv->i2s, 0); Review Comment: add FAR for ALL pointers -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org