1
0
Fork 0
mirror of https://github.com/kou029w/megabit.git synced 2025-01-31 14:18:04 +00:00
megabit/classes/i2c.I2C.html

330 lines
14 KiB
HTML
Raw Normal View History

2020-02-11 00:08:19 +09:00
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>I2C | megabit</title>
2021-07-24 15:12:56 +00:00
<meta name="description" content="Documentation for megabit">
2020-02-11 00:08:19 +09:00
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
2021-07-24 15:12:56 +00:00
<script async src="../assets/js/search.js" id="search-script"></script>
2020-02-11 00:08:19 +09:00
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
2021-07-24 15:12:56 +00:00
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
2020-02-11 00:08:19 +09:00
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">megabit</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
2021-07-24 15:12:56 +00:00
<a href="../modules.html">megabit</a>
2020-02-11 00:08:19 +09:00
</li>
<li>
2021-07-24 15:12:56 +00:00
<a href="../modules/i2c.html">i2c</a>
</li>
<li>
<a href="i2c.I2C.html">I2C</a>
2020-02-11 00:08:19 +09:00
</li>
</ul>
<h1>Class I2C</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
2021-07-24 15:12:56 +00:00
<span class="tsd-signature-type">I2CPort</span>
2020-02-11 00:08:19 +09:00
<ul class="tsd-hierarchy">
<li>
<span class="target">I2C</span>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-inherited">
<h3>Constructors</h3>
<ul class="tsd-index-list">
2021-07-24 15:12:56 +00:00
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><a href="i2c.I2C.html#constructor" class="tsd-kind-icon">constructor</a></li>
2020-02-11 00:08:19 +09:00
</ul>
</section>
2021-07-24 15:12:56 +00:00
<section class="tsd-index-section tsd-is-external">
2020-02-11 00:08:19 +09:00
<h3>Accessors</h3>
<ul class="tsd-index-list">
2021-07-24 15:12:56 +00:00
<li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-external"><a href="i2c.I2C.html#portName" class="tsd-kind-icon">port<wbr>Name</a></li>
<li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-external"><a href="i2c.I2C.html#portNumber" class="tsd-kind-icon">port<wbr>Number</a></li>
2020-02-11 00:08:19 +09:00
</ul>
</section>
2021-07-24 15:12:56 +00:00
<section class="tsd-index-section tsd-is-inherited tsd-is-external">
2020-02-11 00:08:19 +09:00
<h3>Methods</h3>
<ul class="tsd-index-list">
2021-07-24 15:12:56 +00:00
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a href="i2c.I2C.html#open" class="tsd-kind-icon">open</a></li>
2020-02-11 00:08:19 +09:00
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-inherited">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited">
2021-07-24 15:12:56 +00:00
<li class="tsd-signature tsd-kind-icon">new <wbr>I2C<span class="tsd-signature-symbol">(</span>portNumber<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="i2c.I2C.html" class="tsd-signature-type" data-tsd-kind="Class">I2C</a></li>
2020-02-11 00:08:19 +09:00
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
2021-07-24 15:12:56 +00:00
<p>Inherited from I2CPort.constructor</p>
2020-02-11 00:08:19 +09:00
<ul>
2021-07-24 15:12:56 +00:00
<li>Defined in node_modules/node-web-i2c/index.ts:41</li>
2020-02-11 00:08:19 +09:00
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
2021-07-24 15:12:56 +00:00
<h5>portNumber: <span class="tsd-signature-type">number</span></h5>
2020-02-11 00:08:19 +09:00
</li>
</ul>
2021-07-24 15:12:56 +00:00
<h4 class="tsd-returns-title">Returns <a href="i2c.I2C.html" class="tsd-signature-type" data-tsd-kind="Class">I2C</a></h4>
2020-02-11 00:08:19 +09:00
</li>
</ul>
</section>
</section>
2021-07-24 15:12:56 +00:00
<section class="tsd-panel-group tsd-member-group tsd-is-external">
2020-02-11 00:08:19 +09:00
<h2>Accessors</h2>
2021-07-24 15:12:56 +00:00
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-external">
<a name="portName" class="tsd-anchor"></a>
2020-02-11 00:08:19 +09:00
<h3>port<wbr>Name</h3>
2021-07-24 15:12:56 +00:00
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-external">
2020-02-11 00:08:19 +09:00
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> portName<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/node-web-i2c/index.ts:49</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
</li>
</ul>
</section>
2021-07-24 15:12:56 +00:00
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-external">
<a name="portNumber" class="tsd-anchor"></a>
2020-02-11 00:08:19 +09:00
<h3>port<wbr>Number</h3>
2021-07-24 15:12:56 +00:00
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-external">
2020-02-11 00:08:19 +09:00
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> portNumber<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/node-web-i2c/index.ts:45</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
</li>
</ul>
</section>
</section>
2021-07-24 15:12:56 +00:00
<section class="tsd-panel-group tsd-member-group tsd-is-inherited tsd-is-external">
2020-02-11 00:08:19 +09:00
<h2>Methods</h2>
2021-07-24 15:12:56 +00:00
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external">
2020-02-11 00:08:19 +09:00
<a name="open" class="tsd-anchor"></a>
<h3>open</h3>
2021-07-24 15:12:56 +00:00
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external">
<li class="tsd-signature tsd-kind-icon">open<span class="tsd-signature-symbol">(</span>slaveAddress<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/i2c.I2CSlaveDevice.html" class="tsd-signature-type" data-tsd-kind="Interface">I2CSlaveDevice</a><span class="tsd-signature-symbol">&gt;</span></li>
2020-02-11 00:08:19 +09:00
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
2021-07-24 15:12:56 +00:00
<p>Inherited from I2CPort.open</p>
2020-02-11 00:08:19 +09:00
<ul>
<li>Defined in node_modules/node-web-i2c/index.ts:53</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
2021-07-24 15:12:56 +00:00
<h5>slaveAddress: <span class="tsd-signature-type">number</span></h5>
2020-02-11 00:08:19 +09:00
</li>
</ul>
2021-07-24 15:12:56 +00:00
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/i2c.I2CSlaveDevice.html" class="tsd-signature-type" data-tsd-kind="Interface">I2CSlaveDevice</a><span class="tsd-signature-symbol">&gt;</span></h4>
2020-02-11 00:08:19 +09:00
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
2021-07-24 15:12:56 +00:00
<li class=" ">
<a href="../modules.html">Modules</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/Device.html">Device</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/ads1015.html">ads1015</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/adt7410.html">adt7410</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/adxl345.html">adxl345</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/gp2y0e03.html">gp2y0e03</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/gpio.html">gpio</a>
</li>
<li class="current tsd-kind-module">
<a href="../modules/i2c.html">i2c</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/index.html">index</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/mpr121.html">mpr121</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/paj7620.html">paj7620</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/pca9685.html">pca9685</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/s11059.html">s11059</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/sht30.html">sht30</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/ssd1306.html">ssd1306</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/ssd1308.html">ssd1308</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/tsl2561.html">tsl2561</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/veml6070.html">veml6070</a>
</li>
<li class=" tsd-kind-module">
<a href="../modules/vl53l0x.html">vl53l0x</a>
2020-02-11 00:08:19 +09:00
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
2021-07-24 15:12:56 +00:00
<li class=" tsd-kind-reference tsd-parent-kind-module">
<a href="../modules/i2c.html#default" class="tsd-kind-icon">default</a>
</li>
2020-02-11 00:08:19 +09:00
</ul>
<ul class="current">
2021-07-24 15:12:56 +00:00
<li class="current tsd-kind-class tsd-parent-kind-module">
<a href="i2c.I2C.html" class="tsd-kind-icon">I2C</a>
2020-02-11 00:08:19 +09:00
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited">
2021-07-24 15:12:56 +00:00
<a href="i2c.I2C.html#constructor" class="tsd-kind-icon">constructor</a>
2020-02-11 00:08:19 +09:00
</li>
2021-07-24 15:12:56 +00:00
<li class=" tsd-kind-get-signature tsd-parent-kind-class tsd-is-external">
<a href="i2c.I2C.html#portName" class="tsd-kind-icon">port<wbr>Name</a>
2020-02-11 00:08:19 +09:00
</li>
2021-07-24 15:12:56 +00:00
<li class=" tsd-kind-get-signature tsd-parent-kind-class tsd-is-external">
<a href="i2c.I2C.html#portNumber" class="tsd-kind-icon">port<wbr>Number</a>
2020-02-11 00:08:19 +09:00
</li>
2021-07-24 15:12:56 +00:00
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-external">
<a href="i2c.I2C.html#open" class="tsd-kind-icon">open</a>
2020-02-11 00:08:19 +09:00
</li>
</ul>
</li>
</ul>
<ul class="after-current">
2021-07-24 15:12:56 +00:00
<li class=" tsd-kind-interface tsd-parent-kind-module tsd-is-external">
<a href="../interfaces/i2c.I2CSlaveDevice.html" class="tsd-kind-icon">I2CSlave<wbr>Device</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module">
<a href="../modules/i2c.html#i2c-1" class="tsd-kind-icon">i2c</a>
</li>
<li class=" tsd-kind-function tsd-parent-kind-module tsd-is-external">
<a href="../modules/i2c.html#requestI2CAccess" class="tsd-kind-icon">request<wbr>I2CAccess</a>
</li>
2020-02-11 00:08:19 +09:00
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>