1
0
Fork 0

Allow for inverted SPI CS logic (#23699)

This commit is contained in:
Dasky 2024-09-09 23:44:35 +01:00 committed by GitHub
parent 3aaa086ac8
commit 2c7bf34d09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 128 additions and 70 deletions

View file

@ -41,9 +41,18 @@ typedef int16_t spi_status_t;
#ifdef __cplusplus
extern "C" {
#endif
typedef struct spi_start_config_t {
pin_t slave_pin;
bool lsb_first;
uint8_t mode;
uint16_t divisor;
bool cs_active_low;
} spi_start_config_t;
void spi_init(void);
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor);
bool spi_start_extended(spi_start_config_t *start_config);
spi_status_t spi_write(uint8_t data);