pw_i2c: Adds a mocked initiator implementation

This is useful as a reusable mock when writing drivers. Specifically
this allows a driver developer to specify a set of mocked i2c
transactions. This does not require physical hardware and is ideal for
unit testing a driver.

Change-Id: I4e0f13450f84feeefeef534b6c46192462c18a8b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/37920
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
Reviewed-by: Ewout van Bekkum <ewout@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
6 files changed
tree: dde9dc0dd00065ea90458f280ecaa786c8dcd677
  1. build_overrides/
  2. docker/
  3. docs/
  4. pw_allocator/
  5. pw_analog/
  6. pw_arduino_build/
  7. pw_assert/
  8. pw_assert_basic/
  9. pw_assert_log/
  10. pw_base64/
  11. pw_bloat/
  12. pw_blob_store/
  13. pw_boot_armv7m/
  14. pw_build/
  15. pw_bytes/
  16. pw_checksum/
  17. pw_chrono/
  18. pw_chrono_embos/
  19. pw_chrono_freertos/
  20. pw_chrono_stl/
  21. pw_chrono_threadx/
  22. pw_cli/
  23. pw_containers/
  24. pw_cpu_exception/
  25. pw_cpu_exception_cortex_m/
  26. pw_docgen/
  27. pw_doctor/
  28. pw_env_setup/
  29. pw_fuzzer/
  30. pw_hdlc/
  31. pw_hex_dump/
  32. pw_i2c/
  33. pw_interrupt/
  34. pw_interrupt_cortex_m/
  35. pw_kvs/
  36. pw_libc/
  37. pw_log/
  38. pw_log_basic/
  39. pw_log_multisink/
  40. pw_log_null/
  41. pw_log_rpc/
  42. pw_log_sink/
  43. pw_log_tokenized/
  44. pw_malloc/
  45. pw_malloc_freelist/
  46. pw_metric/
  47. pw_minimal_cpp_stdlib/
  48. pw_module/
  49. pw_multisink/
  50. pw_package/
  51. pw_persistent_ram/
  52. pw_polyfill/
  53. pw_preprocessor/
  54. pw_presubmit/
  55. pw_protobuf/
  56. pw_protobuf_compiler/
  57. pw_random/
  58. pw_result/
  59. pw_ring_buffer/
  60. pw_router/
  61. pw_rpc/
  62. pw_snapshot/
  63. pw_span/
  64. pw_status/
  65. pw_stream/
  66. pw_string/
  67. pw_sync/
  68. pw_sync_baremetal/
  69. pw_sync_embos/
  70. pw_sync_freertos/
  71. pw_sync_stl/
  72. pw_sync_threadx/
  73. pw_sys_io/
  74. pw_sys_io_arduino/
  75. pw_sys_io_baremetal_lm3s6965evb/
  76. pw_sys_io_baremetal_stm32f429/
  77. pw_sys_io_stdio/
  78. pw_target_runner/
  79. pw_thread/
  80. pw_thread_embos/
  81. pw_thread_freertos/
  82. pw_thread_stl/
  83. pw_thread_threadx/
  84. pw_tokenizer/
  85. pw_tool/
  86. pw_toolchain/
  87. pw_trace/
  88. pw_trace_tokenized/
  89. pw_unit_test/
  90. pw_varint/
  91. pw_watch/
  92. pw_web_ui/
  93. targets/
  94. third_party/
  95. .bazelignore
  96. .bazelrc
  97. .clang-format
  98. .eslintrc.json
  99. .gitattributes
  100. .gitignore
  101. .gn
  102. .prettierrc.js
  103. .pylintrc
  104. activate.bat
  105. AUTHORS
  106. bootstrap.bat
  107. bootstrap.sh
  108. BUILD
  109. BUILD.gn
  110. BUILDCONFIG.gn
  111. CMakeLists.txt
  112. LICENSE
  113. modules.gni
  114. OWNERS
  115. package.json
  116. PW_PLUGINS
  117. README.md
  118. tsconfig.json
  119. WORKSPACE
  120. yarn.lock
README.md

See our website: http://pigweed.dev