Skip to content
Snippets Groups Projects
Commit ea7661ff authored by schneider's avatar schneider
Browse files

fix(spi): adapt to new SDK 0.2.1-12

parent f563ef0f
No related branches found
No related tags found
No related merge requests found
Pipeline #4694 passed
...@@ -96,12 +96,11 @@ int hardware_early_init(void) ...@@ -96,12 +96,11 @@ int hardware_early_init(void)
/* /*
* SPI for ECG * SPI for ECG
*/ */
const sys_cfg_spi_t spi17y_master_cfg = { const sys_cfg_spi_t spi17y_master_cfg = { .map = MAP_A,
.map = MAP_A,
.ss0 = Enable, .ss0 = Enable,
.ss1 = Disable, .ss1 = Disable,
.ss2 = Disable, .ss2 = Disable,
}; .num_io = 2 };
if (SPI_Init(SPI0, 0, SPI_SPEED, spi17y_master_cfg) != 0) { if (SPI_Init(SPI0, 0, SPI_SPEED, spi17y_master_cfg) != 0) {
LOG_ERR("init", "Error configuring SPI"); LOG_ERR("init", "Error configuring SPI");
......
...@@ -79,6 +79,7 @@ void card10_init(void) ...@@ -79,6 +79,7 @@ void card10_init(void)
spi17y_master_cfg.ss0 = Enable; spi17y_master_cfg.ss0 = Enable;
spi17y_master_cfg.ss1 = Disable; spi17y_master_cfg.ss1 = Disable;
spi17y_master_cfg.ss2 = Disable; spi17y_master_cfg.ss2 = Disable;
spi17y_master_cfg.num_io = 2;
if (SPI_Init(SPI0, 0, SPI_SPEED, spi17y_master_cfg) != 0) { if (SPI_Init(SPI0, 0, SPI_SPEED, spi17y_master_cfg) != 0) {
printf("Error configuring SPI\n"); printf("Error configuring SPI\n");
while (1) while (1)
......
...@@ -55,6 +55,7 @@ void lcd_write(uint8_t *data, int size) ...@@ -55,6 +55,7 @@ void lcd_write(uint8_t *data, int size)
spi17y_master_cfg.ss0 = Enable; spi17y_master_cfg.ss0 = Enable;
spi17y_master_cfg.ss1 = Disable; spi17y_master_cfg.ss1 = Disable;
spi17y_master_cfg.ss2 = Disable; spi17y_master_cfg.ss2 = Disable;
spi17y_master_cfg.num_io = 2;
if (SPI_Init(SPI2, 0, SPI_SPEED, spi17y_master_cfg) != 0) { if (SPI_Init(SPI2, 0, SPI_SPEED, spi17y_master_cfg) != 0) {
printf("Error configuring SPI\n"); printf("Error configuring SPI\n");
while (1) while (1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment