Merge branch 'raspi-support' of ssh://git.intern.spaceteamaachen.de:22222/ALPAKA/sta-core into raspi-support

This commit is contained in:
dario
2023-08-20 17:39:17 +02:00
5 changed files with 46 additions and 20 deletions

View File

@@ -18,11 +18,10 @@ namespace sta
* @param intf %I2C hardware interface
* @param csPin The peripheral's address.
*/
I2CDevice(I2C * intf, int address, bool master=false, bool blocking=true);
I2CDevice(I2C * intf, int address, bool master=true, bool blocking=true);
protected:
void select() override;
void deselect() override;
private:

View File

@@ -1,7 +1,8 @@
#ifndef STA_CONFIG_HPP
#define STA_CONFIG_HPP
#include <sta/devices/stm32/mcu/STM32F411xE.hpp>
// #include <sta/devices/stm32/mcu/STM32F411xE.hpp>
#include <sta/devices/raspi/mcu/common.hpp>
#define STA_DEBUGGING_ENABLED
#define STA_PRINTF_USE_STDLIB

View File

@@ -28,6 +28,7 @@ namespace sta
void transfer(const uint8_t * buffer, size_t size) override;
void receive(uint8_t * buffer, size_t size) override;
void selectAddress();
void acquire() override;
void release() override;
@@ -41,7 +42,8 @@ namespace sta
class RaspiI2CDevice : public I2CDevice
{
RaspiI2CDevice(RaspiI2C * intf, uint16_t address_10bit, Mutex* mutex=nullptr, bool master=false, bool blocking=true);
public:
RaspiI2CDevice(RaspiI2C * intf, uint16_t address_10bit, bool master=true, bool blocking=true);
};
} // namespace sta