Go to the source code of this file.
Defines | |
#define | PRODUCT 0xd001 |
#define | READ_ENDPOINT 0x81 |
#define | TIMEOUT 3000 |
#define | VENDOR 0x04d8 |
#define | WRITE_ENDPOINT 0x01 |
Functions | |
int | m4CheckVersion (char *buf) |
int | m4ConfigField (char const *name) |
int | m4FetchDiag (usb_dev_handle *dev, char *buf) |
int | m4GetConfig (usb_dev_handle *dev, struct m4ConfigField *field, char *buf) |
int | m4GetDiag (usb_dev_handle *dev, struct m4Diagnostics *diag) |
int | m4GetFloat (usb_dev_handle *dev, enum m4FieldID fid, float *out) |
int | m4GetInteger (usb_dev_handle *dev, enum m4FieldID fid, int *out) |
float | m4GetVal (enum m4Type type, char *posn) |
usb_dev_handle * | m4Init () |
static usb_dev_handle * | m4InitUSB () |
int | m4ParseValue (enum m4Type type, char const *strval, char *buf) |
void | m4PrintDiag (char *buf) |
void | m4PrintVal (enum m4Type type, float val) |
int | m4Read (usb_dev_handle *dev, unsigned char *buf, unsigned int len, int timeout) |
int | m4SetBinary (usb_dev_handle *dev, struct m4ConfigField *field, char const *val) |
int | m4SetConfig (usb_dev_handle *dev, struct m4ConfigField *field, char const *strval) |
int | m4SetFloat (usb_dev_handle *dev, enum m4FieldID fid, float val) |
int | m4SetInteger (usb_dev_handle *dev, enum m4FieldID fid, int val) |
int | m4Write (usb_dev_handle *dev, unsigned char *buf, unsigned int len, int timeout) |
Variables | |
struct m4ConfigField | m4ConfigFields [47] |
struct m4Version | m4CurrentVersion |
struct m4DiagField | m4DiagFields [6] |
size_t | m4NumDiagFields = sizeof(m4DiagFields) / sizeof(m4DiagFields[0]) |
static float * | m4TypeConversions = NULL |
static float | m4TypeConversionsV1 [13] |
static float | m4TypeConversionsV2 [13] |
char * | m4TypeDescs [14] |
static int | m4TypeForms [13] |
static size_t | m4TypeLengths [13] |
#define READ_ENDPOINT 0x81 |
#define WRITE_ENDPOINT 0x01 |
int m4CheckVersion | ( | char * | buf | ) |
int m4ConfigField | ( | char const * | name | ) |
int m4FetchDiag | ( | usb_dev_handle * | dev, |
char * | buf | ||
) |
int m4GetConfig | ( | usb_dev_handle * | dev, |
struct m4ConfigField * | field, | ||
char * | buf | ||
) |
int m4GetDiag | ( | usb_dev_handle * | dev, |
struct m4Diagnostics * | diag | ||
) |
int m4GetFloat | ( | usb_dev_handle * | dev, |
enum m4FieldID | fid, | ||
float * | out | ||
) |
int m4GetInteger | ( | usb_dev_handle * | dev, |
enum m4FieldID | fid, | ||
int * | out | ||
) |
int m4ParseValue | ( | enum m4Type | type, |
char const * | strval, | ||
char * | buf | ||
) |
void m4PrintDiag | ( | char * | buf | ) |
void m4PrintVal | ( | enum m4Type | type, |
float | val | ||
) |
int m4Read | ( | usb_dev_handle * | dev, |
unsigned char * | buf, | ||
unsigned int | len, | ||
int | timeout | ||
) |
int m4SetBinary | ( | usb_dev_handle * | dev, |
struct m4ConfigField * | field, | ||
char const * | val | ||
) |
int m4SetConfig | ( | usb_dev_handle * | dev, |
struct m4ConfigField * | field, | ||
char const * | strval | ||
) |
int m4SetFloat | ( | usb_dev_handle * | dev, |
enum m4FieldID | fid, | ||
float | val | ||
) |
int m4SetInteger | ( | usb_dev_handle * | dev, |
enum m4FieldID | fid, | ||
int | val | ||
) |
int m4Write | ( | usb_dev_handle * | dev, |
unsigned char * | buf, | ||
unsigned int | len, | ||
int | timeout | ||
) |
struct m4ConfigField m4ConfigFields[47] |
struct m4Version m4CurrentVersion |
struct m4DiagField m4DiagFields[6] |
{ {M4_VLT_12_11, 2, "VIN", "Input voltage"}, {M4_VLT_12_11, 3, "IGN", "Ignition voltage"}, {M4_VLT_33_01, 4, "33V", "Voltage on 3.3V rail"}, {M4_VLT_5_03, 5, "5V", "Voltage on 5V rail"}, {M4_VLT_12_07, 6, "12V", "Voltage on 12V rail"}, {M4_DEG, 12, "TEMP", "Temperature"}, }
size_t m4NumDiagFields = sizeof(m4DiagFields) / sizeof(m4DiagFields[0]) |
float* m4TypeConversions = NULL [static] |
float m4TypeConversionsV1[13] [static] |
float m4TypeConversionsV2[13] [static] |
char* m4TypeDescs[14] |
int m4TypeForms[13] [static] |
size_t m4TypeLengths[13] [static] |