mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-15 01:45:40 -04:00
Optimize SPI functions, lowering ROM usage by 70 bytes.
- Have only one transfer function, to minimize duplicate code. - Remove address assignments that does not make a difference.
This commit is contained in:
parent
9fabff90cb
commit
6ac874584d
3 changed files with 29 additions and 41 deletions
|
@ -8,8 +8,7 @@
|
|||
#include <stdint.h>
|
||||
|
||||
int spi_ready(void);
|
||||
int spi_write(uint8_t *cmd, size_t size_cmd, uint8_t *data, size_t size_data);
|
||||
int spi_transfer(uint8_t *tx_buf, size_t tx_size, uint8_t *rx_buf,
|
||||
size_t rx_size);
|
||||
int spi_transfer(uint8_t *cmd, size_t cmd_size, uint8_t *tx_buf, size_t tx_size,
|
||||
uint8_t *rx_buf, size_t rx_size);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue