mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
Fixes
This commit is contained in:
parent
fc941ff495
commit
d178d674f4
@ -17,7 +17,7 @@
|
||||
spi0 {
|
||||
compatible = "espressif,esp32-spi";
|
||||
host = <SPI2_HOST>;
|
||||
pin-mosi = <&gpio0 19 GPIO_FLAG_NONE>;
|
||||
pin-sclk = <&gpio0 18 GPIO_FLAG_NONE>;
|
||||
pin-mosi = <19>;
|
||||
pin-sclk = <18>;
|
||||
};
|
||||
};
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
#include <driver/i2c.h>
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <tactility/error_esp32.h>
|
||||
#include <tactility/driver.h>
|
||||
#include <tactility/drivers/gpio_controller.h>
|
||||
@ -205,7 +207,8 @@ static error_t start(Device* device) {
|
||||
return ERROR_RESOURCE;
|
||||
}
|
||||
|
||||
auto* data = new Esp32SpiInternal(sda_descriptor, scl_descriptor);
|
||||
auto* data = new(std::nothrow) Esp32SpiInternal(sda_descriptor, scl_descriptor);
|
||||
if (data == nullptr) return ERROR_OUT_OF_MEMORY;
|
||||
|
||||
device_set_driver_data(device, data);
|
||||
return ERROR_NONE;
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
|
||||
#define GPIO_INTERNAL_API(driver) ((struct GpioControllerApi*)driver->api)
|
||||
#define GPIO_INTERNAL_API(driver) ((struct GpioControllerApi*)(driver)->api)
|
||||
|
||||
extern "C" {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user