mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-06-19 04:15:06 +00:00
Fixes
This commit is contained in:
parent
b216ba8595
commit
7ff6a7c249
@ -3,6 +3,7 @@
|
||||
#include <tactility/bindings/root.h>
|
||||
#include <tactility/bindings/esp32_ble.h>
|
||||
#include <tactility/bindings/esp32_gpio.h>
|
||||
#include <tactility/bindings/esp32_grove.h>
|
||||
#include <tactility/bindings/esp32_i2c.h>
|
||||
#include <tactility/bindings/esp32_i2s.h>
|
||||
#include <tactility/bindings/esp32_spi.h>
|
||||
|
||||
@ -168,7 +168,13 @@ static error_t start_device(Device* device) {
|
||||
if (!data) return ERROR_OUT_OF_MEMORY;
|
||||
device_set_driver_data(device, data);
|
||||
|
||||
return start_child(device, config->defaultMode);
|
||||
if (start_child(device, config->defaultMode) != ERROR_NONE) {
|
||||
device_set_driver_data(device, nullptr);
|
||||
delete data;
|
||||
return ERROR_RESOURCE;
|
||||
}
|
||||
|
||||
return ERROR_NONE;
|
||||
}
|
||||
|
||||
static error_t stop_device(Device* device) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user