Skip to content

Commit

Permalink
Add BM1368 support
Browse files Browse the repository at this point in the history
co-authored-by: John-Paul Compagnone <jpcompagnone@epicblockchain.io>
co-authored-by: johnny9 <985648+johnny9@users.noreply.github.com>
co-authored-by: Ben <wilsob12@gmail.com>
  • Loading branch information
4 people committed Feb 10, 2024
1 parent 23599cf commit 913a27a
Show file tree
Hide file tree
Showing 12 changed files with 643 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
],
"idf.port": "/dev/cu.usbmodem1434301",
"C_Cpp.intelliSenseEngine": "Tag Parser"
}
}
1 change: 1 addition & 0 deletions components/bm1397/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
idf_component_register(
SRCS
"bm1368.c"
"bm1366.c"
"bm1397.c"
"serial.c"
Expand Down
4 changes: 2 additions & 2 deletions components/bm1397/bm1366.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ void BM1366_send_hash_frequency(float target_freq)
}
}

_send_BM1366((TYPE_CMD | GROUP_ALL | CMD_WRITE), freqbuf, 6, true);
_send_BM1366((TYPE_CMD | GROUP_ALL | CMD_WRITE), freqbuf, 6, false);

ESP_LOGI(TAG, "Setting Frequency to %.2fMHz (%.2f)", target_freq, newf);
}
Expand Down Expand Up @@ -653,7 +653,7 @@ asic_result * BM1366_receive_work(void)
return (asic_result *) asic_response_buffer;
}

uint16_t reverse_uint16(uint16_t num)
static uint16_t reverse_uint16(uint16_t num)
{
return (num >> 8) | (num << 8);
}
Expand Down
Loading

0 comments on commit 913a27a

Please sign in to comment.