mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-03-22 01:31:21 +03:00
add SPI, not working yet (also need to set SPOL/SPHA etc)
This commit is contained in:
@@ -97,11 +97,17 @@ typedef struct{
|
||||
uint8_t istx : 1;
|
||||
} usart_props_t;
|
||||
|
||||
typedef struct {
|
||||
typedef struct{
|
||||
uint8_t isscl : 1;
|
||||
uint8_t issda : 1;
|
||||
} i2c_props_t;
|
||||
|
||||
typedef struct{
|
||||
uint8_t issck : 1;
|
||||
uint8_t ismiso : 1;
|
||||
uint8_t ismosi : 1;
|
||||
} spi_props_t;
|
||||
|
||||
/*
|
||||
typedef struct{
|
||||
uint32_t speed;
|
||||
@@ -121,6 +127,7 @@ int get_curpinconf(uint8_t port, uint8_t pin, pinconfig_t *c);
|
||||
|
||||
int get_usart_index(uint8_t port, uint8_t pin, usart_props_t *p);
|
||||
int get_i2c_index(uint8_t port, uint8_t pin, i2c_props_t *p);
|
||||
int get_spi_index(uint8_t port, uint8_t pin, spi_props_t *p);
|
||||
|
||||
int gpio_reinit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user