summaryrefslogtreecommitdiff
path: root/src/flash/nand_ecc.c
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-18 07:06:25 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-18 07:06:25 +0000
commit310be8a838c9db6b67bc4d6d7d3c7ff41b32af4c (patch)
treef345d52ac4c5e3b57ceb34038561884198599c53 /src/flash/nand_ecc.c
parent86173cdbddde781b19ac630602f2d450a59b32b5 (diff)
downloadopenocd+libswd-310be8a838c9db6b67bc4d6d7d3c7ff41b32af4c.tar.gz
openocd+libswd-310be8a838c9db6b67bc4d6d7d3c7ff41b32af4c.tar.bz2
openocd+libswd-310be8a838c9db6b67bc4d6d7d3c7ff41b32af4c.tar.xz
openocd+libswd-310be8a838c9db6b67bc4d6d7d3c7ff41b32af4c.zip
Transform 'u8' to 'uint8_t' in src/flash
- Replace '\([^_]\)u8' with '\1uint8_t'. - Replace '^u8' with 'uint8_t'. git-svn-id: svn://svn.berlios.de/openocd/trunk@2275 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/nand_ecc.c')
-rw-r--r--src/flash/nand_ecc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/flash/nand_ecc.c b/src/flash/nand_ecc.c
index c1a18835..567e3b38 100644
--- a/src/flash/nand_ecc.c
+++ b/src/flash/nand_ecc.c
@@ -46,7 +46,7 @@
/*
* Pre-calculated 256-way 1 byte column parity
*/
-static const u8 nand_ecc_precalc_table[] = {
+static const uint8_t nand_ecc_precalc_table[] = {
0x00, 0x55, 0x56, 0x03, 0x59, 0x0c, 0x0f, 0x5a, 0x5a, 0x0f, 0x0c, 0x59, 0x03, 0x56, 0x55, 0x00,
0x65, 0x30, 0x33, 0x66, 0x3c, 0x69, 0x6a, 0x3f, 0x3f, 0x6a, 0x69, 0x3c, 0x66, 0x33, 0x30, 0x65,
0x66, 0x33, 0x30, 0x65, 0x3f, 0x6a, 0x69, 0x3c, 0x3c, 0x69, 0x6a, 0x3f, 0x65, 0x30, 0x33, 0x66,
@@ -68,9 +68,9 @@ static const u8 nand_ecc_precalc_table[] = {
/*
* nand_calculate_ecc - Calculate 3-byte ECC for 256-byte block
*/
-int nand_calculate_ecc(struct nand_device_s *device, const u8 *dat, u8 *ecc_code)
+int nand_calculate_ecc(struct nand_device_s *device, const uint8_t *dat, uint8_t *ecc_code)
{
- u8 idx, reg1, reg2, reg3, tmp1, tmp2;
+ uint8_t idx, reg1, reg2, reg3, tmp1, tmp2;
int i;
/* Initialize variables */
@@ -84,8 +84,8 @@ int nand_calculate_ecc(struct nand_device_s *device, const u8 *dat, u8 *ecc_code
/* All bit XOR = 1 ? */
if (idx & 0x40) {
- reg3 ^= (u8) i;
- reg2 ^= ~((u8) i);
+ reg3 ^= (uint8_t) i;
+ reg2 ^= ~((uint8_t) i);
}
}