You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
302 B
26 lines
302 B
7 years ago
|
#ifndef TYPE_COERCE_H
|
||
|
#define TYPE_COERCE_H
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <stddef.h>
|
||
|
|
||
|
// Structs for conversion between types
|
||
|
|
||
|
union conv8 {
|
||
|
uint8_t u8;
|
||
|
int8_t i8;
|
||
|
};
|
||
|
|
||
|
union conv16 {
|
||
|
uint16_t u16;
|
||
|
int16_t i16;
|
||
|
};
|
||
|
|
||
|
union conv32 {
|
||
|
uint32_t u32;
|
||
|
int32_t i32;
|
||
|
float f32;
|
||
|
};
|
||
|
|
||
|
#endif // TYPE_COERCE_H
|