trabucayre/openFPGALoader#38 minor adjustments for MinGW build - use memset instead of bzero, errno_t may be replaced by int, provide ad-hoc ntohs on windows (alternative is link against winsock)

This commit is contained in:
Ed Bordin
2020-07-25 12:55:41 +10:00
parent 3f4086ec89
commit d24c63ec8a
10 changed files with 24 additions and 17 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ int Altera::idCode()
unsigned char rx_data[4];
_jtag->go_test_logic_reset();
_jtag->shiftIR(tx_data, NULL, IRLENGTH);
bzero(tx_data, 4);
memset(tx_data, 0, 4);
_jtag->shiftDR(tx_data, rx_data, 32);
return ((rx_data[0] & 0x000000ff) |
((rx_data[1] << 8) & 0x0000ff00) |