essl_spi_write_reg() function
Write to the shared registers
Arguments
arg
Context of the component. (Member ``arg`` from ``essl_handle_t``)
addr
Address of the shared registers. (Valid: 0 ~ SOC_SPI_MAXIMUM_BUFFER_SIZE, registers for M/S sync are reserved, see note1)
value
Buffer for data to send, should be align to 4.
out_value
Not supported, should be set to NULL.
wait_ms
Time to wait before timeout (reserved for future use, user should set this to 0).
Return value
- ESP_OK: success - ESP_ERR_INVALID_STATE: ESSL SPI has not been initialized. - ESP_ERR_INVALID_ARG: The address argument is not valid. See note 1. - ESP_ERR_NOT_SUPPORTED: Should set ``out_value`` to NULL. See note 2. - or other return value from :cpp:func:`spi_device_transmit`.
Notes
The registers for Master/Slave synchronization are reserved. Do not use them. (see `tx_sync_reg` in `essl_spi_config_t`) Feature of checking the actual written value (``out_value``) is not supported.