mirror of
https://github.com/apache/nuttx.git
synced 2026-09-07 09:26:38 +00:00
documentation: document esp32s2-saola-1:efuse defconfig
Adds description for the efuse defconfig on esp32s2-saola-1 board. Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This commit is contained in:
parent
2916e091ff
commit
76e1c97642
1 changed files with 36 additions and 0 deletions
|
|
@ -232,6 +232,42 @@ was successful by running ``cxxtest``::
|
|||
Invalid file! /invalid
|
||||
File /proc/version exists!
|
||||
|
||||
efuse
|
||||
-----
|
||||
|
||||
This configuration demonstrates the use of the E-Fuse driver. It can be accessed
|
||||
through the ``/dev/efuse`` device file.
|
||||
Virtual E-Fuse mode can be used by enabling `CONFIG_ESPRESSIF_EFUSE_VIRTUAL`
|
||||
option to prevent possible damages on chip.
|
||||
|
||||
The following snippet demonstrates how to read MAC address:
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
int fd;
|
||||
int ret;
|
||||
uint8_t mac[6];
|
||||
struct efuse_param_s param;
|
||||
struct efuse_desc_s mac_addr =
|
||||
{
|
||||
.bit_offset = 1,
|
||||
.bit_count = 48
|
||||
};
|
||||
|
||||
const efuse_desc_t* desc[] =
|
||||
{
|
||||
&mac_addr,
|
||||
NULL
|
||||
};
|
||||
param.field = desc;
|
||||
param.size = 48;
|
||||
param.data = mac;
|
||||
|
||||
fd = open("/dev/efuse", O_RDONLY);
|
||||
ret = ioctl(fd, EFUSEIOC_READ_FIELD, ¶m);
|
||||
|
||||
To find offset and count variables for related E-Fuse, please refer to Espressif's Technical Reference Manuals.
|
||||
|
||||
gpio
|
||||
----
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue