Skip to content

Commit

Permalink
Using SPI3_HOST instead of VSPI_HOST (#72)
Browse files Browse the repository at this point in the history
For better compatibility with other ESP32s (like S3)
  • Loading branch information
abobija authored Oct 17, 2024
1 parent 2d0bfb4 commit 2b6c968
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/basic/main/basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ static const char *TAG = "rc522-basic-example";
#define RC522_SCANNER_GPIO_RST (-1) // soft-reset

static rc522_spi_config_t driver_config = {
.host_id = VSPI_HOST,
.host_id = SPI3_HOST,
.bus_config = &(spi_bus_config_t){
.miso_io_num = RC522_SPI_BUS_GPIO_MISO,
.mosi_io_num = RC522_SPI_BUS_GPIO_MOSI,
Expand Down
2 changes: 1 addition & 1 deletion examples/memory_dump/main/memory_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static const char *TAG = "rc522-memory-dump-example";
#define RC522_SCANNER_GPIO_RST (-1) // soft-reset

static rc522_spi_config_t driver_config = {
.host_id = VSPI_HOST,
.host_id = SPI3_HOST,
.bus_config = &(spi_bus_config_t){
.miso_io_num = RC522_SPI_BUS_GPIO_MISO,
.mosi_io_num = RC522_SPI_BUS_GPIO_MOSI,
Expand Down
4 changes: 2 additions & 2 deletions examples/multiple_scanners/main/multiple_scanners.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static const char *TAG = "rc522-multiple-scanners-example";
// {{ Scanner configurations

static rc522_spi_config_t scanner_1_config = {
.host_id = VSPI_HOST,
.host_id = SPI3_HOST,
.bus_config = &(spi_bus_config_t){
.miso_io_num = RC522_SPI_BUS_GPIO_MISO,
.mosi_io_num = RC522_SPI_BUS_GPIO_MOSI,
Expand All @@ -35,7 +35,7 @@ static rc522_spi_config_t scanner_1_config = {
// since first scanner will initialize the bus.

static rc522_spi_config_t scanner_2_config = {
.host_id = VSPI_HOST,
.host_id = SPI3_HOST,
.dev_config = {
.spics_io_num = RC522_SPI_SCANNER_2_GPIO_SDA,
},
Expand Down
2 changes: 1 addition & 1 deletion examples/read_write/main/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static const char *TAG = "rc522-read-write-example";
#define RC522_SCANNER_GPIO_RST (-1) // soft-reset

static rc522_spi_config_t driver_config = {
.host_id = VSPI_HOST,
.host_id = SPI3_HOST,
.bus_config = &(spi_bus_config_t){
.miso_io_num = RC522_SPI_BUS_GPIO_MISO,
.mosi_io_num = RC522_SPI_BUS_GPIO_MOSI,
Expand Down
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "3.2.3"
version: "3.2.4"
description: "Library for communication with RFID / NFC cards using MFRC522 module"
url: "https://github.com/abobija/esp-idf-rc522"
repository: "https://github.com/abobija/esp-idf-rc522.git"
Expand Down

0 comments on commit 2b6c968

Please sign in to comment.