mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-08-06 10:27:34 +00:00
Added I2C address scan
This commit is contained in:
@@ -35,11 +35,19 @@ namespace sta
|
||||
*/
|
||||
void setSettings(uint16_t address, bool master, bool blocking);
|
||||
|
||||
/**
|
||||
* @brief Checks if a device with the given address is connected to the I2C bus.
|
||||
*
|
||||
* @param address The address to check availability for.
|
||||
* @return true if the address exists, false otherwise.
|
||||
*/
|
||||
virtual bool hasAddress(int address) = 0;
|
||||
|
||||
/**
|
||||
* @brief Prints all available addresses via the debug printable.
|
||||
*
|
||||
*/
|
||||
virtual void addressScan() = 0;
|
||||
void scanAddresses();
|
||||
protected:
|
||||
/// @brief The peripheral's address to communicate with.
|
||||
uint16_t address_;
|
||||
|
Reference in New Issue
Block a user