X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/81cd0474cb4dc85fcc78f70ad238cb684851f75f..5f91a683b7f3b3b9217db9407a13b1d738070f01:/armsrc/util.c diff --git a/armsrc/util.c b/armsrc/util.c index 3870a6c6..f2298290 100644 --- a/armsrc/util.c +++ b/armsrc/util.c @@ -12,6 +12,10 @@ #include "util.h" #include "string.h" +size_t nbytes(size_t nbits) { + return (nbits/8)+((nbits%8)>0); +} + uint32_t SwapBits(uint32_t value, int nrbits) { int i; uint32_t newvalue = 0;