Add kernel drivers for SPI and UART and make locking APIs more consistent (#489)
- Add kernel support for SPI driver - Add kernel support for UART driver - Implemented ESP32 UART kernel driver - Update existing UART-related code in Tactility to use new kernel driver - Remove UART from tt::hal::Configuration - Remove tt_hal_uart functionality but keep functions for now - Update devicetrees for UART changes - Kernel mutex and recursive mutex: improved locking API design - Other kernel improvements - Added device_exists_of_type() and device_find_by_name()
This commit is contained in:
committed by
GitHub
parent
7e24105d0c
commit
74127a5f6c
@@ -37,9 +37,8 @@ Device* findDevice(i2c_port_t port) {
|
||||
auto* driver = device_get_driver(device);
|
||||
if (driver == nullptr) return true;
|
||||
if (!driver_is_compatible(driver, "espressif,esp32-i2c")) return true;
|
||||
i2c_port_t port;
|
||||
if (esp32_i2c_get_port(device, &port) != ERROR_NONE) return true;
|
||||
if (port != params_ptr->port) return true;
|
||||
auto* config = static_cast<const Esp32I2cConfig*>(device->config);
|
||||
if (config->port != params_ptr->port) return true;
|
||||
// Found it, stop iterating
|
||||
params_ptr->device = device;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user