Skip to content

Commit

Permalink
feat(PeriphDrivers): Add MAX32657 I3C driver (#1111)
Browse files Browse the repository at this point in the history
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
  • Loading branch information
ttmut authored Aug 20, 2024
1 parent 51ec9ad commit 4bf2c6a
Show file tree
Hide file tree
Showing 11 changed files with 10,356 additions and 4 deletions.
1,619 changes: 1,619 additions & 0 deletions Libraries/CMSIS/Device/Maxim/MAX32657/Include/i3c_regs.h

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions Libraries/CMSIS/Device/Maxim/MAX32657/Include/max32657.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,15 +607,16 @@ We may want to handle GET_IRQ better...

/******************************************************************************/
/* I3C */
#define MXC_I3C_FIFO_DEPTH (8) // TODO(ME30): Confirm this is correct.
#define MXC_CFG_I3C_INSTANCES (1)
#define MXC_I3C_FIFO_DEPTH (8)

/* Non-secure Mapping */
#define MXC_BASE_I3C_NS ((uint32_t)0x4001D000UL)
#define MXC_I3C_NS ((mxc_i2c_regs_t *)MXC_BASE_I3C_NS)
#define MXC_I3C_NS ((mxc_i3c_regs_t *)MXC_BASE_I3C_NS)

/* Secure Mapping */
#define MXC_BASE_I3C_S ((uint32_t)0x5001D000UL)
#define MXC_I3C_S ((mxc_i2c_regs_t *)MXC_BASE_I3C_S)
#define MXC_I3C_S ((mxc_i3c_regs_t *)MXC_BASE_I3C_S)

#if IS_SECURE_ENVIRONMENT
#define MXC_BASE_I3C MXC_BASE_I3C_S
Expand All @@ -625,6 +626,11 @@ We may want to handle GET_IRQ better...
#define MXC_I3C MXC_I3C_NS
#endif

#define MXC_I3C_GET_BASE(i) ((i) == 0 ? MXC_BASE_I3C : 0)
#define MXC_I3C_GET_I3C(i) ((i) == 0 ? MXC_I3C : 0)
#define MXC_I3C_GET_IRQ(i) (IRQn_Type)((i) == 0 ? I3C_IRQn : 0)
#define MXC_I3C_GET_IDX(p) ((p) == MXC_I3C_NS ? 0 : (p) == MXC_I3C_S ? 0 : -1)

/******************************************************************************/
/* DMA */
#define MXC_DMA_CHANNELS (4)
Expand Down
Loading

0 comments on commit 4bf2c6a

Please sign in to comment.