11/*
2- * SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
2+ * SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
@@ -37,14 +37,24 @@ static inline void sha_ll_reset_register(void)
3737 PCR .hmac_conf .hmac_rst_en = 0 ;
3838}
3939
40+ /**
41+ * @brief Load the mode for the SHA engine
42+ *
43+ * @param sha_type The SHA algorithm type
44+ */
45+ static inline void sha_ll_set_mode (esp_sha_type sha_type )
46+ {
47+ REG_WRITE (SHA_MODE_REG , sha_type );
48+ }
49+
4050/**
4151 * @brief Start a new SHA block conversions (no initial hash in HW)
4252 *
4353 * @param sha_type The SHA algorithm type
4454 */
4555static inline void sha_ll_start_block (esp_sha_type sha_type )
4656{
47- REG_WRITE ( SHA_MODE_REG , sha_type ) ;
57+ ( void ) sha_type ;
4858 REG_WRITE (SHA_START_REG , 1 );
4959}
5060
@@ -55,29 +65,23 @@ static inline void sha_ll_start_block(esp_sha_type sha_type)
5565 */
5666static inline void sha_ll_continue_block (esp_sha_type sha_type )
5767{
58- REG_WRITE ( SHA_MODE_REG , sha_type ) ;
68+ ( void ) sha_type ;
5969 REG_WRITE (SHA_CONTINUE_REG , 1 );
6070}
6171
6272/**
6373 * @brief Start a new SHA message conversion using DMA (no initial hash in HW)
64- *
65- * @param sha_type The SHA algorithm type
6674 */
67- static inline void sha_ll_start_dma (esp_sha_type sha_type )
75+ static inline void sha_ll_start_dma (void )
6876{
69- REG_WRITE (SHA_MODE_REG , sha_type );
7077 REG_WRITE (SHA_DMA_START_REG , 1 );
7178}
7279
7380/**
7481 * @brief Continue a SHA message conversion using DMA (initial hash in HW)
75- *
76- * @param sha_type The SHA algorithm type
7782 */
78- static inline void sha_ll_continue_dma (esp_sha_type sha_type )
83+ static inline void sha_ll_continue_dma (void )
7984{
80- REG_WRITE (SHA_MODE_REG , sha_type );
8185 REG_WRITE (SHA_DMA_CONTINUE_REG , 1 );
8286}
8387
0 commit comments