arch: lpc43xx: Mixed Case Identifier fix

Fix for Mixed Case Identifier reported by nxstyle tool.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea 2021-04-08 12:45:02 +02:00 committed by Xiang Xiao
parent 602d384325
commit 42d17dcaf4
2 changed files with 19 additions and 18 deletions

View File

@ -53,42 +53,43 @@ struct lpc43_aes_s
{ {
/* Initialize the AES engine */ /* Initialize the AES engine */
void (*aes_Init)(void); void (*aes_init)(void);
/* Offset 0x04 -- Defines AES engine operation mode. /* Offset 0x04 -- Defines AES engine operation mode.
* See enum lpc43_aescmd_e * See enum lpc43_aescmd_e
*/ */
unsigned int (*aes_SetMode)(unsigned int cmd); unsigned int (*aes_set_mode)(unsigned int cmd);
/* Load 128-bit AES user keys */ /* Load 128-bit AES user keys */
void (*aes_LoadKey1)(void); void (*aes_load_key1)(void);
void (*aes_LoadKey2)(void); void (*aes_load_key2)(void);
/* Loads randomly generated key in AES engine. To update the RNG and load /* Loads randomly generated key in AES engine. To update the RNG and load
* a new random number, use the API call otp_GenRand before aes_LoadKeyRNG. * a new random number, use the API call otp_GenRand before
* aes_load_key_rng.
*/ */
void (*aes_LoadKeyRNG)(void); void (*aes_load_key_rng)(void);
/* Loads 128-bit AES software defined user key (16 bytes) */ /* Loads 128-bit AES software defined user key (16 bytes) */
void (*aes_LoadKeySW)(const unsigned char *key); void (*aes_load_key_sw)(const unsigned char *key);
/* Loads 128-bit AES initialization vector (16 bytes) */ /* Loads 128-bit AES initialization vector (16 bytes) */
void (*aes_LoadIV_SW)(const unsigned char *iv); void (*aes_load_iv_sw)(const unsigned char *iv);
/* Loads 128-bit AES IC specific initialization vector, which is used to /* Loads 128-bit AES IC specific initialization vector, which is used to
* decrypt a boot image. * decrypt a boot image.
*/ */
void (*aes_LoadIV_IC)(void); void (*aes_load_iv_ic)(void);
/* Process data */ /* Process data */
unsigned int (*aes_Operate)(unsigned char *out, unsigned int (*aes_operate)(unsigned char *out,
const unsigned char *in, unsigned blocks); const unsigned char *in, unsigned blocks);
}; };

View File

@ -106,33 +106,33 @@ static int aes_init(FAR const void *iv,
AES_API_CMD_DECODE_ECB : AES_API_CMD_DECODE_CBC; AES_API_CMD_DECODE_ECB : AES_API_CMD_DECODE_CBC;
} }
g_aes->aes_Init(); g_aes->aes_init();
if (key != NULL) if (key != NULL)
{ {
g_aes->aes_LoadKeySW(key); g_aes->aes_load_key_sw(key);
} }
else else
{ {
switch (keysize) switch (keysize)
{ {
case 0: case 0:
g_aes->aes_LoadKey1(); g_aes->aes_load_key1();
break; break;
case 1: case 1:
g_aes->aes_LoadKey2(); g_aes->aes_load_key2();
break; break;
case 2: case 2:
g_aes->aes_LoadKeyRNG(); g_aes->aes_load_key_rng();
break; break;
} }
} }
g_aes->aes_LoadIV_SW((const unsigned char *)iv); g_aes->aes_load_iv_sw((const unsigned char *)iv);
ret = g_aes->aes_SetMode(cmd); ret = g_aes->aes_set_mode(cmd);
switch (ret) switch (ret)
{ {
case AES_API_ERR_WRONG_CMD: case AES_API_ERR_WRONG_CMD:
@ -170,7 +170,7 @@ static int aes_update(FAR const void *out,
return -EINVAL; return -EINVAL;
} }
return g_aes->aes_Operate((unsigned char *)out, return g_aes->aes_operate((unsigned char *)out,
(unsigned char *)in, inl / 16); (unsigned char *)in, inl / 16);
} }