mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-06 02:27:33 +00:00
Updated I2C for ESP32 and added mutex protection for printable serial
This commit is contained in:
@@ -6,13 +6,18 @@
|
||||
|
||||
#include <sta/bus/i2c/device.hpp>
|
||||
#include <sta/bus/i2c/i2c.hpp>
|
||||
#include <sta/mutex.hpp>
|
||||
|
||||
namespace sta
|
||||
{
|
||||
class ArduinoI2C : public I2C
|
||||
{
|
||||
public:
|
||||
#ifdef STA_PLATFORM_ARDUINO_DEVICE_ESP32
|
||||
ArduinoI2C(Mutex * mutex = nullptr, uint8_t sda = STA_ESP32_SDA_DEFAULT_PIN, uint8_t scl = STA_ESP32_SCL_DEFAULT_PIN, uint32_t frequency = 0U);
|
||||
#else
|
||||
ArduinoI2C(Mutex * mutex = nullptr);
|
||||
#endif // STA_PLATFORM_ARDUINO_DEVICE_ESP32
|
||||
|
||||
void transfer(uint8_t value) override;
|
||||
void transfer16(uint16_t value) override;
|
||||
|
Reference in New Issue
Block a user