AP_HAL_Linux: Bypass manual CS assertion for SPI_CS_KERNEL mode

Missed from initial patch series

Signed-off-by: John Williams <john@whelanwilliams.net>
This commit is contained in:
John Williams 2014-11-25 12:41:34 +10:00 committed by Andrew Tridgell
parent 4edd943166
commit d0e467aea0

View File

@ -150,6 +150,11 @@ void LinuxSPIDeviceManager::cs_assert(enum AP_HAL::SPIDevice type)
if (i == LINUX_SPI_DEVICE_NUM_DEVICES) { if (i == LINUX_SPI_DEVICE_NUM_DEVICES) {
hal.scheduler->panic("Bad device type"); hal.scheduler->panic("Bad device type");
} }
// Kernel-mode CS handling
if(_device[i]._cs_pin == SPI_CS_KERNEL)
return;
for (i=0; i<LINUX_SPI_DEVICE_NUM_DEVICES; i++) { for (i=0; i<LINUX_SPI_DEVICE_NUM_DEVICES; i++) {
if (_device[i]._bus != bus) { if (_device[i]._bus != bus) {
// not the same bus // not the same bus