Pigweed
 
Loading...
Searching...
No Matches
pw::i2c::I2cService Class Referencefinal

RPC service for performing I2C transactions. More...

#include <i2c_service.h>

Inheritance diagram for pw::i2c::I2cService:

Public Types

using InitiatorSelector = pw::Function< Initiator *(size_t pos)>
 

Public Member Functions

 I2cService (InitiatorSelector &&initiator_selector)
 Creates an I2cService instance.
 
void I2cWrite (const pwpb::I2cWriteRequest::Message &request, pw::rpc::PwpbUnaryResponder< pwpb::I2cWriteResponse::Message > &responder)
 Writes a message to the specified I2C device register.
 
void I2cRead (const pwpb::I2cReadRequest::Message &request, pw::rpc::PwpbUnaryResponder< pwpb::I2cReadResponse::Message > &responder)
 Reads a message from the specified I2C device register.
 

Detailed Description

RPC service for performing I2C transactions.

Member Typedef Documentation

◆ InitiatorSelector

A callback that returns a pw::i2c::Initiator instance for the given bus index position or nullptr if the position is not valid for this I2C device.


The documentation for this class was generated from the following file: