Set SPI MOSI pin to idle low on a Due? I have an SPI slave connected to Due. I send the SPI slave into sleep mode. During sleep, I need to pull all pins low, including MOSI. What's the best way to pull the SPI-4 pin low on a Due?

Here's a similar question but it's about an AVR chip and the answer obviously doesn't apply to SAM3X8 which is an ARM.
I have managed to set MOSI to low by setting bit 26 in PIOA-&gt;PIO_PER, PIOA-&gt;PIO_OER and  PIOA-&gt;PIO_CODR registers. To use SPI again, bit 26 in PIOA-&gt;PIO_PDR has to be set (this cancels the effect of PIOA-&gt;PIO_PER).