esp32
--- EDS32 に固有の機能¶
esp32
モジュールは、ESP32 モジュールに固有の制御を目的とした関数とクラスが含まれています。
関数¶
-
esp32.
wake_on_touch
(wake)¶ タッチでデバイスをスリープから復帰させるかどうかを設定します。 wake はブール型でなければなりません。
-
esp32.
wake_on_ext0
(pin, level)¶ EXT0 がデバイスをスリープから復帰させる方法を設定します。 pin には
None
あるいは有効な Pin オブジェクトを指定します。 level にはesp32.WAKEUP_ALL_LOW
またはesp32.WAKEUP_ANY_HIGH
を指定する必要があります。
-
esp32.
wake_on_ext1
(pins, level)¶ EXT1 がデバイスをスリープから復帰させる方法を設定します。 pin には
None
あるいは有効な Pin オブジェクトのタプル/リストを指定します。 level にはesp32.WAKEUP_ALL_LOW
またはesp32.WAKEUP_ANY_HIGH
を指定する必要があります。
-
esp32.
raw_temperature
()¶ 内部温度センサーの素の値を読み、整数を返します。
-
esp32.
hall_sensor
()¶ 内部ホールセンサーの素の値を読み、整数を返します。
Flash partitions¶
This class gives access to the partitions in the device's flash memory.
-
class
esp32.
Partition
(id)¶ Create an object representing a partition. id can be a string which is the label of the partition to retrieve, or one of the constants:
BOOT
orRUNNING
.
-
classmethod
Partition.
find
(type=TYPE_APP, subtype=0xff, label=None)¶ Find a partition specified by type, subtype and label. Returns a (possibly empty) list of Partition objects.
-
Partition.
info
()¶ Returns a 6-tuple
(type, subtype, addr, size, label, encrypted)
.
-
Partition.
readblocks
(block_num, buf)¶
-
Partition.
writeblocks
(block_num, buf)¶
-
Partition.
ioctl
(cmd, arg)¶ These methods implement the block protocol defined by
uos.AbstractBlockDev
.
-
Partition.
set_boot
()¶ Sets the partition as the boot partition.
-
Partition.
get_next_update
()¶ Gets the next update partition after this one, and returns a new Partition object.