mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-08 22:52:24 -04:00
check fix: Remove _ prefix from function names
This commit is contained in:
parent
2281a9f82f
commit
fba3b45380
1 changed files with 5 additions and 5 deletions
|
@ -31,7 +31,7 @@ static void spi_disable(void)
|
||||||
*spi_en = 0;
|
*spi_en = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _spi_write(uint8_t *cmd, size_t size)
|
static void spi_write(uint8_t *cmd, size_t size)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < size; i++) {
|
for (size_t i = 0; i < size; i++) {
|
||||||
while (!spi_ready()) {
|
while (!spi_ready()) {
|
||||||
|
@ -45,7 +45,7 @@ static void _spi_write(uint8_t *cmd, size_t size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _spi_read(uint8_t *buf, size_t size)
|
static void spi_read(uint8_t *buf, size_t size)
|
||||||
{
|
{
|
||||||
|
|
||||||
while (!spi_ready()) {
|
while (!spi_ready()) {
|
||||||
|
@ -74,14 +74,14 @@ int spi_transfer(uint8_t *cmd, size_t cmd_size, uint8_t *tx_buf, size_t tx_size,
|
||||||
|
|
||||||
spi_enable();
|
spi_enable();
|
||||||
|
|
||||||
_spi_write(cmd, cmd_size);
|
spi_write(cmd, cmd_size);
|
||||||
|
|
||||||
if (tx_buf != NULL || tx_size != 0) {
|
if (tx_buf != NULL || tx_size != 0) {
|
||||||
_spi_write(tx_buf, tx_size);
|
spi_write(tx_buf, tx_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rx_buf != NULL && rx_size != 0) {
|
if (rx_buf != NULL && rx_size != 0) {
|
||||||
_spi_read(rx_buf, rx_size);
|
spi_read(rx_buf, rx_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
spi_disable();
|
spi_disable();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue