[Style] Coding style fixes.

* No trailing white spaces
 * No sapces before tabs
 * "int *var" and not "int * var"
This commit is contained in:
Piotr Esden-Tempski
2013-06-30 22:09:25 -07:00
parent 035c67ced6
commit 647b878031
5 changed files with 78 additions and 77 deletions

View File

@@ -256,7 +256,7 @@ typedef enum {
DECRYPT_DES_CBC = CRYP_CR_ALGOMODE_DES_CBC | CRYP_CR_ALGODIR, DECRYPT_DES_CBC = CRYP_CR_ALGOMODE_DES_CBC | CRYP_CR_ALGODIR,
DECRYPT_AES_ECB = CRYP_CR_ALGOMODE_AES_ECB | CRYP_CR_ALGODIR, DECRYPT_AES_ECB = CRYP_CR_ALGOMODE_AES_ECB | CRYP_CR_ALGODIR,
DECRYPT_AES_CBC = CRYP_CR_ALGOMODE_AES_CBC | CRYP_CR_ALGODIR, DECRYPT_AES_CBC = CRYP_CR_ALGOMODE_AES_CBC | CRYP_CR_ALGODIR,
DECRYPT_AES_CTR = CRYP_CR_ALGOMODE_AES_CTR, /* XOR is same ENC as DEC */ DECRYPT_AES_CTR = CRYP_CR_ALGOMODE_AES_CTR,/* XOR is same ENC as DEC */
} crypto_mode_t; } crypto_mode_t;
typedef enum { typedef enum {
CRYPTO_KEY_128BIT = 0, CRYPTO_KEY_128BIT = 0,
@@ -279,13 +279,14 @@ void crypto_set_datatype(crypto_datatype_t datatype);
void crypto_set_algorithm(crypto_mode_t mode); void crypto_set_algorithm(crypto_mode_t mode);
void crypto_start(void); void crypto_start(void);
void crypto_stop(void); void crypto_stop(void);
uint32_t crypto_process_block(uint32_t * inp, uint32_t * outp, uint32_t length); uint32_t crypto_process_block(uint32_t *inp, uint32_t *outp, uint32_t length);
END_DECLS END_DECLS
/**@}*/ /**@}*/
/**@}*/ /**@}*/
#endif #endif
/** @cond */ /** @cond */
#else #else
#warning "crypto_common_f24.h should not be included explicitly, only via crypto.h" #warning "crypto_common_f24.h should not be included explicitly, "
"only via crypto.h"
#endif #endif
/** @endcond */ /** @endcond */

View File

@@ -89,7 +89,7 @@ typedef enum {
BEGIN_DECLS BEGIN_DECLS
void crypto_context_swap(uint32_t * buf); void crypto_context_swap(uint32_t *buf);
void crypto_set_mac_algorithm(crypto_mode_mac_t mode); void crypto_set_mac_algorithm(crypto_mode_mac_t mode);
END_DECLS END_DECLS

View File

@@ -41,7 +41,7 @@
*/ */
void crypto_wait_busy(void) void crypto_wait_busy(void)
{ {
while (CRYP_SR & CRYP_SR_BUSY) ; while (CRYP_SR & CRYP_SR_BUSY);
} }
/** /**
@@ -149,7 +149,7 @@ void crypto_stop(void)
* *
* @returns uint32_t Number of written words * @returns uint32_t Number of written words
*/ */
uint32_t crypto_process_block(uint32_t * inp, uint32_t * outp, uint32_t length) uint32_t crypto_process_block(uint32_t *inp, uint32_t *outp, uint32_t length)
{ {
uint32_t rd = 0, wr = 0; uint32_t rd = 0, wr = 0;

View File

@@ -46,7 +46,7 @@ void crypto_set_mac_algorithm(crypto_mode_mac_t mode)
* *
*@param[in] buf uint32_t Memory space for swap (16 items length) *@param[in] buf uint32_t Memory space for swap (16 items length)
*/ */
void crypto_context_swap(uint32_t * buf) void crypto_context_swap(uint32_t *buf)
{ {
int i; int i;
/* Apply exact order of ? */ /* Apply exact order of ? */