00001 /* ex: set tabstop=2 shiftwidth=2 expandtab cindent: */ 00002 #ifndef _TMR_TYPES_H 00003 #define _TMR_TYPES_H 00004 00011 /* 00012 * Copyright (c) 2009 ThingMagic, Inc. 00013 * 00014 * Permission is hereby granted, free of charge, to any person obtaining a copy 00015 * of this software and associated documentation files (the "Software"), to deal 00016 * in the Software without restriction, including without limitation the rights 00017 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00018 * copies of the Software, and to permit persons to whom the Software is 00019 * furnished to do so, subject to the following conditions: 00020 * 00021 * The above copyright notice and this permission notice shall be included in 00022 * all copies or substantial portions of the Software. 00023 * 00024 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00025 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00026 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00027 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00028 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00029 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 00030 * THE SOFTWARE. 00031 */ 00032 00033 #include <stdint.h> 00034 #include <stdbool.h> 00035 00036 #ifdef __cplusplus 00037 extern "C" { 00038 #endif 00039 00041 typedef struct TMR_String 00042 { 00044 char *value; 00046 uint16_t max; 00047 } TMR_String; 00048 00050 typedef struct TMR_uint8List 00051 { 00053 uint8_t *list; 00055 uint16_t max; 00057 uint16_t len; 00058 } TMR_uint8List; 00059 00061 typedef struct TMR_uint16List 00062 { 00064 uint16_t *list; 00066 uint16_t max; 00068 uint16_t len; 00069 } TMR_uint16List; 00070 00072 typedef struct TMR_uint32List 00073 { 00075 uint32_t *list; 00077 uint16_t max; 00079 uint16_t len; 00080 } TMR_uint32List; 00081 00083 typedef struct TMR_int8List 00084 { 00086 int8_t *list; 00088 int8_t max; 00090 int8_t len; 00091 }TMR_int8List; 00092 00111 typedef bool (*TMR_FirmwareDataProvider)(void *cookie, uint16_t *size, uint8_t *data); 00112 00113 #ifdef __cplusplus 00114 } 00115 #endif 00116 00117 #endif /* _TMR_TYPES_H */