howard/howard.h

26 lines
1017 B
C
Raw Normal View History

2021-11-28 18:42:03 +11:00
enum influxcmdtype { I_READ, I_WRITE, I_PING };
2022-05-29 22:28:22 +10:00
char *getdevpath(int vid, int pid, char *retvar);
int resetusb(char *path);
char *append(char *orig, char *new, int maxlen);
2021-11-27 16:58:52 +11:00
void colprintf( char *prefix, const char *col, char* format, va_list *args );
2022-05-29 22:28:22 +10:00
double getdecibels(uint8_t *buf);
void cleanup(void);
void handle_signal(int signum);
2021-11-27 16:58:52 +11:00
void info( char* format, ... );
2022-05-29 22:28:22 +10:00
void vinfo( char* format, ... );
2021-11-27 16:58:52 +11:00
void err( char* format, ... );
void warn( char* format, ... );
int hextoint(char *hex);
int readresult(hid_device *dev, uint8_t *retbuf);
2022-05-29 22:28:22 +10:00
void dooutput(uint8_t *buf);
2021-11-28 18:42:03 +11:00
int tcpconnect(char *hname, int port);
int dohttp(char *hname, int port, char *header, char *body, char *retbuf);
struct hostent *resolve(char *hname);
int influx_init(char *hname, char *db, char *user, char *pass);
int influx_cmd(enum influxcmdtype cmdtype, char *cmd, char *retbuf);
int influx_insert(char *cmd, char *retbuf);
int influx_query(char *cmd, char *retbuf);
int influx_ping(char *retbuf);
int influx_write_decibels(double decibels);