mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-09-29 05:17:33 +00:00
Added I2C support for raspi & first rework of debugging
This commit is contained in:
23
src/bus/i2c/device.cpp
Normal file
23
src/bus/i2c/device.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <sta/bus/i2c/device.hpp>
|
||||
|
||||
#include <sta/assert.hpp>
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
I2cDevice::I2cDevice(I2c * intf, int addr)
|
||||
: Device{intf}, addr_{addr}
|
||||
{
|
||||
STA_ASSERT(intf != nullptr);
|
||||
}
|
||||
|
||||
void I2cDevice::select()
|
||||
{
|
||||
// TODO: Implement address selection here?
|
||||
}
|
||||
|
||||
void I2cDevice::deselect()
|
||||
{
|
||||
// TODO: Implement address deselection here?
|
||||
}
|
||||
} // namespace sta
|
11
src/bus/i2c/i2c.cpp
Normal file
11
src/bus/i2c/i2c.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <sta/bus/i2c/i2c.hpp>
|
||||
|
||||
|
||||
namespace sta
|
||||
{
|
||||
I2c::I2c(Mutex * mutex=nullptr)
|
||||
: Interface{mutex}
|
||||
{
|
||||
|
||||
}
|
||||
} // namespace sta
|
Reference in New Issue
Block a user