|
|
@ -212,6 +212,9 @@ SPIDevice::SPIDevice(SPIBus &bus, SPIDesc &device_desc) |
|
|
|
: _bus(bus) |
|
|
|
: _bus(bus) |
|
|
|
, _desc(device_desc) |
|
|
|
, _desc(device_desc) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
set_device_bus(_bus.bus); |
|
|
|
|
|
|
|
set_device_address(_desc.subdev); |
|
|
|
|
|
|
|
|
|
|
|
if (_desc.cs_pin != SPI_CS_KERNEL) { |
|
|
|
if (_desc.cs_pin != SPI_CS_KERNEL) { |
|
|
|
_cs = hal.gpio->channel(_desc.cs_pin); |
|
|
|
_cs = hal.gpio->channel(_desc.cs_pin); |
|
|
|
if (!_cs) { |
|
|
|
if (!_cs) { |
|
|
|