|
|
@ -171,8 +171,8 @@ public: |
|
|
|
int fd = -1; |
|
|
|
int fd = -1; |
|
|
|
uint16_t bus; |
|
|
|
uint16_t bus; |
|
|
|
uint16_t subdev; |
|
|
|
uint16_t subdev; |
|
|
|
uint8_t ref; |
|
|
|
|
|
|
|
int16_t last_mode = -1; |
|
|
|
int16_t last_mode = -1; |
|
|
|
|
|
|
|
uint8_t ref; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
SPIBus::~SPIBus() |
|
|
|
SPIBus::~SPIBus() |
|
|
@ -466,7 +466,8 @@ SPIDeviceManager::get_device(const char *name) |
|
|
|
return dev; |
|
|
|
return dev; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
uint8_t SPIDeviceManager::get_count() { |
|
|
|
uint8_t SPIDeviceManager::get_count() |
|
|
|
|
|
|
|
{ |
|
|
|
return _n_device_desc; |
|
|
|
return _n_device_desc; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -483,7 +484,9 @@ SPIDeviceManager::_create_device(SPIBus &b, SPIDesc &desc) const |
|
|
|
if (!dev) { |
|
|
|
if (!dev) { |
|
|
|
return nullptr; |
|
|
|
return nullptr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
b.ref++; |
|
|
|
b.ref++; |
|
|
|
|
|
|
|
|
|
|
|
return dev; |
|
|
|
return dev; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|