-#define M25_SELECT(cs) ao_spi_get_mask(SPI_CS_PORT,cs)
-#define M25_DESELECT(cs) ao_spi_put_mask(SPI_CS_PORT,cs)
+#define M25_SELECT(cs) ao_spi_get_mask(AO_M25_SPI_CS_PORT,cs,AO_M25_SPI_BUS, AO_SPI_SPEED_FAST)
+#define M25_DESELECT(cs) ao_spi_put_mask(AO_M25_SPI_CS_PORT,cs,AO_M25_SPI_BUS)