summaryrefslogtreecommitdiff
path: root/misc/pascal/libpas/pswap.c
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-18 15:23:56 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-18 15:23:56 +0000
commitaf6cfa901fa8cc78607976e8ed8aedc195500aff (patch)
tree01b288357a8100791ef0e9b9fcb1e8810750018d /misc/pascal/libpas/pswap.c
parentccbfdaa527136fe47b2c3902f5b437860c8d3faf (diff)
downloadnuttx-af6cfa901fa8cc78607976e8ed8aedc195500aff.tar.gz
nuttx-af6cfa901fa8cc78607976e8ed8aedc195500aff.tar.bz2
nuttx-af6cfa901fa8cc78607976e8ed8aedc195500aff.zip
Update to use stdint/stdbool.h
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2382 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'misc/pascal/libpas/pswap.c')
-rw-r--r--misc/pascal/libpas/pswap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/misc/pascal/libpas/pswap.c b/misc/pascal/libpas/pswap.c
index 0bf4a31f8..772425993 100644
--- a/misc/pascal/libpas/pswap.c
+++ b/misc/pascal/libpas/pswap.c
@@ -2,7 +2,7 @@
* libpas/pswap.c
* Byte swapping to handling endian-ness conversions
*
- * Copyright (C) 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -38,6 +38,7 @@
* Included Files
**********************************************************************/
+#include <stdint.h>
#include <string.h>
#include "keywords.h"
@@ -46,12 +47,12 @@
/***********************************************************************/
-uint16 poffSwap16(uint16 val)
+uint16_t poffSwap16(uint16_t val)
{
return val >> 8 | val << 8;
}
-uint32 poffSwap32(uint32 val)
+uint32_t poffSwap32(uint32_t val)
{
return val >> 24 | ((val >> 8) & 0x0000ff00) | ((val << 8) & 0x00ff0000) | val << 24;
}