diff --git a/examples/AirQualitySensor/AirQualitySensor.ino b/examples/AirQualitySensor/AirQualitySensor.ino index 120eebc82..6caac2fca 100644 --- a/examples/AirQualitySensor/AirQualitySensor.ino +++ b/examples/AirQualitySensor/AirQualitySensor.ino @@ -214,7 +214,7 @@ Remarks: By using the slope and a point of the line. The x(logarithmic value of logarithmic coordinate, power of 10 is used to convert the result to non-logarithmic value. ************************************************************************************/ -int MQGetPercentage(float rs_ro_ratio, float *pcurve) +int MQGetPercentage(float rs_ro_ratio, const float *pcurve) { return (pow(10,( ((log(rs_ro_ratio)-pcurve[1])/pcurve[2]) + pcurve[0]))); } diff --git a/examples/SecurityPersonalizer/sha204_library.cpp b/examples/SecurityPersonalizer/sha204_library.cpp index 0d44cc1b6..0473700d8 100644 --- a/examples/SecurityPersonalizer/sha204_library.cpp +++ b/examples/SecurityPersonalizer/sha204_library.cpp @@ -59,7 +59,8 @@ uint8_t atsha204Class::getSerialNumber(uint8_t * response) /* Calculates CRC16 value of provided data (and optionally including provided existing CRC16 data) returns the calculated CRC16 value */ -uint16_t atsha204Class::calculateAndUpdateCrc(uint8_t length, uint8_t *data, uint16_t current_crc) +uint16_t atsha204Class::calculateAndUpdateCrc(uint8_t length, const uint8_t *data, + uint16_t current_crc) { uint8_t counter; uint16_t crc_register = current_crc; @@ -96,7 +97,7 @@ void atsha204Class::swi_set_signal_pin(uint8_t is_high) } -uint8_t atsha204Class::swi_send_bytes(uint8_t count, uint8_t *buffer) +uint8_t atsha204Class::swi_send_bytes(uint8_t count, const uint8_t *buffer) { uint8_t i, bit_mask; @@ -707,9 +708,9 @@ uint8_t atsha204Class::sha204m_execute(uint8_t op_code, uint8_t param1, uint16_t } uint8_t atsha204Class::sha204m_check_parameters(uint8_t op_code, uint8_t param1, uint16_t param2, - uint8_t datalen1, uint8_t *data1, uint8_t datalen2, uint8_t *data2, uint8_t datalen3, - uint8_t *data3, - uint8_t tx_size, uint8_t *tx_buffer, uint8_t rx_size, uint8_t *rx_buffer) + uint8_t datalen1, const uint8_t *data1, uint8_t datalen2, const uint8_t *data2, uint8_t datalen3, + const uint8_t *data3, uint8_t tx_size, const uint8_t *tx_buffer, uint8_t rx_size, + const uint8_t *rx_buffer) { #ifdef SHA204_CHECK_PARAMETERS diff --git a/hal/crypto/generic/drivers/AES/AES.cpp b/hal/crypto/generic/drivers/AES/AES.cpp index 5f35bb159..d541e31d9 100644 --- a/hal/crypto/generic/drivers/AES/AES.cpp +++ b/hal/crypto/generic/drivers/AES/AES.cpp @@ -201,7 +201,7 @@ static void inv_shift_sub_rows (byte st[N_BLOCK]) /* SUB COLUMNS PHASE */ -static void mix_sub_columns (byte dt[N_BLOCK], byte st[N_BLOCK]) +static void mix_sub_columns (byte dt[N_BLOCK], const byte st[N_BLOCK]) { byte j = 5 ; byte k = 10 ; @@ -223,7 +223,7 @@ static void mix_sub_columns (byte dt[N_BLOCK], byte st[N_BLOCK]) } } -static void inv_mix_sub_columns (byte dt[N_BLOCK], byte st[N_BLOCK]) +static void inv_mix_sub_columns (byte dt[N_BLOCK], const byte st[N_BLOCK]) { for (byte i = 0 ; i < N_BLOCK ; i += N_COL) { byte a1 = st [i] ;