aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/backlog.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-10-19 20:04:06 +0200
committerlonkaars <loek@pipeframe.xyz>2022-10-19 20:04:06 +0200
commitaab4ed17b94f54813368201d3a0cba3f3d432589 (patch)
tree4babada7f6d176d06a5459510533baa10ac91cd4 /stm32f091/backlog.c
parent2274409f898351f958975d49b0324d992c6073d0 (diff)
integrate protocol code into stm32 code
Diffstat (limited to 'stm32f091/backlog.c')
-rw-r--r--stm32f091/backlog.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/stm32f091/backlog.c b/stm32f091/backlog.c
index 926ccad..662fc75 100644
--- a/stm32f091/backlog.c
+++ b/stm32f091/backlog.c
@@ -33,11 +33,6 @@ ws_s_backlog_record* ws_backlog_get_last_record(uint16_t record_offset) {
return ws_backlog_get_record((g_ws_backlog_database->buffer_end - record_offset - 1) % g_ws_backlog_database->buffer_size);
}
-static uint16_t mod(uint16_t a, uint16_t b) {
- uint16_t m = a % b;
- return m < 0 ? (b < 0) ? m - b : m + b : m;
-}
-
uint16_t ws_backlog_get_record_count() {
// add buffer_size to the result of the modulo operation if it's result is negative
// (only works when buffer_size is less than 2^15)