Skip to content

Update hspi_slave.c #5489

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

Closed
wants to merge 5 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
4 changes: 2 additions & 2 deletions libraries/SPISlave/src/hspi_slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void hspi_slave_begin(uint8_t status_len, void * arg)
SPI1S1 = (((status_len * 8) - 1) << SPIS1LSTA) | (0xff << SPIS1LBUF) | (7 << SPIS1LWBA) | (7 << SPIS1LRBA) | SPIS1RSTA;
SPI1P = (1 << 19);
SPI1CMD = SPIBUSY;

SPI1C2=(0x2<<SPIC2MOSIDN_S) | (0x1<<SPIC2MISODM_S); // GuaAck. 30.10.2018; timing of MISO
ETS_SPI_INTR_ATTACH(_hspi_slave_isr_handler,arg);
ETS_SPI_INTR_ENABLE();
}
Expand All @@ -114,7 +114,7 @@ void hspi_slave_end()
SPI1P = B110;
}

void hspi_slave_setStatus(uint32_t status)
void ICACHE_RAM_ATTR hspi_slave_setStatus(uint32_t status) // GuaAck. 30.10.2018
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You provided an explanation for why this function should have the decorator. I suggest replacing the comment with that.
Also, I suggest inline.

Copy link
Collaborator

@devyte devyte Dec 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, please change the comment to add the explanation.

{
SPI1WS = status;
}
Expand Down