omap3530/omap3530_drivers/spi/omap3530_spi.inl
branchBeagle_BSP_dev
changeset 85 d93b485c1325
parent 84 09e266454dcf
child 112 fdfa12d9a47a
equal deleted inserted replaced
84:09e266454dcf 85:d93b485c1325
    24 	{
    24 	{
    25 	__ASSERT_DEBUG(aModule < KMaxSpiChannelsPerModule, Kern::Fault("omap3530_spi.inl, line: ", __LINE__)); // aChannel > module channels
    25 	__ASSERT_DEBUG(aModule < KMaxSpiChannelsPerModule, Kern::Fault("omap3530_spi.inl, line: ", __LINE__)); // aChannel > module channels
    26 	__ASSERT_DEBUG( aModule != 2 ? !aPinSetId : ETrue, Kern::Fault("omap3530_spi.inl, line: ", __LINE__)); // only channel 3 supports other pin configurations
    26 	__ASSERT_DEBUG( aModule != 2 ? !aPinSetId : ETrue, Kern::Fault("omap3530_spi.inl, line: ", __LINE__)); // only channel 3 supports other pin configurations
    27 
    27 
    28 	// set the pin to the opposite to the currently active CS mode..
    28 	// set the pin to the opposite to the currently active CS mode..
    29 	const TPinConfig& csConf = ModulePinConfig[aModule].iCs[aChannel];
    29 	const TPinConfig& csConf = ModulePinConfig[aModule + aPinSetId].iCs[aChannel];
    30 	__ASSERT_DEBUG(csConf.iAddress, Kern::Fault("omap3530_spi.inl, line: ", __LINE__)); // don't try to use non-existing CS!
    30 	__ASSERT_DEBUG(csConf.iAddress, Kern::Fault("omap3530_spi.inl, line: ", __LINE__)); // don't try to use non-existing CS!
    31 
    31 
    32 	// now switch the pin mode..(making sure it is at the proper level before that)
    32 	// now switch the pin mode..(making sure it is at the proper level before that)
    33 	GPIO::SetOutputState(csConf.iPinNumber, aActiveMode == ESpiCSPinActiveLow ? GPIO::EHigh : GPIO::ELow);
    33 	GPIO::SetOutputState(csConf.iPinNumber, aActiveMode == ESpiCSPinActiveLow ? GPIO::EHigh : GPIO::ELow);
    34 	SCM::SetPadConfig(csConf.iAddress, csConf.iMswLsw, SCM::EMode4); // always go to mode 4 (gpio)
    34 	SCM::SetPadConfig(csConf.iAddress, csConf.iMswLsw, SCM::EMode4); // always go to mode 4 (gpio)