if (hz >= 4000000) return _AO_SPI_SPEED_4MHz;
if (hz >= 2000000) return _AO_SPI_SPEED_2MHz;
if (hz >= 1000000) return _AO_SPI_SPEED_1MHz;
if (hz >= 4000000) return _AO_SPI_SPEED_4MHz;
if (hz >= 2000000) return _AO_SPI_SPEED_2MHz;
if (hz >= 1000000) return _AO_SPI_SPEED_1MHz;