Fixed NRF52 I2C register naming.

This commit is contained in:
Brian Doherty 2023-08-12 12:56:01 -05:00 committed by Xiang Xiao
parent 6e8f25ba3b
commit cc99d94cfd
2 changed files with 5 additions and 4 deletions

View File

@ -60,9 +60,9 @@
#define NRF52_TWIM_RXDAMOUNT_OFFSET 0x053c /* Number of bytes transferred in the last RXD transaction */
#define NRF52_TWIM_RXDLIST_OFFSET 0x0540 /* RX EasyDMA list type */
#define NRF52_TWIM_TXDPTR_OFFSET 0x0544 /* TXD Data pointer */
#define NRF52_TWIM_TXMAXCNT_OFFSET 0x0548 /* Maximum number of bytes in TXD buffer */
#define NRF52_TWIM_TXAMOUNT_OFFSET 0x054c /* Number of bytes transferred in the last TXD transaction */
#define NRF52_TWIM_TXLIST_OFFSET 0x0550 /* TX EasyDMA list type */
#define NRF52_TWIM_TXDMAXCNT_OFFSET 0x0548 /* Maximum number of bytes in TXD buffer */
#define NRF52_TWIM_TXDAMOUNT_OFFSET 0x054c /* Number of bytes transferred in the last TXD transaction */
#define NRF52_TWIM_TXDLIST_OFFSET 0x0550 /* TX EasyDMA list type */
#define NRF52_TWIM_ADDRESS_OFFSET 0x0588 /* TWIM address */
/* Register offsets for TWI slave (TWIS) ************************************/

View File

@ -23,6 +23,7 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/signal.h>
#include <assert.h>
#include <errno.h>
@ -373,7 +374,7 @@ static int nrf52_i2c_transfer(struct i2c_master_s *dev,
/* Write number of bytes in TXD buffer */
regval = priv->dcnt;
nrf52_i2c_putreg(priv, NRF52_TWIM_TXMAXCNT_OFFSET, regval);
nrf52_i2c_putreg(priv, NRF52_TWIM_TXDMAXCNT_OFFSET, regval);
/* Start TX sequence */