Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESP32-C2] Correct REG_SPI_BASE(i) (IDFGH-11421) #12559

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix compiler issues
The original suggested macro gave compiler errors.
  • Loading branch information
TD-er authored Nov 11, 2023
commit c55df6374df94160c04730869cacb7ec8d8f0308
2 changes: 1 addition & 1 deletion components/soc/esp32c2/include/soc/spi_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
extern "C" {
#endif
#include "soc/soc.h"
#define REG_SPI_BASE(i) ((i==2) ? (DR_REG_SPI2_BASE : (DR_REG_SPI0_BASE - (i * 0x1000))))
#define REG_SPI_BASE(i) (((i)==2) ? (DR_REG_SPI2_BASE) : (DR_REG_SPI0_BASE - ((i) * 0x1000)))

#define SPI_CMD_REG(i) (REG_SPI_BASE(i) + 0x0)
/* SPI_USR : R/W/SC ;bitpos:[24] ;default: 1'b0 ; */
Expand Down