2022-05-28 01:00:56 +01:00
|
|
|
#include "pimoroni_bus.hpp"
|
|
|
|
|
|
|
|
namespace pimoroni {
|
|
|
|
SPIPins get_spi_pins(BG_SPI_SLOT slot) {
|
|
|
|
switch(slot) {
|
|
|
|
case PICO_EXPLORER_ONBOARD:
|
2022-05-28 23:00:43 +01:00
|
|
|
return {PIMORONI_SPI_DEFAULT_INSTANCE, SPI_BG_FRONT_CS, SPI_DEFAULT_SCK, SPI_DEFAULT_MOSI, PIN_UNUSED, SPI_DEFAULT_DC, PIN_UNUSED};
|
2022-05-28 01:00:56 +01:00
|
|
|
case BG_SPI_FRONT:
|
2022-05-28 23:00:43 +01:00
|
|
|
return {PIMORONI_SPI_DEFAULT_INSTANCE, SPI_BG_FRONT_CS, SPI_DEFAULT_SCK, SPI_DEFAULT_MOSI, PIN_UNUSED, SPI_DEFAULT_DC, SPI_BG_FRONT_PWM};
|
2022-05-28 01:00:56 +01:00
|
|
|
case BG_SPI_BACK:
|
2022-05-28 23:00:43 +01:00
|
|
|
return {PIMORONI_SPI_DEFAULT_INSTANCE, SPI_BG_BACK_CS, SPI_DEFAULT_SCK, SPI_DEFAULT_MOSI, PIN_UNUSED, SPI_DEFAULT_DC, SPI_BG_BACK_PWM};
|
2022-05-28 01:00:56 +01:00
|
|
|
}
|
2022-05-28 23:00:43 +01:00
|
|
|
return {PIMORONI_SPI_DEFAULT_INSTANCE, SPI_BG_FRONT_CS, SPI_DEFAULT_SCK, SPI_DEFAULT_MOSI, PIN_UNUSED, SPI_DEFAULT_DC, SPI_BG_FRONT_PWM};
|
2022-05-28 01:00:56 +01:00
|
|
|
};
|
|
|
|
}
|