Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface mbed-rtos
TypeCode.cpp
- Committer:
- ysuga
- Date:
- 2013-08-29
- Revision:
- 7:6c7af1d50fb3
- Parent:
- 0:5f7bc45bc2e8
File content as of revision 7:6c7af1d50fb3:
#include <ctype.h>
#include "TypeCode.h"
uint8_t TypeCode_isSequence(const char typeCode) {
return isupper(typeCode);
}
uint8_t TypeCode_getElementSize(const char typeCode) {
switch(tolower(typeCode)) {
case 'b':
case 'c':
case 'o':
return 1;
case 's':
return 2;
case 'l':
case 'f':
case 'd':
return 4;
default:
return 4;
}
}