28 lines
		
	
	
		
			522 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			522 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * I2C.hpp
 | |
|  *
 | |
|  *  Created on: Aug 5, 2023
 | |
|  *      Author: Carst
 | |
|  */
 | |
| 
 | |
| #ifndef I2C_HPP_
 | |
| #define I2C_HPP_
 | |
| 
 | |
| #include <cstdint>
 | |
| 
 | |
| namespace ElektronischeLast
 | |
| {
 | |
|   class iI2C
 | |
|   {
 | |
|     public:
 | |
|       iI2C(std::uint8_t device_address);
 | |
|       ~iI2C(void);
 | |
|       bool read(std::uint32_t address, std::uint32_t length, std::uint8_t buffer[]);
 | |
|       bool write(std::uint32_t address, std::uint32_t length, std::uint8_t buffer[]);
 | |
|     private:
 | |
|       std::uint8_t device_address;
 | |
|   };
 | |
| }
 | |
| 
 | |
| #endif /* I2C_HPP_ */
 |