mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 23:59:49 -04:00
i2c: implement remaining required driver logic
This commit is contained in:
parent
258cfb62a2
commit
323e893433
14 changed files with 307 additions and 17 deletions
|
@ -39,7 +39,7 @@ namespace ams::i2c::driver {
|
|||
|
||||
Result ExecuteCommandList(void *dst, size_t dst_size, I2cSession &session, const void *src, size_t src_size);
|
||||
|
||||
Result SetRetryPolicy(I2cSession &session, int max_retry_count, int retry_interval_ms);
|
||||
Result SetRetryPolicy(I2cSession &session, int max_retry_count, int retry_interval_us);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace ams::i2c::driver::impl {
|
|||
Result Send(const void *src, size_t src_size, TransactionOption option);
|
||||
Result Receive(void *dst, size_t dst_size, TransactionOption option);
|
||||
Result ExecuteCommandList(void *dst, size_t dst_size, const void *src, size_t src_size);
|
||||
Result SetRetryPolicy(int mr, int interval_ms);
|
||||
Result SetRetryPolicy(int mr, int interval_us);
|
||||
};
|
||||
static_assert( sizeof(I2cSessionImpl) <= I2cSessionSize);
|
||||
static_assert(alignof(I2cSessionImpl) <= I2cSessionAlign);
|
||||
|
|
|
@ -31,6 +31,6 @@ namespace ams::i2c {
|
|||
|
||||
Result ExecuteCommandList(void *dst, size_t dst_size, const I2cSession &session, const void *src, size_t src_size);
|
||||
|
||||
void SetRetryPolicy(const I2cSession &session, int max_retry_count, int retry_interval_ms);
|
||||
void SetRetryPolicy(const I2cSession &session, int max_retry_count, int retry_interval_us);
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace ams::i2c::sf {
|
|||
AMS_SF_METHOD_INFO(C, H, 10, Result, Send, (const ams::sf::InAutoSelectBuffer &in_data, i2c::TransactionOption option) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 11, Result, Receive, (const ams::sf::OutAutoSelectBuffer &out_data, i2c::TransactionOption option) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 12, Result, ExecuteCommandList, (const ams::sf::OutAutoSelectBuffer &rcv_buf, const ams::sf::InPointerArray<i2c::I2cCommand> &command_list) ) \
|
||||
AMS_SF_METHOD_INFO(C, H, 13, Result, SetRetryPolicy, (s32 max_retry_count, s32 retry_interval_ms), hos::Version_6_0_0 )
|
||||
AMS_SF_METHOD_INFO(C, H, 13, Result, SetRetryPolicy, (s32 max_retry_count, s32 retry_interval_us), hos::Version_6_0_0 )
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(ISession, AMS_I2C_I_SESSION_INTERFACE_INFO)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue