All pastes #404367 Raw Edit

Mine

public c v1 · immutable
·published 2007-03-20 23:45 UTC
rendered paste body
void compass_update(){	char *data = malloc(20);	if (!serialRead(*compass->hSerial, data, 19))		return;	log_write(0, "Heading: %d (%s)\r\n", heading, data);	free(data);}int serialRead(HANDLE hSerial, char *buff, DWORD bytes){	DWORD dwBytesRead = 0;	if (!ReadFile(hSerial, buff, bytes, &dwBytesRead, NULL))		return 0;	return dwBytesRead;}